From 8556ed3d8fa00b045940f32805a086de7258ccc4 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 8 Jul 2022 03:15:34 +0000 Subject: [PATCH 01/40] feat: initial stub of library --- .../CODE_OF_CONDUCT.md | 94 ++++++++ .../CONTRIBUTING.md | 76 +++++++ packages/google-cloud-apigeeregistry/LICENSE | 202 ++++++++++++++++++ .../google-cloud-apigeeregistry/README.md | 123 +++++++++++ 4 files changed, 495 insertions(+) create mode 100644 packages/google-cloud-apigeeregistry/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-apigeeregistry/CONTRIBUTING.md create mode 100644 packages/google-cloud-apigeeregistry/LICENSE create mode 100644 packages/google-cloud-apigeeregistry/README.md diff --git a/packages/google-cloud-apigeeregistry/CODE_OF_CONDUCT.md b/packages/google-cloud-apigeeregistry/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/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-apigeeregistry/CONTRIBUTING.md b/packages/google-cloud-apigeeregistry/CONTRIBUTING.md new file mode 100644 index 00000000000..fc37b2b6698 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/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][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=apigeeregistry.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-apigeeregistry/LICENSE b/packages/google-cloud-apigeeregistry/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/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-apigeeregistry/README.md b/packages/google-cloud-apigeeregistry/README.md new file mode 100644 index 00000000000..accfea4c599 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/README.md @@ -0,0 +1,123 @@ +[//]: # "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 + +# [: Client](https://github.com/) + +[![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/apigee-registry.svg)](https://www.npmjs.org/package/@google-cloud/apigee-registry) + + + + +apigeeregistry client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com//blob/master/CHANGELOG.md). + + + +* [github.com/](https://github.com/) + +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][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/apigee-registry +``` + + + + + +## 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. +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. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +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/apigee-registry@legacy-8` installs client libraries +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//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//blob/master/LICENSE) + + + +[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=apigeeregistry.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started From 7434542d0da17558d1e948d32bafc09c54e9ddb9 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 15 Jul 2022 23:52:39 +0000 Subject: [PATCH 02/40] feat: add templated files from docker image --- .../google-cloud-apigeeregistry/.eslintignore | 7 + .../.eslintrc.json | 3 + .../.gitattributes | 4 + .../.github/.OwlBot.yaml | 22 + .../google-cloud-apigeeregistry/.gitignore | 14 + .../google-cloud-apigeeregistry/.jsdoc.js | 55 + .../google-cloud-apigeeregistry/.mocharc.js | 29 + packages/google-cloud-apigeeregistry/.nycrc | 24 + .../.prettierignore | 6 + .../.prettierrc.js | 17 + .../.repo-metadata.json | 15 + .../linkinator.config.json | 1 + .../google-cloud-apigeeregistry/package.json | 1 + .../v1/provisioning_service.proto | 205 + .../apigeeregistry/v1/registry_models.proto | 364 + .../apigeeregistry/v1/registry_service.proto | 1125 + .../protos/protos.d.ts | 11645 +++++++ .../protos/protos.js | 28351 ++++++++++++++++ .../protos/protos.json | 3489 ++ .../v1/provisioning.create_instance.js | 70 + .../v1/provisioning.delete_instance.js | 60 + .../generated/v1/provisioning.get_instance.js | 59 + .../generated/v1/registry.create_api.js | 73 + .../v1/registry.create_api_deployment.js | 73 + .../generated/v1/registry.create_api_spec.js | 73 + .../v1/registry.create_api_version.js | 73 + .../generated/v1/registry.create_artifact.js | 73 + .../generated/v1/registry.delete_api.js | 59 + .../v1/registry.delete_api_deployment.js | 64 + ...registry.delete_api_deployment_revision.js | 61 + .../generated/v1/registry.delete_api_spec.js | 64 + .../v1/registry.delete_api_spec_revision.js | 61 + .../v1/registry.delete_api_version.js | 59 + .../generated/v1/registry.delete_artifact.js | 59 + .../samples/generated/v1/registry.get_api.js | 59 + .../v1/registry.get_api_deployment.js | 59 + .../generated/v1/registry.get_api_spec.js | 59 + .../v1/registry.get_api_spec_contents.js | 59 + .../generated/v1/registry.get_api_version.js | 59 + .../generated/v1/registry.get_artifact.js | 59 + .../v1/registry.get_artifact_contents.js | 59 + .../registry.list_api_deployment_revisions.js | 69 + .../v1/registry.list_api_deployments.js | 80 + .../v1/registry.list_api_spec_revisions.js | 69 + .../generated/v1/registry.list_api_specs.js | 80 + .../v1/registry.list_api_versions.js | 80 + .../generated/v1/registry.list_apis.js | 80 + .../generated/v1/registry.list_artifacts.js | 80 + .../generated/v1/registry.replace_artifact.js | 60 + .../v1/registry.rollback_api_deployment.js | 65 + .../v1/registry.rollback_api_spec.js | 65 + .../registry.tag_api_deployment_revision.js | 64 + .../v1/registry.tag_api_spec_revision.js | 64 + .../generated/v1/registry.update_api.js | 72 + .../v1/registry.update_api_deployment.js | 72 + .../generated/v1/registry.update_api_spec.js | 72 + .../v1/registry.update_api_version.js | 72 + ...tadata.google.cloud.apigeeregistry.v1.json | 1715 + .../samples/package.json | 23 + .../samples/quickstart.js | 50 + .../samples/test/quickstart.js | 53 + .../google-cloud-apigeeregistry/src/index.ts | 29 + .../src/v1/gapic_metadata.json | 445 + .../src/v1/index.ts | 20 + .../src/v1/provisioning_client.ts | 2155 ++ .../src/v1/provisioning_client_config.json | 38 + .../src/v1/provisioning_proto_list.json | 5 + .../src/v1/registry_client.ts | 6152 ++++ .../src/v1/registry_client_config.json | 213 + .../src/v1/registry_proto_list.json | 5 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 38 + .../system-test/install.ts | 51 + .../test/gapic_provisioning_v1.ts | 2520 ++ .../test/gapic_registry_v1.ts | 7757 +++++ .../google-cloud-apigeeregistry/tsconfig.json | 19 + .../webpack.config.js | 64 + 77 files changed, 69294 insertions(+) create mode 100644 packages/google-cloud-apigeeregistry/.eslintignore create mode 100644 packages/google-cloud-apigeeregistry/.eslintrc.json create mode 100644 packages/google-cloud-apigeeregistry/.gitattributes create mode 100644 packages/google-cloud-apigeeregistry/.github/.OwlBot.yaml create mode 100644 packages/google-cloud-apigeeregistry/.gitignore create mode 100644 packages/google-cloud-apigeeregistry/.jsdoc.js create mode 100644 packages/google-cloud-apigeeregistry/.mocharc.js create mode 100644 packages/google-cloud-apigeeregistry/.nycrc create mode 100644 packages/google-cloud-apigeeregistry/.prettierignore create mode 100644 packages/google-cloud-apigeeregistry/.prettierrc.js create mode 100644 packages/google-cloud-apigeeregistry/.repo-metadata.json create mode 100644 packages/google-cloud-apigeeregistry/linkinator.config.json create mode 100644 packages/google-cloud-apigeeregistry/package.json create mode 100644 packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto create mode 100644 packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto create mode 100644 packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto create mode 100644 packages/google-cloud-apigeeregistry/protos/protos.d.ts create mode 100644 packages/google-cloud-apigeeregistry/protos/protos.js create mode 100644 packages/google-cloud-apigeeregistry/protos/protos.json create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json create mode 100644 packages/google-cloud-apigeeregistry/samples/package.json create mode 100644 packages/google-cloud-apigeeregistry/samples/quickstart.js create mode 100644 packages/google-cloud-apigeeregistry/samples/test/quickstart.js create mode 100644 packages/google-cloud-apigeeregistry/src/index.ts create mode 100644 packages/google-cloud-apigeeregistry/src/v1/gapic_metadata.json create mode 100644 packages/google-cloud-apigeeregistry/src/v1/index.ts create mode 100644 packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts create mode 100644 packages/google-cloud-apigeeregistry/src/v1/provisioning_client_config.json create mode 100644 packages/google-cloud-apigeeregistry/src/v1/provisioning_proto_list.json create mode 100644 packages/google-cloud-apigeeregistry/src/v1/registry_client.ts create mode 100644 packages/google-cloud-apigeeregistry/src/v1/registry_client_config.json create mode 100644 packages/google-cloud-apigeeregistry/src/v1/registry_proto_list.json create mode 100644 packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-apigeeregistry/system-test/install.ts create mode 100644 packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts create mode 100644 packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts create mode 100644 packages/google-cloud-apigeeregistry/tsconfig.json create mode 100644 packages/google-cloud-apigeeregistry/webpack.config.js diff --git a/packages/google-cloud-apigeeregistry/.eslintignore b/packages/google-cloud-apigeeregistry/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-apigeeregistry/.eslintrc.json b/packages/google-cloud-apigeeregistry/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-apigeeregistry/.gitattributes b/packages/google-cloud-apigeeregistry/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/.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-apigeeregistry/.github/.OwlBot.yaml b/packages/google-cloud-apigeeregistry/.github/.OwlBot.yaml new file mode 100644 index 00000000000..bc8466cf6d1 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/.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/cloud-devrel-public-resources/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/apigeeregistry/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 diff --git a/packages/google-cloud-apigeeregistry/.gitignore b/packages/google-cloud-apigeeregistry/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-apigeeregistry/.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-apigeeregistry/.jsdoc.js b/packages/google-cloud-apigeeregistry/.jsdoc.js new file mode 100644 index 00000000000..4d488530161 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/.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/apigeeregistry', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-apigeeregistry/.mocharc.js b/packages/google-cloud-apigeeregistry/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-cloud-apigeeregistry/.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-apigeeregistry/.nycrc b/packages/google-cloud-apigeeregistry/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/.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-apigeeregistry/.prettierignore b/packages/google-cloud-apigeeregistry/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-apigeeregistry/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-apigeeregistry/.prettierrc.js b/packages/google-cloud-apigeeregistry/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-apigeeregistry/.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-apigeeregistry/.repo-metadata.json b/packages/google-cloud-apigeeregistry/.repo-metadata.json new file mode 100644 index 00000000000..7c85ce224d4 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "apigeeregistry", + "name_pretty": "", + "product_documentation": "", + "client_documentation": "", + "issue_tracker": "", + "release_level": "beta", + "language": "", + "repo": "", + "distribution_name": "", + "api_id": "apigeeregistry.googleapis.com", + "default_version": "v1", + "requires_billing": true +} + diff --git a/packages/google-cloud-apigeeregistry/linkinator.config.json b/packages/google-cloud-apigeeregistry/linkinator.config.json new file mode 100644 index 00000000000..57f46959ca3 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/linkinator.config.json @@ -0,0 +1 @@ +{"recurse":true,"skip":["'httpRules'","lroOptions.httpRules","https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":5,"retry":true,"retryErrors":true,"retryErrorsCount":5,"retryErrorsJitter":3000} \ No newline at end of file diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json new file mode 100644 index 00000000000..4302220ea91 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/package.json @@ -0,0 +1 @@ +{"name":"@google-cloud/apigee-registry","version":"0.1.0","description":"apigeeregistry client for Node.js","repository":"googleapis/nodejs-apigee-registry","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 apigeeregistry","apigeeregistry","apigeeregistry 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-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto new file mode 100644 index 00000000000..8ecc5a1ff96 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto @@ -0,0 +1,205 @@ +// 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.apigeeregistry.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/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; +option java_multiple_files = true; +option java_outer_classname = "ProvisioningServiceProto"; +option java_package = "com.google.cloud.apigeeregistry.v1"; +option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1"; +option ruby_package = "Google::Cloud::ApigeeRegistry::V1"; + +// The service that is used for managing the data plane provisioning of the +// Registry. +service Provisioning { + option (google.api.default_host) = "apigeeregistry.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Provisions instance resources for the Registry. + rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/instances" + body: "instance" + }; + option (google.api.method_signature) = "parent,instance,instance_id"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Deletes the Registry instance. + rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single Instance. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for CreateInstance. +message CreateInstanceRequest { + // Required. Parent resource of the Instance, of the form: `projects/*/locations/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Identifier to assign to the Instance. Must be unique within scope of the + // parent resource. + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Instance. + Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteInstance. +message DeleteInstanceRequest { + // Required. The name of the Instance to delete. + // Format: `projects/*/locations/*/instances/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Instance" + } + ]; +} + +// Request message for GetInstance. +message GetInstanceRequest { + // Required. The name of the Instance to retrieve. + // Format: `projects/*/locations/*/instances/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Instance" + } + ]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Server-defined resource path for the target of the operation. + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_message = 5; + + // 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 cancellation_requested = 6; + + // API version used to start the operation. + string api_version = 7; +} + +// An Instance represents the instance resources of the Registry. +// Currently, only one instance is allowed for each project. +message Instance { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + }; + + // State of the Instance. + enum State { + // The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0; + + // The Instance has not been initialized or has been deleted. + INACTIVE = 1; + + // The Instance is being created. + CREATING = 2; + + // The Instance has been created and is ready for use. + ACTIVE = 3; + + // The Instance is being updated. + UPDATING = 4; + + // The Instance is being deleted. + DELETING = 5; + + // The Instance encountered an error during a state change. + FAILED = 6; + } + + // Available configurations to provision an Instance. + message Config { + // Output only. The GCP location where the Instance resides. + string location = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The Customer Managed Encryption Key (CMEK) used for data encryption. + // The CMEK name should follow the format of + // `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`, + // where the `location` must match InstanceConfig.location. + string cmek_key_name = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Format: `projects/*/locations/*/instance`. + // Currently only locations/global is supported. + string name = 1; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the Instance. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Extra information of Instance.State if the state is `FAILED`. + string state_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Config of the Instance. + Config config = 6 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto new file mode 100644 index 00000000000..002a8b2138e --- /dev/null +++ b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto @@ -0,0 +1,364 @@ +// 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.apigeeregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; +option java_multiple_files = true; +option java_outer_classname = "RegistryModelsProto"; +option java_package = "com.google.cloud.apigeeregistry.v1"; +option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1"; +option ruby_package = "Google::Cloud::ApigeeRegistry::V1"; + +// An Api is a top-level description of an API. +// Apis are produced by producers and are commitments to provide services. +message Api { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/Api" + pattern: "projects/{project}/locations/{location}/apis/{api}" + }; + + // Resource name. + string name = 1; + + // Human-meaningful name. + string display_name = 2; + + // A detailed description. + string description = 3; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A user-definable description of the availability of this service. + // Format: free-form, but we expect single words that describe availability, + // e.g. "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN". + string availability = 6; + + // The recommended version of the API. + // Format: apis/{api}/versions/{version} + string recommended_version = 7 [(google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiVersion" + }]; + + // The recommended deployment of the API. + // Format: apis/{api}/deployments/{deployment} + string recommended_deployment = 8 [(google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + }]; + + // Labels attach identifying metadata to resources. Identifying metadata can + // be used to filter list operations. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one resource (System + // labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with + // "apigeeregistry.googleapis.com/" and cannot be changed. + map labels = 9; + + // Annotations attach non-identifying metadata to resources. + // + // Annotation keys and values are less restricted than those of labels, but + // should be generally used for small values of broad interest. Larger, topic- + // specific metadata should be stored in Artifacts. + map annotations = 10; +} + +// An ApiVersion describes a particular version of an API. +// ApiVersions are what consumers actually use. +message ApiVersion { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/ApiVersion" + pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}" + }; + + // Resource name. + string name = 1; + + // Human-meaningful name. + string display_name = 2; + + // A detailed description. + string description = 3; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A user-definable description of the lifecycle phase of this API version. + // Format: free-form, but we expect single words that describe API maturity, + // e.g. "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", + // "DEPRECATED", "RETIRED". + string state = 6; + + // Labels attach identifying metadata to resources. Identifying metadata can + // be used to filter list operations. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one resource (System + // labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with + // "apigeeregistry.googleapis.com/" and cannot be changed. + map labels = 7; + + // Annotations attach non-identifying metadata to resources. + // + // Annotation keys and values are less restricted than those of labels, but + // should be generally used for small values of broad interest. Larger, topic- + // specific metadata should be stored in Artifacts. + map annotations = 8; +} + +// An ApiSpec describes a version of an API in a structured way. +// ApiSpecs provide formal descriptions that consumers can use to use a version. +// ApiSpec resources are intended to be fully-resolved descriptions of an +// ApiVersion. When specs consist of multiple files, these should be bundled +// together (e.g. in a zip archive) and stored as a unit. Multiple specs can +// exist to provide representations in different API description formats. +// Synchronization of these representations would be provided by tooling and +// background services. +message ApiSpec { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}" + }; + + // Resource name. + string name = 1; + + // A possibly-hierarchical name used to refer to the spec from other specs. + string filename = 2; + + // A detailed description. + string description = 3; + + // Output only. Immutable. The revision ID of the spec. + // A new revision is committed whenever the spec contents are changed. + // The format is an 8-character hexadecimal string. + string revision_id = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. Creation timestamp; when the spec resource was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Revision creation timestamp; when the represented revision was created. + google.protobuf.Timestamp revision_create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp: when the represented revision was last modified. + google.protobuf.Timestamp revision_update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A style (format) descriptor for this spec that is specified as a Media Type + // (https://en.wikipedia.org/wiki/Media_type). Possible values include + // "application/vnd.apigee.proto", "application/vnd.apigee.openapi", and + // "application/vnd.apigee.graphql", with possible suffixes representing + // compression types. These hypothetical names are defined in the vendor tree + // defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. + // Content types can specify compression. Currently only GZip compression is + // supported (indicated with "+gzip"). + string mime_type = 8; + + // Output only. The size of the spec file in bytes. If the spec is gzipped, this is the + // size of the uncompressed spec. + int32 size_bytes = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is + // the hash of the uncompressed spec. + string hash = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The original source URI of the spec (if one exists). + // This is an external location that can be used for reference purposes + // but which may not be authoritative since this external resource may + // change after the spec is retrieved. + string source_uri = 11; + + // Input only. The contents of the spec. + // Provided by API callers when specs are created or updated. + // To access the contents of a spec, use GetApiSpecContents. + bytes contents = 12 [(google.api.field_behavior) = INPUT_ONLY]; + + // Labels attach identifying metadata to resources. Identifying metadata can + // be used to filter list operations. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one resource (System + // labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with + // "apigeeregistry.googleapis.com/" and cannot be changed. + map labels = 14; + + // Annotations attach non-identifying metadata to resources. + // + // Annotation keys and values are less restricted than those of labels, but + // should be generally used for small values of broad interest. Larger, topic- + // specific metadata should be stored in Artifacts. + map annotations = 15; +} + +// An ApiDeployment describes a service running at particular address that +// provides a particular version of an API. ApiDeployments have revisions which +// correspond to different configurations of a single deployment in time. +// Revision identifiers should be updated whenever the served API spec or +// endpoint address changes. +message ApiDeployment { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + pattern: "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}" + }; + + // Resource name. + string name = 1; + + // Human-meaningful name. + string display_name = 2; + + // A detailed description. + string description = 3; + + // Output only. Immutable. The revision ID of the deployment. + // A new revision is committed whenever the deployment contents are changed. + // The format is an 8-character hexadecimal string. + string revision_id = 4 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. Creation timestamp; when the deployment resource was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Revision creation timestamp; when the represented revision was created. + google.protobuf.Timestamp revision_create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp: when the represented revision was last modified. + google.protobuf.Timestamp revision_update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The full resource name (including revision id) of the spec of the API being + // served by the deployment. Changes to this value will update the revision. + // Format: apis/{api}/deployments/{deployment} + string api_spec_revision = 8 [(google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + }]; + + // The address where the deployment is serving. Changes to this value will + // update the revision. + string endpoint_uri = 9; + + // The address of the external channel of the API (e.g. the Developer + // Portal). Changes to this value will not affect the revision. + string external_channel_uri = 10; + + // Text briefly identifying the intended audience of the API. Changes to this + // value will not affect the revision. + string intended_audience = 11; + + // Text briefly describing how to access the endpoint. Changes to this value + // will not affect the revision. + string access_guidance = 12; + + // Labels attach identifying metadata to resources. Identifying metadata can + // be used to filter list operations. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one resource (System + // labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with + // "apigeeregistry.googleapis.com/" and cannot be changed. + map labels = 14; + + // Annotations attach non-identifying metadata to resources. + // + // Annotation keys and values are less restricted than those of labels, but + // should be generally used for small values of broad interest. Larger, topic- + // specific metadata should be stored in Artifacts. + map annotations = 15; +} + +// Artifacts of resources. Artifacts are unique (single-value) per resource +// and are used to store metadata that is too large or numerous to be stored +// directly on the resource. Since artifacts are stored separately from parent +// resources, they should generally be used for metadata that is needed +// infrequently, i.e. not for display in primary views of the resource but +// perhaps displayed or downloaded upon request. The ListArtifacts method +// allows artifacts to be quickly enumerated and checked for presence without +// downloading their (potentially-large) contents. +message Artifact { + option (google.api.resource) = { + type: "apigeeregistry.googleapis.com/Artifact" + pattern: "projects/{project}/locations/{location}/artifacts/{artifact}" + pattern: "projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}" + pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}" + pattern: "projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}" + pattern: "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}" + }; + + // Resource name. + string name = 1; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update timestamp. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A content type specifier for the artifact. + // Content type specifiers are Media Types + // (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" + // parameter that specifies a schema for the stored information. + // Content types can specify compression. Currently only GZip compression is + // supported (indicated with "+gzip"). + string mime_type = 4; + + // Output only. The size of the artifact in bytes. If the artifact is gzipped, this is + // the size of the uncompressed artifact. + int32 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, + // this is the hash of the uncompressed artifact. + string hash = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Input only. The contents of the artifact. + // Provided by API callers when artifacts are created or replaced. + // To access the contents of an artifact, use GetArtifactContents. + bytes contents = 7 [(google.api.field_behavior) = INPUT_ONLY]; +} diff --git a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto new file mode 100644 index 00000000000..f191336f16e --- /dev/null +++ b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto @@ -0,0 +1,1125 @@ +// 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.apigeeregistry.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/httpbody.proto"; +import "google/api/resource.proto"; +import "google/cloud/apigeeregistry/v1/registry_models.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; +option java_multiple_files = true; +option java_outer_classname = "RegistryServiceProto"; +option java_package = "com.google.cloud.apigeeregistry.v1"; +option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1"; +option ruby_package = "Google::Cloud::ApigeeRegistry::V1"; + +// The Registry service allows teams to manage descriptions of APIs. +service Registry { + option (google.api.default_host) = "apigeeregistry.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // ListApis returns matching APIs. + rpc ListApis(ListApisRequest) returns (ListApisResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/apis" + }; + option (google.api.method_signature) = "parent"; + } + + // GetApi returns a specified API. + rpc GetApi(GetApiRequest) returns (Api) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*}" + }; + option (google.api.method_signature) = "name"; + } + + // CreateApi creates a specified API. + rpc CreateApi(CreateApiRequest) returns (Api) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/apis" + body: "api" + }; + option (google.api.method_signature) = "parent,api,api_id"; + } + + // UpdateApi can be used to modify a specified API. + rpc UpdateApi(UpdateApiRequest) returns (Api) { + option (google.api.http) = { + patch: "/v1/{api.name=projects/*/locations/*/apis/*}" + body: "api" + }; + option (google.api.method_signature) = "api,update_mask"; + } + + // DeleteApi removes a specified API and all of the resources that it + // owns. + rpc DeleteApi(DeleteApiRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*}" + }; + option (google.api.method_signature) = "name"; + } + + // ListApiVersions returns matching versions. + rpc ListApiVersions(ListApiVersionsRequest) returns (ListApiVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/apis/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // GetApiVersion returns a specified version. + rpc GetApiVersion(GetApiVersionRequest) returns (ApiVersion) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // CreateApiVersion creates a specified version. + rpc CreateApiVersion(CreateApiVersionRequest) returns (ApiVersion) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/apis/*}/versions" + body: "api_version" + }; + option (google.api.method_signature) = "parent,api_version,api_version_id"; + } + + // UpdateApiVersion can be used to modify a specified version. + rpc UpdateApiVersion(UpdateApiVersionRequest) returns (ApiVersion) { + option (google.api.http) = { + patch: "/v1/{api_version.name=projects/*/locations/*/apis/*/versions/*}" + body: "api_version" + }; + option (google.api.method_signature) = "api_version,update_mask"; + } + + // DeleteApiVersion removes a specified version and all of the resources that + // it owns. + rpc DeleteApiVersion(DeleteApiVersionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // ListApiSpecs returns matching specs. + rpc ListApiSpecs(ListApiSpecsRequest) returns (ListApiSpecsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs" + }; + option (google.api.method_signature) = "parent"; + } + + // GetApiSpec returns a specified spec. + rpc GetApiSpec(GetApiSpecRequest) returns (ApiSpec) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // GetApiSpecContents returns the contents of a specified spec. + // If specs are stored with GZip compression, the default behavior + // is to return the spec uncompressed (the mime_type response field + // indicates the exact format returned). + rpc GetApiSpecContents(GetApiSpecContentsRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:getContents" + }; + option (google.api.method_signature) = "name"; + } + + // CreateApiSpec creates a specified spec. + rpc CreateApiSpec(CreateApiSpecRequest) returns (ApiSpec) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs" + body: "api_spec" + }; + option (google.api.method_signature) = "parent,api_spec,api_spec_id"; + } + + // UpdateApiSpec can be used to modify a specified spec. + rpc UpdateApiSpec(UpdateApiSpecRequest) returns (ApiSpec) { + option (google.api.http) = { + patch: "/v1/{api_spec.name=projects/*/locations/*/apis/*/versions/*/specs/*}" + body: "api_spec" + }; + option (google.api.method_signature) = "api_spec,update_mask"; + } + + // DeleteApiSpec removes a specified spec, all revisions, and all child + // resources (e.g. artifacts). + rpc DeleteApiSpec(DeleteApiSpecRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // TagApiSpecRevision adds a tag to a specified revision of a spec. + rpc TagApiSpecRevision(TagApiSpecRevisionRequest) returns (ApiSpec) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision" + body: "*" + }; + } + + // ListApiSpecRevisions lists all revisions of a spec. + // Revisions are returned in descending order of revision creation time. + rpc ListApiSpecRevisions(ListApiSpecRevisionsRequest) returns (ListApiSpecRevisionsResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:listRevisions" + }; + } + + // RollbackApiSpec sets the current revision to a specified prior revision. + // Note that this creates a new revision with a new revision ID. + rpc RollbackApiSpec(RollbackApiSpecRequest) returns (ApiSpec) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:rollback" + body: "*" + }; + } + + // DeleteApiSpecRevision deletes a revision of a spec. + rpc DeleteApiSpecRevision(DeleteApiSpecRevisionRequest) returns (ApiSpec) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision" + }; + option (google.api.method_signature) = "name"; + } + + // ListApiDeployments returns matching deployments. + rpc ListApiDeployments(ListApiDeploymentsRequest) returns (ListApiDeploymentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/apis/*}/deployments" + }; + option (google.api.method_signature) = "parent"; + } + + // GetApiDeployment returns a specified deployment. + rpc GetApiDeployment(GetApiDeploymentRequest) returns (ApiDeployment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // CreateApiDeployment creates a specified deployment. + rpc CreateApiDeployment(CreateApiDeploymentRequest) returns (ApiDeployment) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/apis/*}/deployments" + body: "api_deployment" + }; + option (google.api.method_signature) = "parent,api_deployment,api_deployment_id"; + } + + // UpdateApiDeployment can be used to modify a specified deployment. + rpc UpdateApiDeployment(UpdateApiDeploymentRequest) returns (ApiDeployment) { + option (google.api.http) = { + patch: "/v1/{api_deployment.name=projects/*/locations/*/apis/*/deployments/*}" + body: "api_deployment" + }; + option (google.api.method_signature) = "api_deployment,update_mask"; + } + + // DeleteApiDeployment removes a specified deployment, all revisions, and all + // child resources (e.g. artifacts). + rpc DeleteApiDeployment(DeleteApiDeploymentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // TagApiDeploymentRevision adds a tag to a specified revision of a + // deployment. + rpc TagApiDeploymentRevision(TagApiDeploymentRevisionRequest) returns (ApiDeployment) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:tagRevision" + body: "*" + }; + } + + // ListApiDeploymentRevisions lists all revisions of a deployment. + // Revisions are returned in descending order of revision creation time. + rpc ListApiDeploymentRevisions(ListApiDeploymentRevisionsRequest) returns (ListApiDeploymentRevisionsResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:listRevisions" + }; + } + + // RollbackApiDeployment sets the current revision to a specified prior + // revision. Note that this creates a new revision with a new revision ID. + rpc RollbackApiDeployment(RollbackApiDeploymentRequest) returns (ApiDeployment) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:rollback" + body: "*" + }; + } + + // DeleteApiDeploymentRevision deletes a revision of a deployment. + rpc DeleteApiDeploymentRevision(DeleteApiDeploymentRevisionRequest) returns (ApiDeployment) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision" + }; + option (google.api.method_signature) = "name"; + } + + // ListArtifacts returns matching artifacts. + rpc ListArtifacts(ListArtifactsRequest) returns (ListArtifactsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/artifacts" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/apis/*}/artifacts" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts" + } + }; + option (google.api.method_signature) = "parent"; + } + + // GetArtifact returns a specified artifact. + rpc GetArtifact(GetArtifactRequest) returns (Artifact) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/artifacts/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // GetArtifactContents returns the contents of a specified artifact. + // If artifacts are stored with GZip compression, the default behavior + // is to return the artifact uncompressed (the mime_type response field + // indicates the exact format returned). + rpc GetArtifactContents(GetArtifactContentsRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/artifacts/*}:getContents" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}:getContents" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getContents" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getContents" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:getContents" + } + }; + option (google.api.method_signature) = "name"; + } + + // CreateArtifact creates a specified artifact. + rpc CreateArtifact(CreateArtifactRequest) returns (Artifact) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/artifacts" + body: "artifact" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/apis/*}/artifacts" + body: "artifact" + } + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts" + body: "artifact" + } + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts" + body: "artifact" + } + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts" + body: "artifact" + } + }; + option (google.api.method_signature) = "parent,artifact,artifact_id"; + } + + // ReplaceArtifact can be used to replace a specified artifact. + rpc ReplaceArtifact(ReplaceArtifactRequest) returns (Artifact) { + option (google.api.http) = { + put: "/v1/{artifact.name=projects/*/locations/*/artifacts/*}" + body: "artifact" + additional_bindings { + put: "/v1/{artifact.name=projects/*/locations/*/apis/*/artifacts/*}" + body: "artifact" + } + additional_bindings { + put: "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/artifacts/*}" + body: "artifact" + } + additional_bindings { + put: "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}" + body: "artifact" + } + additional_bindings { + put: "/v1/{artifact.name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}" + body: "artifact" + } + }; + option (google.api.method_signature) = "artifact"; + } + + // DeleteArtifact removes a specified artifact. + rpc DeleteArtifact(DeleteArtifactRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/artifacts/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}" + } + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}" + } + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}" + } + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for ListApis. +message ListApisRequest { + // Required. The parent, which owns this collection of APIs. + // Format: projects/*/locations/* + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/Api" + } + ]; + + // The maximum number of APIs to return. + // The service may return fewer than this value. + // If unspecified, at most 50 values will be returned. + // The maximum is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListApis` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListApis` must match + // the call that provided the page token. + string page_token = 3; + + // An expression that can be used to filter the list. Filters use the Common + // Expression Language and can refer to all message fields. + string filter = 4; +} + +// Response message for ListApis. +message ListApisResponse { + // The APIs from the specified publisher. + repeated Api apis = 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; +} + +// Request message for GetApi. +message GetApiRequest { + // Required. The name of the API to retrieve. + // Format: projects/*/locations/*/apis/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Api" + } + ]; +} + +// Request message for CreateApi. +message CreateApiRequest { + // Required. The parent, which owns this collection of APIs. + // Format: projects/*/locations/* + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/Api" + } + ]; + + // Required. The API to create. + Api api = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the api, which will become the final component of + // the api's resource name. + // + // This value should be 4-63 characters, and valid characters + // are /[a-z][0-9]-/. + // + // Following AIP-162, IDs must not have the form of a UUID. + string api_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateApi. +message UpdateApiRequest { + // Required. The API to update. + // + // The `name` field is used to identify the API to update. + // Format: projects/*/locations/*/apis/* + Api api = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. If omitted, all fields are updated that + // are set in the request message (fields set to default values are ignored). + // If a "*" is specified, all fields are updated, including fields that are + // unspecified/default in the request. + google.protobuf.FieldMask update_mask = 2; + + // If set to true, and the api is not found, a new api will be created. + // In this situation, `update_mask` is ignored. + bool allow_missing = 3; +} + +// Request message for DeleteApi. +message DeleteApiRequest { + // Required. The name of the API to delete. + // Format: projects/*/locations/*/apis/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Api" + } + ]; +} + +// Request message for ListApiVersions. +message ListApiVersionsRequest { + // Required. The parent, which owns this collection of versions. + // Format: projects/*/locations/*/apis/* + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiVersion" + } + ]; + + // The maximum number of versions to return. + // The service may return fewer than this value. + // If unspecified, at most 50 values will be returned. + // The maximum is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListApiVersions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListApiVersions` must + // match the call that provided the page token. + string page_token = 3; + + // An expression that can be used to filter the list. Filters use the Common + // Expression Language and can refer to all message fields. + string filter = 4; +} + +// Response message for ListApiVersions. +message ListApiVersionsResponse { + // The versions from the specified publisher. + repeated ApiVersion api_versions = 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; +} + +// Request message for GetApiVersion. +message GetApiVersionRequest { + // Required. The name of the version to retrieve. + // Format: projects/*/locations/*/apis/*/versions/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiVersion" + } + ]; +} + +// Request message for CreateApiVersion. +message CreateApiVersionRequest { + // Required. The parent, which owns this collection of versions. + // Format: projects/*/locations/*/apis/* + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiVersion" + } + ]; + + // Required. The version to create. + ApiVersion api_version = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the version, which will become the final component of + // the version's resource name. + // + // This value should be 1-63 characters, and valid characters + // are /[a-z][0-9]-/. + // + // Following AIP-162, IDs must not have the form of a UUID. + string api_version_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateApiVersion. +message UpdateApiVersionRequest { + // Required. The version to update. + // + // The `name` field is used to identify the version to update. + // Format: projects/*/locations/*/apis/*/versions/* + ApiVersion api_version = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. If omitted, all fields are updated that + // are set in the request message (fields set to default values are ignored). + // If a "*" is specified, all fields are updated, including fields that are + // unspecified/default in the request. + google.protobuf.FieldMask update_mask = 2; + + // If set to true, and the version is not found, a new version will be + // created. In this situation, `update_mask` is ignored. + bool allow_missing = 3; +} + +// Request message for DeleteApiVersion. +message DeleteApiVersionRequest { + // Required. The name of the version to delete. + // Format: projects/*/locations/*/apis/*/versions/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiVersion" + } + ]; +} + +// Request message for ListApiSpecs. +message ListApiSpecsRequest { + // Required. The parent, which owns this collection of specs. + // Format: projects/*/locations/*/apis/*/versions/* + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // The maximum number of specs to return. + // The service may return fewer than this value. + // If unspecified, at most 50 values will be returned. + // The maximum is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListApiSpecs` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListApiSpecs` must match + // the call that provided the page token. + string page_token = 3; + + // An expression that can be used to filter the list. Filters use the Common + // Expression Language and can refer to all message fields except contents. + string filter = 4; +} + +// Response message for ListApiSpecs. +message ListApiSpecsResponse { + // The specs from the specified publisher. + repeated ApiSpec api_specs = 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; +} + +// Request message for GetApiSpec. +message GetApiSpecRequest { + // Required. The name of the spec to retrieve. + // Format: projects/*/locations/*/apis/*/versions/*/specs/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; +} + +// Request message for GetApiSpecContents. +message GetApiSpecContentsRequest { + // Required. The name of the spec whose contents should be retrieved. + // Format: projects/*/locations/*/apis/*/versions/*/specs/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; +} + +// Request message for CreateApiSpec. +message CreateApiSpecRequest { + // Required. The parent, which owns this collection of specs. + // Format: projects/*/locations/*/apis/*/versions/* + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // Required. The spec to create. + ApiSpec api_spec = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the spec, which will become the final component of + // the spec's resource name. + // + // This value should be 4-63 characters, and valid characters + // are /[a-z][0-9]-/. + // + // Following AIP-162, IDs must not have the form of a UUID. + string api_spec_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateApiSpec. +message UpdateApiSpecRequest { + // Required. The spec to update. + // + // The `name` field is used to identify the spec to update. + // Format: projects/*/locations/*/apis/*/versions/*/specs/* + ApiSpec api_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. If omitted, all fields are updated that + // are set in the request message (fields set to default values are ignored). + // If a "*" is specified, all fields are updated, including fields that are + // unspecified/default in the request. + google.protobuf.FieldMask update_mask = 2; + + // If set to true, and the spec is not found, a new spec will be created. + // In this situation, `update_mask` is ignored. + bool allow_missing = 3; +} + +// Request message for DeleteApiSpec. +message DeleteApiSpecRequest { + // Required. The name of the spec to delete. + // Format: projects/*/locations/*/apis/*/versions/*/specs/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // If set to true, any child resources will also be deleted. + // (Otherwise, the request will only work if there are no child resources.) + bool force = 2; +} + +// Request message for TagApiSpecRevision. +message TagApiSpecRevisionRequest { + // Required. The name of the spec to be tagged, including the revision ID. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // Required. The tag to apply. + // The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + string tag = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListApiSpecRevisions. +message ListApiSpecRevisionsRequest { + // Required. The name of the spec to list revisions for. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // The maximum number of revisions to return per page. + int32 page_size = 2; + + // The page token, received from a previous ListApiSpecRevisions call. + // Provide this to retrieve the subsequent page. + string page_token = 3; +} + +// Response message for ListApiSpecRevisionsResponse. +message ListApiSpecRevisionsResponse { + // The revisions of the spec. + repeated ApiSpec api_specs = 1; + + // A token that 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; +} + +// Request message for RollbackApiSpec. +message RollbackApiSpecRequest { + // Required. The spec being rolled back. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; + + // Required. The revision ID to roll back to. + // It must be a revision of the same spec. + // + // Example: c7cfa2a8 + string revision_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteApiSpecRevision. +message DeleteApiSpecRevisionRequest { + // Required. The name of the spec revision to be deleted, + // with a revision ID explicitly included. + // + // Example: + // projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiSpec" + } + ]; +} + +// Request message for ListApiDeployments. +message ListApiDeploymentsRequest { + // Required. The parent, which owns this collection of deployments. + // Format: projects/*/locations/*/apis/* + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // The maximum number of deployments to return. + // The service may return fewer than this value. + // If unspecified, at most 50 values will be returned. + // The maximum is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListApiDeployments` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListApiDeployments` must + // match the call that provided the page token. + string page_token = 3; + + // An expression that can be used to filter the list. Filters use the Common + // Expression Language and can refer to all message fields. + string filter = 4; +} + +// Response message for ListApiDeployments. +message ListApiDeploymentsResponse { + // The deployments from the specified publisher. + repeated ApiDeployment api_deployments = 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; +} + +// Request message for GetApiDeployment. +message GetApiDeploymentRequest { + // Required. The name of the deployment to retrieve. + // Format: projects/*/locations/*/apis/*/deployments/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; +} + +// Request message for CreateApiDeployment. +message CreateApiDeploymentRequest { + // Required. The parent, which owns this collection of deployments. + // Format: projects/*/locations/*/apis/* + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // Required. The deployment to create. + ApiDeployment api_deployment = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the deployment, which will become the final component of + // the deployment's resource name. + // + // This value should be 4-63 characters, and valid characters + // are /[a-z][0-9]-/. + // + // Following AIP-162, IDs must not have the form of a UUID. + string api_deployment_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateApiDeployment. +message UpdateApiDeploymentRequest { + // Required. The deployment to update. + // + // The `name` field is used to identify the deployment to update. + // Format: projects/*/locations/*/apis/*/deployments/* + ApiDeployment api_deployment = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. If omitted, all fields are updated that + // are set in the request message (fields set to default values are ignored). + // If a "*" is specified, all fields are updated, including fields that are + // unspecified/default in the request. + google.protobuf.FieldMask update_mask = 2; + + // If set to true, and the deployment is not found, a new deployment will be + // created. In this situation, `update_mask` is ignored. + bool allow_missing = 3; +} + +// Request message for DeleteApiDeployment. +message DeleteApiDeploymentRequest { + // Required. The name of the deployment to delete. + // Format: projects/*/locations/*/apis/*/deployments/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // If set to true, any child resources will also be deleted. + // (Otherwise, the request will only work if there are no child resources.) + bool force = 2; +} + +// Request message for TagApiDeploymentRevision. +message TagApiDeploymentRevisionRequest { + // Required. The name of the deployment to be tagged, including the revision ID. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // Required. The tag to apply. + // The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + string tag = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListApiDeploymentRevisions. +message ListApiDeploymentRevisionsRequest { + // Required. The name of the deployment to list revisions for. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // The maximum number of revisions to return per page. + int32 page_size = 2; + + // The page token, received from a previous ListApiDeploymentRevisions call. + // Provide this to retrieve the subsequent page. + string page_token = 3; +} + +// Response message for ListApiDeploymentRevisionsResponse. +message ListApiDeploymentRevisionsResponse { + // The revisions of the deployment. + repeated ApiDeployment api_deployments = 1; + + // A token that 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; +} + +// Request message for RollbackApiDeployment. +message RollbackApiDeploymentRequest { + // Required. The deployment being rolled back. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; + + // Required. The revision ID to roll back to. + // It must be a revision of the same deployment. + // + // Example: c7cfa2a8 + string revision_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteApiDeploymentRevision. +message DeleteApiDeploymentRevisionRequest { + // Required. The name of the deployment revision to be deleted, + // with a revision ID explicitly included. + // + // Example: + // projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/ApiDeployment" + } + ]; +} + +// Request message for ListArtifacts. +message ListArtifactsRequest { + // Required. The parent, which owns this collection of artifacts. + // Format: {parent} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/Artifact" + } + ]; + + // The maximum number of artifacts to return. + // The service may return fewer than this value. + // If unspecified, at most 50 values will be returned. + // The maximum is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListArtifacts` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListArtifacts` must + // match the call that provided the page token. + string page_token = 3; + + // An expression that can be used to filter the list. Filters use the Common + // Expression Language and can refer to all message fields except contents. + string filter = 4; +} + +// Response message for ListArtifacts. +message ListArtifactsResponse { + // The artifacts from the specified publisher. + repeated Artifact artifacts = 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; +} + +// Request message for GetArtifact. +message GetArtifactRequest { + // Required. The name of the artifact to retrieve. + // Format: {parent}/artifacts/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Artifact" + } + ]; +} + +// Request message for GetArtifactContents. +message GetArtifactContentsRequest { + // Required. The name of the artifact whose contents should be retrieved. + // Format: {parent}/artifacts/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Artifact" + } + ]; +} + +// Request message for CreateArtifact. +message CreateArtifactRequest { + // Required. The parent, which owns this collection of artifacts. + // Format: {parent} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "apigeeregistry.googleapis.com/Artifact" + } + ]; + + // Required. The artifact to create. + Artifact artifact = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the artifact, which will become the final component of + // the artifact's resource name. + // + // This value should be 4-63 characters, and valid characters + // are /[a-z][0-9]-/. + // + // Following AIP-162, IDs must not have the form of a UUID. + string artifact_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ReplaceArtifact. +message ReplaceArtifactRequest { + // Required. The artifact to replace. + // + // The `name` field is used to identify the artifact to replace. + // Format: {parent}/artifacts/* + Artifact artifact = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteArtifact. +message DeleteArtifactRequest { + // Required. The name of the artifact to delete. + // Format: {parent}/artifacts/* + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "apigeeregistry.googleapis.com/Artifact" + } + ]; +} diff --git a/packages/google-cloud-apigeeregistry/protos/protos.d.ts b/packages/google-cloud-apigeeregistry/protos/protos.d.ts new file mode 100644 index 00000000000..3af2a5614eb --- /dev/null +++ b/packages/google-cloud-apigeeregistry/protos/protos.d.ts @@ -0,0 +1,11645 @@ +// 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 apigeeregistry. */ + namespace apigeeregistry { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a Provisioning */ + class Provisioning extends $protobuf.rpc.Service { + + /** + * Constructs a new Provisioning 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 Provisioning 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): Provisioning; + + /** + * Calls CreateInstance. + * @param request CreateInstanceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createInstance(request: google.cloud.apigeeregistry.v1.ICreateInstanceRequest, callback: google.cloud.apigeeregistry.v1.Provisioning.CreateInstanceCallback): void; + + /** + * Calls CreateInstance. + * @param request CreateInstanceRequest message or plain object + * @returns Promise + */ + public createInstance(request: google.cloud.apigeeregistry.v1.ICreateInstanceRequest): Promise; + + /** + * Calls DeleteInstance. + * @param request DeleteInstanceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteInstance(request: google.cloud.apigeeregistry.v1.IDeleteInstanceRequest, callback: google.cloud.apigeeregistry.v1.Provisioning.DeleteInstanceCallback): void; + + /** + * Calls DeleteInstance. + * @param request DeleteInstanceRequest message or plain object + * @returns Promise + */ + public deleteInstance(request: google.cloud.apigeeregistry.v1.IDeleteInstanceRequest): Promise; + + /** + * Calls GetInstance. + * @param request GetInstanceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Instance + */ + public getInstance(request: google.cloud.apigeeregistry.v1.IGetInstanceRequest, callback: google.cloud.apigeeregistry.v1.Provisioning.GetInstanceCallback): void; + + /** + * Calls GetInstance. + * @param request GetInstanceRequest message or plain object + * @returns Promise + */ + public getInstance(request: google.cloud.apigeeregistry.v1.IGetInstanceRequest): Promise; + } + + namespace Provisioning { + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#createInstance}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateInstanceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#deleteInstance}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteInstanceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#getInstance}. + * @param error Error, if any + * @param [response] Instance + */ + type GetInstanceCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Instance) => void; + } + + /** Properties of a CreateInstanceRequest. */ + interface ICreateInstanceRequest { + + /** CreateInstanceRequest parent */ + parent?: (string|null); + + /** CreateInstanceRequest instanceId */ + instanceId?: (string|null); + + /** CreateInstanceRequest instance */ + instance?: (google.cloud.apigeeregistry.v1.IInstance|null); + } + + /** Represents a CreateInstanceRequest. */ + class CreateInstanceRequest implements ICreateInstanceRequest { + + /** + * Constructs a new CreateInstanceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.ICreateInstanceRequest); + + /** CreateInstanceRequest parent. */ + public parent: string; + + /** CreateInstanceRequest instanceId. */ + public instanceId: string; + + /** CreateInstanceRequest instance. */ + public instance?: (google.cloud.apigeeregistry.v1.IInstance|null); + + /** + * Creates a new CreateInstanceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateInstanceRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.ICreateInstanceRequest): google.cloud.apigeeregistry.v1.CreateInstanceRequest; + + /** + * Encodes the specified CreateInstanceRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateInstanceRequest.verify|verify} messages. + * @param message CreateInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.ICreateInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateInstanceRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateInstanceRequest.verify|verify} messages. + * @param message CreateInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.ICreateInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateInstanceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.CreateInstanceRequest; + + /** + * Decodes a CreateInstanceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.CreateInstanceRequest; + + /** + * Verifies a CreateInstanceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateInstanceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.CreateInstanceRequest; + + /** + * Creates a plain object from a CreateInstanceRequest message. Also converts values to other types if specified. + * @param message CreateInstanceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.CreateInstanceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateInstanceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteInstanceRequest. */ + interface IDeleteInstanceRequest { + + /** DeleteInstanceRequest name */ + name?: (string|null); + } + + /** Represents a DeleteInstanceRequest. */ + class DeleteInstanceRequest implements IDeleteInstanceRequest { + + /** + * Constructs a new DeleteInstanceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IDeleteInstanceRequest); + + /** DeleteInstanceRequest name. */ + public name: string; + + /** + * Creates a new DeleteInstanceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteInstanceRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IDeleteInstanceRequest): google.cloud.apigeeregistry.v1.DeleteInstanceRequest; + + /** + * Encodes the specified DeleteInstanceRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteInstanceRequest.verify|verify} messages. + * @param message DeleteInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IDeleteInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteInstanceRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteInstanceRequest.verify|verify} messages. + * @param message DeleteInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IDeleteInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteInstanceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.DeleteInstanceRequest; + + /** + * Decodes a DeleteInstanceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.DeleteInstanceRequest; + + /** + * Verifies a DeleteInstanceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteInstanceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.DeleteInstanceRequest; + + /** + * Creates a plain object from a DeleteInstanceRequest message. Also converts values to other types if specified. + * @param message DeleteInstanceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.DeleteInstanceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteInstanceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetInstanceRequest. */ + interface IGetInstanceRequest { + + /** GetInstanceRequest name */ + name?: (string|null); + } + + /** Represents a GetInstanceRequest. */ + class GetInstanceRequest implements IGetInstanceRequest { + + /** + * Constructs a new GetInstanceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IGetInstanceRequest); + + /** GetInstanceRequest name. */ + public name: string; + + /** + * Creates a new GetInstanceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetInstanceRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IGetInstanceRequest): google.cloud.apigeeregistry.v1.GetInstanceRequest; + + /** + * Encodes the specified GetInstanceRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetInstanceRequest.verify|verify} messages. + * @param message GetInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IGetInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetInstanceRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetInstanceRequest.verify|verify} messages. + * @param message GetInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IGetInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetInstanceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.GetInstanceRequest; + + /** + * Decodes a GetInstanceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.GetInstanceRequest; + + /** + * Verifies a GetInstanceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetInstanceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.GetInstanceRequest; + + /** + * Creates a plain object from a GetInstanceRequest message. Also converts values to other types if specified. + * @param message GetInstanceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.GetInstanceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetInstanceRequest 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 cancellationRequested */ + cancellationRequested?: (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.apigeeregistry.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 cancellationRequested. */ + public cancellationRequested: 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.apigeeregistry.v1.IOperationMetadata): google.cloud.apigeeregistry.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.apigeeregistry.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.apigeeregistry.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.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.apigeeregistry.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.apigeeregistry.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.apigeeregistry.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.apigeeregistry.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.apigeeregistry.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Instance. */ + interface IInstance { + + /** Instance name */ + name?: (string|null); + + /** Instance createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Instance updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Instance state */ + state?: (google.cloud.apigeeregistry.v1.Instance.State|keyof typeof google.cloud.apigeeregistry.v1.Instance.State|null); + + /** Instance stateMessage */ + stateMessage?: (string|null); + + /** Instance config */ + config?: (google.cloud.apigeeregistry.v1.Instance.IConfig|null); + } + + /** Represents an Instance. */ + class Instance implements IInstance { + + /** + * Constructs a new Instance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IInstance); + + /** Instance name. */ + public name: string; + + /** Instance createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Instance updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Instance state. */ + public state: (google.cloud.apigeeregistry.v1.Instance.State|keyof typeof google.cloud.apigeeregistry.v1.Instance.State); + + /** Instance stateMessage. */ + public stateMessage: string; + + /** Instance config. */ + public config?: (google.cloud.apigeeregistry.v1.Instance.IConfig|null); + + /** + * Creates a new Instance instance using the specified properties. + * @param [properties] Properties to set + * @returns Instance instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IInstance): google.cloud.apigeeregistry.v1.Instance; + + /** + * Encodes the specified Instance message. Does not implicitly {@link google.cloud.apigeeregistry.v1.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Instance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.Instance; + + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.Instance; + + /** + * Verifies an Instance message. + * @param message Plain 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 Instance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Instance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.Instance; + + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @param message Instance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.Instance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Instance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Instance { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + INACTIVE = 1, + CREATING = 2, + ACTIVE = 3, + UPDATING = 4, + DELETING = 5, + FAILED = 6 + } + + /** Properties of a Config. */ + interface IConfig { + + /** Config location */ + location?: (string|null); + + /** Config cmekKeyName */ + cmekKeyName?: (string|null); + } + + /** Represents a Config. */ + class Config implements IConfig { + + /** + * Constructs a new Config. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.Instance.IConfig); + + /** Config location. */ + public location: string; + + /** Config cmekKeyName. */ + public cmekKeyName: string; + + /** + * Creates a new Config instance using the specified properties. + * @param [properties] Properties to set + * @returns Config instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.Instance.IConfig): google.cloud.apigeeregistry.v1.Instance.Config; + + /** + * Encodes the specified Config message. Does not implicitly {@link google.cloud.apigeeregistry.v1.Instance.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.apigeeregistry.v1.Instance.IConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Config message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.Instance.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.apigeeregistry.v1.Instance.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.apigeeregistry.v1.Instance.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.apigeeregistry.v1.Instance.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.apigeeregistry.v1.Instance.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.apigeeregistry.v1.Instance.Config, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Config to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Api. */ + interface IApi { + + /** Api name */ + name?: (string|null); + + /** Api displayName */ + displayName?: (string|null); + + /** Api description */ + description?: (string|null); + + /** Api createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Api updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Api availability */ + availability?: (string|null); + + /** Api recommendedVersion */ + recommendedVersion?: (string|null); + + /** Api recommendedDeployment */ + recommendedDeployment?: (string|null); + + /** Api labels */ + labels?: ({ [k: string]: string }|null); + + /** Api annotations */ + annotations?: ({ [k: string]: string }|null); + } + + /** Represents an Api. */ + class Api implements IApi { + + /** + * Constructs a new Api. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IApi); + + /** Api name. */ + public name: string; + + /** Api displayName. */ + public displayName: string; + + /** Api description. */ + public description: string; + + /** Api createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Api updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Api availability. */ + public availability: string; + + /** Api recommendedVersion. */ + public recommendedVersion: string; + + /** Api recommendedDeployment. */ + public recommendedDeployment: string; + + /** Api labels. */ + public labels: { [k: string]: string }; + + /** Api annotations. */ + public annotations: { [k: string]: string }; + + /** + * Creates a new Api instance using the specified properties. + * @param [properties] Properties to set + * @returns Api instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IApi): google.cloud.apigeeregistry.v1.Api; + + /** + * Encodes the specified Api message. Does not implicitly {@link google.cloud.apigeeregistry.v1.Api.verify|verify} messages. + * @param message Api message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IApi, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Api message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.Api.verify|verify} messages. + * @param message Api message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IApi, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Api message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Api + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.Api; + + /** + * Decodes an Api message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Api + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.Api; + + /** + * Verifies an Api message. + * @param message Plain 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 Api message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Api + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.Api; + + /** + * Creates a plain object from an Api message. Also converts values to other types if specified. + * @param message Api + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.Api, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Api to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ApiVersion. */ + interface IApiVersion { + + /** ApiVersion name */ + name?: (string|null); + + /** ApiVersion displayName */ + displayName?: (string|null); + + /** ApiVersion description */ + description?: (string|null); + + /** ApiVersion createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ApiVersion updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ApiVersion state */ + state?: (string|null); + + /** ApiVersion labels */ + labels?: ({ [k: string]: string }|null); + + /** ApiVersion annotations */ + annotations?: ({ [k: string]: string }|null); + } + + /** Represents an ApiVersion. */ + class ApiVersion implements IApiVersion { + + /** + * Constructs a new ApiVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IApiVersion); + + /** ApiVersion name. */ + public name: string; + + /** ApiVersion displayName. */ + public displayName: string; + + /** ApiVersion description. */ + public description: string; + + /** ApiVersion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ApiVersion updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ApiVersion state. */ + public state: string; + + /** ApiVersion labels. */ + public labels: { [k: string]: string }; + + /** ApiVersion annotations. */ + public annotations: { [k: string]: string }; + + /** + * Creates a new ApiVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns ApiVersion instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IApiVersion): google.cloud.apigeeregistry.v1.ApiVersion; + + /** + * Encodes the specified ApiVersion message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiVersion.verify|verify} messages. + * @param message ApiVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IApiVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApiVersion message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiVersion.verify|verify} messages. + * @param message ApiVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IApiVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApiVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApiVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ApiVersion; + + /** + * Decodes an ApiVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApiVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ApiVersion; + + /** + * Verifies an ApiVersion message. + * @param message Plain 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 ApiVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApiVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ApiVersion; + + /** + * Creates a plain object from an ApiVersion message. Also converts values to other types if specified. + * @param message ApiVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ApiVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApiVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ApiSpec. */ + interface IApiSpec { + + /** ApiSpec name */ + name?: (string|null); + + /** ApiSpec filename */ + filename?: (string|null); + + /** ApiSpec description */ + description?: (string|null); + + /** ApiSpec revisionId */ + revisionId?: (string|null); + + /** ApiSpec createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ApiSpec revisionCreateTime */ + revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** ApiSpec revisionUpdateTime */ + revisionUpdateTime?: (google.protobuf.ITimestamp|null); + + /** ApiSpec mimeType */ + mimeType?: (string|null); + + /** ApiSpec sizeBytes */ + sizeBytes?: (number|null); + + /** ApiSpec hash */ + hash?: (string|null); + + /** ApiSpec sourceUri */ + sourceUri?: (string|null); + + /** ApiSpec contents */ + contents?: (Uint8Array|string|null); + + /** ApiSpec labels */ + labels?: ({ [k: string]: string }|null); + + /** ApiSpec annotations */ + annotations?: ({ [k: string]: string }|null); + } + + /** Represents an ApiSpec. */ + class ApiSpec implements IApiSpec { + + /** + * Constructs a new ApiSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IApiSpec); + + /** ApiSpec name. */ + public name: string; + + /** ApiSpec filename. */ + public filename: string; + + /** ApiSpec description. */ + public description: string; + + /** ApiSpec revisionId. */ + public revisionId: string; + + /** ApiSpec createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ApiSpec revisionCreateTime. */ + public revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** ApiSpec revisionUpdateTime. */ + public revisionUpdateTime?: (google.protobuf.ITimestamp|null); + + /** ApiSpec mimeType. */ + public mimeType: string; + + /** ApiSpec sizeBytes. */ + public sizeBytes: number; + + /** ApiSpec hash. */ + public hash: string; + + /** ApiSpec sourceUri. */ + public sourceUri: string; + + /** ApiSpec contents. */ + public contents: (Uint8Array|string); + + /** ApiSpec labels. */ + public labels: { [k: string]: string }; + + /** ApiSpec annotations. */ + public annotations: { [k: string]: string }; + + /** + * Creates a new ApiSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ApiSpec instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IApiSpec): google.cloud.apigeeregistry.v1.ApiSpec; + + /** + * Encodes the specified ApiSpec message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiSpec.verify|verify} messages. + * @param message ApiSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IApiSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApiSpec message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiSpec.verify|verify} messages. + * @param message ApiSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IApiSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApiSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApiSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ApiSpec; + + /** + * Decodes an ApiSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApiSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ApiSpec; + + /** + * Verifies an ApiSpec message. + * @param message Plain 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 ApiSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApiSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ApiSpec; + + /** + * Creates a plain object from an ApiSpec message. Also converts values to other types if specified. + * @param message ApiSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ApiSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApiSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ApiDeployment. */ + interface IApiDeployment { + + /** ApiDeployment name */ + name?: (string|null); + + /** ApiDeployment displayName */ + displayName?: (string|null); + + /** ApiDeployment description */ + description?: (string|null); + + /** ApiDeployment revisionId */ + revisionId?: (string|null); + + /** ApiDeployment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ApiDeployment revisionCreateTime */ + revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** ApiDeployment revisionUpdateTime */ + revisionUpdateTime?: (google.protobuf.ITimestamp|null); + + /** ApiDeployment apiSpecRevision */ + apiSpecRevision?: (string|null); + + /** ApiDeployment endpointUri */ + endpointUri?: (string|null); + + /** ApiDeployment externalChannelUri */ + externalChannelUri?: (string|null); + + /** ApiDeployment intendedAudience */ + intendedAudience?: (string|null); + + /** ApiDeployment accessGuidance */ + accessGuidance?: (string|null); + + /** ApiDeployment labels */ + labels?: ({ [k: string]: string }|null); + + /** ApiDeployment annotations */ + annotations?: ({ [k: string]: string }|null); + } + + /** Represents an ApiDeployment. */ + class ApiDeployment implements IApiDeployment { + + /** + * Constructs a new ApiDeployment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IApiDeployment); + + /** ApiDeployment name. */ + public name: string; + + /** ApiDeployment displayName. */ + public displayName: string; + + /** ApiDeployment description. */ + public description: string; + + /** ApiDeployment revisionId. */ + public revisionId: string; + + /** ApiDeployment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ApiDeployment revisionCreateTime. */ + public revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** ApiDeployment revisionUpdateTime. */ + public revisionUpdateTime?: (google.protobuf.ITimestamp|null); + + /** ApiDeployment apiSpecRevision. */ + public apiSpecRevision: string; + + /** ApiDeployment endpointUri. */ + public endpointUri: string; + + /** ApiDeployment externalChannelUri. */ + public externalChannelUri: string; + + /** ApiDeployment intendedAudience. */ + public intendedAudience: string; + + /** ApiDeployment accessGuidance. */ + public accessGuidance: string; + + /** ApiDeployment labels. */ + public labels: { [k: string]: string }; + + /** ApiDeployment annotations. */ + public annotations: { [k: string]: string }; + + /** + * Creates a new ApiDeployment instance using the specified properties. + * @param [properties] Properties to set + * @returns ApiDeployment instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IApiDeployment): google.cloud.apigeeregistry.v1.ApiDeployment; + + /** + * Encodes the specified ApiDeployment message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiDeployment.verify|verify} messages. + * @param message ApiDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IApiDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApiDeployment message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiDeployment.verify|verify} messages. + * @param message ApiDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IApiDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApiDeployment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApiDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ApiDeployment; + + /** + * Decodes an ApiDeployment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApiDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ApiDeployment; + + /** + * Verifies an ApiDeployment message. + * @param message Plain 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 ApiDeployment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApiDeployment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ApiDeployment; + + /** + * Creates a plain object from an ApiDeployment message. Also converts values to other types if specified. + * @param message ApiDeployment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ApiDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApiDeployment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Artifact. */ + interface IArtifact { + + /** Artifact name */ + name?: (string|null); + + /** Artifact createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Artifact updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Artifact mimeType */ + mimeType?: (string|null); + + /** Artifact sizeBytes */ + sizeBytes?: (number|null); + + /** Artifact hash */ + hash?: (string|null); + + /** Artifact contents */ + contents?: (Uint8Array|string|null); + } + + /** Represents an Artifact. */ + class Artifact implements IArtifact { + + /** + * Constructs a new Artifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IArtifact); + + /** Artifact name. */ + public name: string; + + /** Artifact createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Artifact updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Artifact mimeType. */ + public mimeType: string; + + /** Artifact sizeBytes. */ + public sizeBytes: number; + + /** Artifact hash. */ + public hash: string; + + /** Artifact contents. */ + public contents: (Uint8Array|string); + + /** + * Creates a new Artifact instance using the specified properties. + * @param [properties] Properties to set + * @returns Artifact instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IArtifact): google.cloud.apigeeregistry.v1.Artifact; + + /** + * Encodes the specified Artifact message. Does not implicitly {@link google.cloud.apigeeregistry.v1.Artifact.verify|verify} messages. + * @param message Artifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Artifact message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.Artifact.verify|verify} messages. + * @param message Artifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Artifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Artifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.Artifact; + + /** + * Decodes an Artifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Artifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.Artifact; + + /** + * Verifies an Artifact message. + * @param message Plain 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 Artifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Artifact + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.Artifact; + + /** + * Creates a plain object from an Artifact message. Also converts values to other types if specified. + * @param message Artifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.Artifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Artifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a Registry */ + class Registry extends $protobuf.rpc.Service { + + /** + * Constructs a new Registry 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 Registry 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): Registry; + + /** + * Calls ListApis. + * @param request ListApisRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListApisResponse + */ + public listApis(request: google.cloud.apigeeregistry.v1.IListApisRequest, callback: google.cloud.apigeeregistry.v1.Registry.ListApisCallback): void; + + /** + * Calls ListApis. + * @param request ListApisRequest message or plain object + * @returns Promise + */ + public listApis(request: google.cloud.apigeeregistry.v1.IListApisRequest): Promise; + + /** + * Calls GetApi. + * @param request GetApiRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Api + */ + public getApi(request: google.cloud.apigeeregistry.v1.IGetApiRequest, callback: google.cloud.apigeeregistry.v1.Registry.GetApiCallback): void; + + /** + * Calls GetApi. + * @param request GetApiRequest message or plain object + * @returns Promise + */ + public getApi(request: google.cloud.apigeeregistry.v1.IGetApiRequest): Promise; + + /** + * Calls CreateApi. + * @param request CreateApiRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Api + */ + public createApi(request: google.cloud.apigeeregistry.v1.ICreateApiRequest, callback: google.cloud.apigeeregistry.v1.Registry.CreateApiCallback): void; + + /** + * Calls CreateApi. + * @param request CreateApiRequest message or plain object + * @returns Promise + */ + public createApi(request: google.cloud.apigeeregistry.v1.ICreateApiRequest): Promise; + + /** + * Calls UpdateApi. + * @param request UpdateApiRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Api + */ + public updateApi(request: google.cloud.apigeeregistry.v1.IUpdateApiRequest, callback: google.cloud.apigeeregistry.v1.Registry.UpdateApiCallback): void; + + /** + * Calls UpdateApi. + * @param request UpdateApiRequest message or plain object + * @returns Promise + */ + public updateApi(request: google.cloud.apigeeregistry.v1.IUpdateApiRequest): Promise; + + /** + * Calls DeleteApi. + * @param request DeleteApiRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteApi(request: google.cloud.apigeeregistry.v1.IDeleteApiRequest, callback: google.cloud.apigeeregistry.v1.Registry.DeleteApiCallback): void; + + /** + * Calls DeleteApi. + * @param request DeleteApiRequest message or plain object + * @returns Promise + */ + public deleteApi(request: google.cloud.apigeeregistry.v1.IDeleteApiRequest): Promise; + + /** + * Calls ListApiVersions. + * @param request ListApiVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListApiVersionsResponse + */ + public listApiVersions(request: google.cloud.apigeeregistry.v1.IListApiVersionsRequest, callback: google.cloud.apigeeregistry.v1.Registry.ListApiVersionsCallback): void; + + /** + * Calls ListApiVersions. + * @param request ListApiVersionsRequest message or plain object + * @returns Promise + */ + public listApiVersions(request: google.cloud.apigeeregistry.v1.IListApiVersionsRequest): Promise; + + /** + * Calls GetApiVersion. + * @param request GetApiVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiVersion + */ + public getApiVersion(request: google.cloud.apigeeregistry.v1.IGetApiVersionRequest, callback: google.cloud.apigeeregistry.v1.Registry.GetApiVersionCallback): void; + + /** + * Calls GetApiVersion. + * @param request GetApiVersionRequest message or plain object + * @returns Promise + */ + public getApiVersion(request: google.cloud.apigeeregistry.v1.IGetApiVersionRequest): Promise; + + /** + * Calls CreateApiVersion. + * @param request CreateApiVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiVersion + */ + public createApiVersion(request: google.cloud.apigeeregistry.v1.ICreateApiVersionRequest, callback: google.cloud.apigeeregistry.v1.Registry.CreateApiVersionCallback): void; + + /** + * Calls CreateApiVersion. + * @param request CreateApiVersionRequest message or plain object + * @returns Promise + */ + public createApiVersion(request: google.cloud.apigeeregistry.v1.ICreateApiVersionRequest): Promise; + + /** + * Calls UpdateApiVersion. + * @param request UpdateApiVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiVersion + */ + public updateApiVersion(request: google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest, callback: google.cloud.apigeeregistry.v1.Registry.UpdateApiVersionCallback): void; + + /** + * Calls UpdateApiVersion. + * @param request UpdateApiVersionRequest message or plain object + * @returns Promise + */ + public updateApiVersion(request: google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest): Promise; + + /** + * Calls DeleteApiVersion. + * @param request DeleteApiVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteApiVersion(request: google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest, callback: google.cloud.apigeeregistry.v1.Registry.DeleteApiVersionCallback): void; + + /** + * Calls DeleteApiVersion. + * @param request DeleteApiVersionRequest message or plain object + * @returns Promise + */ + public deleteApiVersion(request: google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest): Promise; + + /** + * Calls ListApiSpecs. + * @param request ListApiSpecsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListApiSpecsResponse + */ + public listApiSpecs(request: google.cloud.apigeeregistry.v1.IListApiSpecsRequest, callback: google.cloud.apigeeregistry.v1.Registry.ListApiSpecsCallback): void; + + /** + * Calls ListApiSpecs. + * @param request ListApiSpecsRequest message or plain object + * @returns Promise + */ + public listApiSpecs(request: google.cloud.apigeeregistry.v1.IListApiSpecsRequest): Promise; + + /** + * Calls GetApiSpec. + * @param request GetApiSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiSpec + */ + public getApiSpec(request: google.cloud.apigeeregistry.v1.IGetApiSpecRequest, callback: google.cloud.apigeeregistry.v1.Registry.GetApiSpecCallback): void; + + /** + * Calls GetApiSpec. + * @param request GetApiSpecRequest message or plain object + * @returns Promise + */ + public getApiSpec(request: google.cloud.apigeeregistry.v1.IGetApiSpecRequest): Promise; + + /** + * Calls GetApiSpecContents. + * @param request GetApiSpecContentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public getApiSpecContents(request: google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest, callback: google.cloud.apigeeregistry.v1.Registry.GetApiSpecContentsCallback): void; + + /** + * Calls GetApiSpecContents. + * @param request GetApiSpecContentsRequest message or plain object + * @returns Promise + */ + public getApiSpecContents(request: google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest): Promise; + + /** + * Calls CreateApiSpec. + * @param request CreateApiSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiSpec + */ + public createApiSpec(request: google.cloud.apigeeregistry.v1.ICreateApiSpecRequest, callback: google.cloud.apigeeregistry.v1.Registry.CreateApiSpecCallback): void; + + /** + * Calls CreateApiSpec. + * @param request CreateApiSpecRequest message or plain object + * @returns Promise + */ + public createApiSpec(request: google.cloud.apigeeregistry.v1.ICreateApiSpecRequest): Promise; + + /** + * Calls UpdateApiSpec. + * @param request UpdateApiSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiSpec + */ + public updateApiSpec(request: google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest, callback: google.cloud.apigeeregistry.v1.Registry.UpdateApiSpecCallback): void; + + /** + * Calls UpdateApiSpec. + * @param request UpdateApiSpecRequest message or plain object + * @returns Promise + */ + public updateApiSpec(request: google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest): Promise; + + /** + * Calls DeleteApiSpec. + * @param request DeleteApiSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteApiSpec(request: google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest, callback: google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecCallback): void; + + /** + * Calls DeleteApiSpec. + * @param request DeleteApiSpecRequest message or plain object + * @returns Promise + */ + public deleteApiSpec(request: google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest): Promise; + + /** + * Calls TagApiSpecRevision. + * @param request TagApiSpecRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiSpec + */ + public tagApiSpecRevision(request: google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest, callback: google.cloud.apigeeregistry.v1.Registry.TagApiSpecRevisionCallback): void; + + /** + * Calls TagApiSpecRevision. + * @param request TagApiSpecRevisionRequest message or plain object + * @returns Promise + */ + public tagApiSpecRevision(request: google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest): Promise; + + /** + * Calls ListApiSpecRevisions. + * @param request ListApiSpecRevisionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListApiSpecRevisionsResponse + */ + public listApiSpecRevisions(request: google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, callback: google.cloud.apigeeregistry.v1.Registry.ListApiSpecRevisionsCallback): void; + + /** + * Calls ListApiSpecRevisions. + * @param request ListApiSpecRevisionsRequest message or plain object + * @returns Promise + */ + public listApiSpecRevisions(request: google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest): Promise; + + /** + * Calls RollbackApiSpec. + * @param request RollbackApiSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiSpec + */ + public rollbackApiSpec(request: google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest, callback: google.cloud.apigeeregistry.v1.Registry.RollbackApiSpecCallback): void; + + /** + * Calls RollbackApiSpec. + * @param request RollbackApiSpecRequest message or plain object + * @returns Promise + */ + public rollbackApiSpec(request: google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest): Promise; + + /** + * Calls DeleteApiSpecRevision. + * @param request DeleteApiSpecRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiSpec + */ + public deleteApiSpecRevision(request: google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest, callback: google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecRevisionCallback): void; + + /** + * Calls DeleteApiSpecRevision. + * @param request DeleteApiSpecRevisionRequest message or plain object + * @returns Promise + */ + public deleteApiSpecRevision(request: google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest): Promise; + + /** + * Calls ListApiDeployments. + * @param request ListApiDeploymentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListApiDeploymentsResponse + */ + public listApiDeployments(request: google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, callback: google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentsCallback): void; + + /** + * Calls ListApiDeployments. + * @param request ListApiDeploymentsRequest message or plain object + * @returns Promise + */ + public listApiDeployments(request: google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest): Promise; + + /** + * Calls GetApiDeployment. + * @param request GetApiDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiDeployment + */ + public getApiDeployment(request: google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest, callback: google.cloud.apigeeregistry.v1.Registry.GetApiDeploymentCallback): void; + + /** + * Calls GetApiDeployment. + * @param request GetApiDeploymentRequest message or plain object + * @returns Promise + */ + public getApiDeployment(request: google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest): Promise; + + /** + * Calls CreateApiDeployment. + * @param request CreateApiDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiDeployment + */ + public createApiDeployment(request: google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest, callback: google.cloud.apigeeregistry.v1.Registry.CreateApiDeploymentCallback): void; + + /** + * Calls CreateApiDeployment. + * @param request CreateApiDeploymentRequest message or plain object + * @returns Promise + */ + public createApiDeployment(request: google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest): Promise; + + /** + * Calls UpdateApiDeployment. + * @param request UpdateApiDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiDeployment + */ + public updateApiDeployment(request: google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest, callback: google.cloud.apigeeregistry.v1.Registry.UpdateApiDeploymentCallback): void; + + /** + * Calls UpdateApiDeployment. + * @param request UpdateApiDeploymentRequest message or plain object + * @returns Promise + */ + public updateApiDeployment(request: google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest): Promise; + + /** + * Calls DeleteApiDeployment. + * @param request DeleteApiDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteApiDeployment(request: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest, callback: google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentCallback): void; + + /** + * Calls DeleteApiDeployment. + * @param request DeleteApiDeploymentRequest message or plain object + * @returns Promise + */ + public deleteApiDeployment(request: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest): Promise; + + /** + * Calls TagApiDeploymentRevision. + * @param request TagApiDeploymentRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiDeployment + */ + public tagApiDeploymentRevision(request: google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest, callback: google.cloud.apigeeregistry.v1.Registry.TagApiDeploymentRevisionCallback): void; + + /** + * Calls TagApiDeploymentRevision. + * @param request TagApiDeploymentRevisionRequest message or plain object + * @returns Promise + */ + public tagApiDeploymentRevision(request: google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest): Promise; + + /** + * Calls ListApiDeploymentRevisions. + * @param request ListApiDeploymentRevisionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListApiDeploymentRevisionsResponse + */ + public listApiDeploymentRevisions(request: google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, callback: google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentRevisionsCallback): void; + + /** + * Calls ListApiDeploymentRevisions. + * @param request ListApiDeploymentRevisionsRequest message or plain object + * @returns Promise + */ + public listApiDeploymentRevisions(request: google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest): Promise; + + /** + * Calls RollbackApiDeployment. + * @param request RollbackApiDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiDeployment + */ + public rollbackApiDeployment(request: google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest, callback: google.cloud.apigeeregistry.v1.Registry.RollbackApiDeploymentCallback): void; + + /** + * Calls RollbackApiDeployment. + * @param request RollbackApiDeploymentRequest message or plain object + * @returns Promise + */ + public rollbackApiDeployment(request: google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest): Promise; + + /** + * Calls DeleteApiDeploymentRevision. + * @param request DeleteApiDeploymentRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApiDeployment + */ + public deleteApiDeploymentRevision(request: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest, callback: google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentRevisionCallback): void; + + /** + * Calls DeleteApiDeploymentRevision. + * @param request DeleteApiDeploymentRevisionRequest message or plain object + * @returns Promise + */ + public deleteApiDeploymentRevision(request: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest): Promise; + + /** + * Calls ListArtifacts. + * @param request ListArtifactsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListArtifactsResponse + */ + public listArtifacts(request: google.cloud.apigeeregistry.v1.IListArtifactsRequest, callback: google.cloud.apigeeregistry.v1.Registry.ListArtifactsCallback): void; + + /** + * Calls ListArtifacts. + * @param request ListArtifactsRequest message or plain object + * @returns Promise + */ + public listArtifacts(request: google.cloud.apigeeregistry.v1.IListArtifactsRequest): Promise; + + /** + * Calls GetArtifact. + * @param request GetArtifactRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Artifact + */ + public getArtifact(request: google.cloud.apigeeregistry.v1.IGetArtifactRequest, callback: google.cloud.apigeeregistry.v1.Registry.GetArtifactCallback): void; + + /** + * Calls GetArtifact. + * @param request GetArtifactRequest message or plain object + * @returns Promise + */ + public getArtifact(request: google.cloud.apigeeregistry.v1.IGetArtifactRequest): Promise; + + /** + * Calls GetArtifactContents. + * @param request GetArtifactContentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public getArtifactContents(request: google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest, callback: google.cloud.apigeeregistry.v1.Registry.GetArtifactContentsCallback): void; + + /** + * Calls GetArtifactContents. + * @param request GetArtifactContentsRequest message or plain object + * @returns Promise + */ + public getArtifactContents(request: google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest): Promise; + + /** + * Calls CreateArtifact. + * @param request CreateArtifactRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Artifact + */ + public createArtifact(request: google.cloud.apigeeregistry.v1.ICreateArtifactRequest, callback: google.cloud.apigeeregistry.v1.Registry.CreateArtifactCallback): void; + + /** + * Calls CreateArtifact. + * @param request CreateArtifactRequest message or plain object + * @returns Promise + */ + public createArtifact(request: google.cloud.apigeeregistry.v1.ICreateArtifactRequest): Promise; + + /** + * Calls ReplaceArtifact. + * @param request ReplaceArtifactRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Artifact + */ + public replaceArtifact(request: google.cloud.apigeeregistry.v1.IReplaceArtifactRequest, callback: google.cloud.apigeeregistry.v1.Registry.ReplaceArtifactCallback): void; + + /** + * Calls ReplaceArtifact. + * @param request ReplaceArtifactRequest message or plain object + * @returns Promise + */ + public replaceArtifact(request: google.cloud.apigeeregistry.v1.IReplaceArtifactRequest): Promise; + + /** + * Calls DeleteArtifact. + * @param request DeleteArtifactRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteArtifact(request: google.cloud.apigeeregistry.v1.IDeleteArtifactRequest, callback: google.cloud.apigeeregistry.v1.Registry.DeleteArtifactCallback): void; + + /** + * Calls DeleteArtifact. + * @param request DeleteArtifactRequest message or plain object + * @returns Promise + */ + public deleteArtifact(request: google.cloud.apigeeregistry.v1.IDeleteArtifactRequest): Promise; + } + + namespace Registry { + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApis}. + * @param error Error, if any + * @param [response] ListApisResponse + */ + type ListApisCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApisResponse) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApi}. + * @param error Error, if any + * @param [response] Api + */ + type GetApiCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Api) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApi}. + * @param error Error, if any + * @param [response] Api + */ + type CreateApiCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Api) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApi}. + * @param error Error, if any + * @param [response] Api + */ + type UpdateApiCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Api) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApi}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteApiCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiVersions}. + * @param error Error, if any + * @param [response] ListApiVersionsResponse + */ + type ListApiVersionsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApiVersionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiVersion}. + * @param error Error, if any + * @param [response] ApiVersion + */ + type GetApiVersionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiVersion) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiVersion}. + * @param error Error, if any + * @param [response] ApiVersion + */ + type CreateApiVersionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiVersion) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiVersion}. + * @param error Error, if any + * @param [response] ApiVersion + */ + type UpdateApiVersionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiVersion) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiVersion}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteApiVersionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiSpecs}. + * @param error Error, if any + * @param [response] ListApiSpecsResponse + */ + type ListApiSpecsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApiSpecsResponse) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiSpec}. + * @param error Error, if any + * @param [response] ApiSpec + */ + type GetApiSpecCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiSpecContents}. + * @param error Error, if any + * @param [response] HttpBody + */ + type GetApiSpecContentsCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiSpec}. + * @param error Error, if any + * @param [response] ApiSpec + */ + type CreateApiSpecCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiSpec}. + * @param error Error, if any + * @param [response] ApiSpec + */ + type UpdateApiSpecCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiSpec}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteApiSpecCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#tagApiSpecRevision}. + * @param error Error, if any + * @param [response] ApiSpec + */ + type TagApiSpecRevisionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiSpecRevisions}. + * @param error Error, if any + * @param [response] ListApiSpecRevisionsResponse + */ + type ListApiSpecRevisionsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#rollbackApiSpec}. + * @param error Error, if any + * @param [response] ApiSpec + */ + type RollbackApiSpecCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiSpecRevision}. + * @param error Error, if any + * @param [response] ApiSpec + */ + type DeleteApiSpecRevisionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiDeployments}. + * @param error Error, if any + * @param [response] ListApiDeploymentsResponse + */ + type ListApiDeploymentsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiDeployment}. + * @param error Error, if any + * @param [response] ApiDeployment + */ + type GetApiDeploymentCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiDeployment}. + * @param error Error, if any + * @param [response] ApiDeployment + */ + type CreateApiDeploymentCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiDeployment}. + * @param error Error, if any + * @param [response] ApiDeployment + */ + type UpdateApiDeploymentCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiDeployment}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteApiDeploymentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#tagApiDeploymentRevision}. + * @param error Error, if any + * @param [response] ApiDeployment + */ + type TagApiDeploymentRevisionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiDeploymentRevisions}. + * @param error Error, if any + * @param [response] ListApiDeploymentRevisionsResponse + */ + type ListApiDeploymentRevisionsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#rollbackApiDeployment}. + * @param error Error, if any + * @param [response] ApiDeployment + */ + type RollbackApiDeploymentCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiDeploymentRevision}. + * @param error Error, if any + * @param [response] ApiDeployment + */ + type DeleteApiDeploymentRevisionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listArtifacts}. + * @param error Error, if any + * @param [response] ListArtifactsResponse + */ + type ListArtifactsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListArtifactsResponse) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getArtifact}. + * @param error Error, if any + * @param [response] Artifact + */ + type GetArtifactCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Artifact) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getArtifactContents}. + * @param error Error, if any + * @param [response] HttpBody + */ + type GetArtifactContentsCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createArtifact}. + * @param error Error, if any + * @param [response] Artifact + */ + type CreateArtifactCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Artifact) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#replaceArtifact}. + * @param error Error, if any + * @param [response] Artifact + */ + type ReplaceArtifactCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Artifact) => void; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteArtifact}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteArtifactCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a ListApisRequest. */ + interface IListApisRequest { + + /** ListApisRequest parent */ + parent?: (string|null); + + /** ListApisRequest pageSize */ + pageSize?: (number|null); + + /** ListApisRequest pageToken */ + pageToken?: (string|null); + + /** ListApisRequest filter */ + filter?: (string|null); + } + + /** Represents a ListApisRequest. */ + class ListApisRequest implements IListApisRequest { + + /** + * Constructs a new ListApisRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApisRequest); + + /** ListApisRequest parent. */ + public parent: string; + + /** ListApisRequest pageSize. */ + public pageSize: number; + + /** ListApisRequest pageToken. */ + public pageToken: string; + + /** ListApisRequest filter. */ + public filter: string; + + /** + * Creates a new ListApisRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApisRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApisRequest): google.cloud.apigeeregistry.v1.ListApisRequest; + + /** + * Encodes the specified ListApisRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApisRequest.verify|verify} messages. + * @param message ListApisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApisRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApisRequest.verify|verify} messages. + * @param message ListApisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApisRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApisRequest; + + /** + * Decodes a ListApisRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApisRequest; + + /** + * Verifies a ListApisRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApisRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApisRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApisRequest; + + /** + * Creates a plain object from a ListApisRequest message. Also converts values to other types if specified. + * @param message ListApisRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApisRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListApisResponse. */ + interface IListApisResponse { + + /** ListApisResponse apis */ + apis?: (google.cloud.apigeeregistry.v1.IApi[]|null); + + /** ListApisResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListApisResponse. */ + class ListApisResponse implements IListApisResponse { + + /** + * Constructs a new ListApisResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApisResponse); + + /** ListApisResponse apis. */ + public apis: google.cloud.apigeeregistry.v1.IApi[]; + + /** ListApisResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListApisResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApisResponse instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApisResponse): google.cloud.apigeeregistry.v1.ListApisResponse; + + /** + * Encodes the specified ListApisResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApisResponse.verify|verify} messages. + * @param message ListApisResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApisResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApisResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApisResponse.verify|verify} messages. + * @param message ListApisResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApisResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApisResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApisResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApisResponse; + + /** + * Decodes a ListApisResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApisResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApisResponse; + + /** + * Verifies a ListApisResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApisResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApisResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApisResponse; + + /** + * Creates a plain object from a ListApisResponse message. Also converts values to other types if specified. + * @param message ListApisResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApisResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApisResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetApiRequest. */ + interface IGetApiRequest { + + /** GetApiRequest name */ + name?: (string|null); + } + + /** Represents a GetApiRequest. */ + class GetApiRequest implements IGetApiRequest { + + /** + * Constructs a new GetApiRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IGetApiRequest); + + /** GetApiRequest name. */ + public name: string; + + /** + * Creates a new GetApiRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetApiRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IGetApiRequest): google.cloud.apigeeregistry.v1.GetApiRequest; + + /** + * Encodes the specified GetApiRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiRequest.verify|verify} messages. + * @param message GetApiRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IGetApiRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetApiRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiRequest.verify|verify} messages. + * @param message GetApiRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IGetApiRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetApiRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.GetApiRequest; + + /** + * Decodes a GetApiRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.GetApiRequest; + + /** + * Verifies a GetApiRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetApiRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetApiRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.GetApiRequest; + + /** + * Creates a plain object from a GetApiRequest message. Also converts values to other types if specified. + * @param message GetApiRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.GetApiRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetApiRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateApiRequest. */ + interface ICreateApiRequest { + + /** CreateApiRequest parent */ + parent?: (string|null); + + /** CreateApiRequest api */ + api?: (google.cloud.apigeeregistry.v1.IApi|null); + + /** CreateApiRequest apiId */ + apiId?: (string|null); + } + + /** Represents a CreateApiRequest. */ + class CreateApiRequest implements ICreateApiRequest { + + /** + * Constructs a new CreateApiRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.ICreateApiRequest); + + /** CreateApiRequest parent. */ + public parent: string; + + /** CreateApiRequest api. */ + public api?: (google.cloud.apigeeregistry.v1.IApi|null); + + /** CreateApiRequest apiId. */ + public apiId: string; + + /** + * Creates a new CreateApiRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateApiRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.ICreateApiRequest): google.cloud.apigeeregistry.v1.CreateApiRequest; + + /** + * Encodes the specified CreateApiRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiRequest.verify|verify} messages. + * @param message CreateApiRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.ICreateApiRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateApiRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiRequest.verify|verify} messages. + * @param message CreateApiRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.ICreateApiRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateApiRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.CreateApiRequest; + + /** + * Decodes a CreateApiRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.CreateApiRequest; + + /** + * Verifies a CreateApiRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateApiRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateApiRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.CreateApiRequest; + + /** + * Creates a plain object from a CreateApiRequest message. Also converts values to other types if specified. + * @param message CreateApiRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.CreateApiRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateApiRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateApiRequest. */ + interface IUpdateApiRequest { + + /** UpdateApiRequest api */ + api?: (google.cloud.apigeeregistry.v1.IApi|null); + + /** UpdateApiRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateApiRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents an UpdateApiRequest. */ + class UpdateApiRequest implements IUpdateApiRequest { + + /** + * Constructs a new UpdateApiRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IUpdateApiRequest); + + /** UpdateApiRequest api. */ + public api?: (google.cloud.apigeeregistry.v1.IApi|null); + + /** UpdateApiRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateApiRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new UpdateApiRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateApiRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IUpdateApiRequest): google.cloud.apigeeregistry.v1.UpdateApiRequest; + + /** + * Encodes the specified UpdateApiRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiRequest.verify|verify} messages. + * @param message UpdateApiRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IUpdateApiRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateApiRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiRequest.verify|verify} messages. + * @param message UpdateApiRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IUpdateApiRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateApiRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.UpdateApiRequest; + + /** + * Decodes an UpdateApiRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.UpdateApiRequest; + + /** + * Verifies an UpdateApiRequest message. + * @param message Plain 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 UpdateApiRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateApiRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.UpdateApiRequest; + + /** + * Creates a plain object from an UpdateApiRequest message. Also converts values to other types if specified. + * @param message UpdateApiRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.UpdateApiRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateApiRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteApiRequest. */ + interface IDeleteApiRequest { + + /** DeleteApiRequest name */ + name?: (string|null); + } + + /** Represents a DeleteApiRequest. */ + class DeleteApiRequest implements IDeleteApiRequest { + + /** + * Constructs a new DeleteApiRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IDeleteApiRequest); + + /** DeleteApiRequest name. */ + public name: string; + + /** + * Creates a new DeleteApiRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteApiRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IDeleteApiRequest): google.cloud.apigeeregistry.v1.DeleteApiRequest; + + /** + * Encodes the specified DeleteApiRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiRequest.verify|verify} messages. + * @param message DeleteApiRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IDeleteApiRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteApiRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiRequest.verify|verify} messages. + * @param message DeleteApiRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IDeleteApiRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteApiRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.DeleteApiRequest; + + /** + * Decodes a DeleteApiRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.DeleteApiRequest; + + /** + * Verifies a DeleteApiRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteApiRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteApiRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.DeleteApiRequest; + + /** + * Creates a plain object from a DeleteApiRequest message. Also converts values to other types if specified. + * @param message DeleteApiRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.DeleteApiRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteApiRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListApiVersionsRequest. */ + interface IListApiVersionsRequest { + + /** ListApiVersionsRequest parent */ + parent?: (string|null); + + /** ListApiVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListApiVersionsRequest pageToken */ + pageToken?: (string|null); + + /** ListApiVersionsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListApiVersionsRequest. */ + class ListApiVersionsRequest implements IListApiVersionsRequest { + + /** + * Constructs a new ListApiVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApiVersionsRequest); + + /** ListApiVersionsRequest parent. */ + public parent: string; + + /** ListApiVersionsRequest pageSize. */ + public pageSize: number; + + /** ListApiVersionsRequest pageToken. */ + public pageToken: string; + + /** ListApiVersionsRequest filter. */ + public filter: string; + + /** + * Creates a new ListApiVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApiVersionsRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApiVersionsRequest): google.cloud.apigeeregistry.v1.ListApiVersionsRequest; + + /** + * Encodes the specified ListApiVersionsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiVersionsRequest.verify|verify} messages. + * @param message ListApiVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApiVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApiVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiVersionsRequest.verify|verify} messages. + * @param message ListApiVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApiVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApiVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApiVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApiVersionsRequest; + + /** + * Decodes a ListApiVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApiVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApiVersionsRequest; + + /** + * Verifies a ListApiVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApiVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApiVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApiVersionsRequest; + + /** + * Creates a plain object from a ListApiVersionsRequest message. Also converts values to other types if specified. + * @param message ListApiVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApiVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApiVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListApiVersionsResponse. */ + interface IListApiVersionsResponse { + + /** ListApiVersionsResponse apiVersions */ + apiVersions?: (google.cloud.apigeeregistry.v1.IApiVersion[]|null); + + /** ListApiVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListApiVersionsResponse. */ + class ListApiVersionsResponse implements IListApiVersionsResponse { + + /** + * Constructs a new ListApiVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApiVersionsResponse); + + /** ListApiVersionsResponse apiVersions. */ + public apiVersions: google.cloud.apigeeregistry.v1.IApiVersion[]; + + /** ListApiVersionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListApiVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApiVersionsResponse instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApiVersionsResponse): google.cloud.apigeeregistry.v1.ListApiVersionsResponse; + + /** + * Encodes the specified ListApiVersionsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiVersionsResponse.verify|verify} messages. + * @param message ListApiVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApiVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApiVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiVersionsResponse.verify|verify} messages. + * @param message ListApiVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApiVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApiVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApiVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApiVersionsResponse; + + /** + * Decodes a ListApiVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApiVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApiVersionsResponse; + + /** + * Verifies a ListApiVersionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApiVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApiVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApiVersionsResponse; + + /** + * Creates a plain object from a ListApiVersionsResponse message. Also converts values to other types if specified. + * @param message ListApiVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApiVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApiVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetApiVersionRequest. */ + interface IGetApiVersionRequest { + + /** GetApiVersionRequest name */ + name?: (string|null); + } + + /** Represents a GetApiVersionRequest. */ + class GetApiVersionRequest implements IGetApiVersionRequest { + + /** + * Constructs a new GetApiVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IGetApiVersionRequest); + + /** GetApiVersionRequest name. */ + public name: string; + + /** + * Creates a new GetApiVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetApiVersionRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IGetApiVersionRequest): google.cloud.apigeeregistry.v1.GetApiVersionRequest; + + /** + * Encodes the specified GetApiVersionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiVersionRequest.verify|verify} messages. + * @param message GetApiVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IGetApiVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetApiVersionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiVersionRequest.verify|verify} messages. + * @param message GetApiVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IGetApiVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetApiVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.GetApiVersionRequest; + + /** + * Decodes a GetApiVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.GetApiVersionRequest; + + /** + * Verifies a GetApiVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetApiVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetApiVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.GetApiVersionRequest; + + /** + * Creates a plain object from a GetApiVersionRequest message. Also converts values to other types if specified. + * @param message GetApiVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.GetApiVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetApiVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateApiVersionRequest. */ + interface ICreateApiVersionRequest { + + /** CreateApiVersionRequest parent */ + parent?: (string|null); + + /** CreateApiVersionRequest apiVersion */ + apiVersion?: (google.cloud.apigeeregistry.v1.IApiVersion|null); + + /** CreateApiVersionRequest apiVersionId */ + apiVersionId?: (string|null); + } + + /** Represents a CreateApiVersionRequest. */ + class CreateApiVersionRequest implements ICreateApiVersionRequest { + + /** + * Constructs a new CreateApiVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.ICreateApiVersionRequest); + + /** CreateApiVersionRequest parent. */ + public parent: string; + + /** CreateApiVersionRequest apiVersion. */ + public apiVersion?: (google.cloud.apigeeregistry.v1.IApiVersion|null); + + /** CreateApiVersionRequest apiVersionId. */ + public apiVersionId: string; + + /** + * Creates a new CreateApiVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateApiVersionRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.ICreateApiVersionRequest): google.cloud.apigeeregistry.v1.CreateApiVersionRequest; + + /** + * Encodes the specified CreateApiVersionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiVersionRequest.verify|verify} messages. + * @param message CreateApiVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.ICreateApiVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateApiVersionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiVersionRequest.verify|verify} messages. + * @param message CreateApiVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.ICreateApiVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateApiVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.CreateApiVersionRequest; + + /** + * Decodes a CreateApiVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.CreateApiVersionRequest; + + /** + * Verifies a CreateApiVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateApiVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateApiVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.CreateApiVersionRequest; + + /** + * Creates a plain object from a CreateApiVersionRequest message. Also converts values to other types if specified. + * @param message CreateApiVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.CreateApiVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateApiVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateApiVersionRequest. */ + interface IUpdateApiVersionRequest { + + /** UpdateApiVersionRequest apiVersion */ + apiVersion?: (google.cloud.apigeeregistry.v1.IApiVersion|null); + + /** UpdateApiVersionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateApiVersionRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents an UpdateApiVersionRequest. */ + class UpdateApiVersionRequest implements IUpdateApiVersionRequest { + + /** + * Constructs a new UpdateApiVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest); + + /** UpdateApiVersionRequest apiVersion. */ + public apiVersion?: (google.cloud.apigeeregistry.v1.IApiVersion|null); + + /** UpdateApiVersionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateApiVersionRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new UpdateApiVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateApiVersionRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest): google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; + + /** + * Encodes the specified UpdateApiVersionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.verify|verify} messages. + * @param message UpdateApiVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateApiVersionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.verify|verify} messages. + * @param message UpdateApiVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateApiVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; + + /** + * Decodes an UpdateApiVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; + + /** + * Verifies an UpdateApiVersionRequest message. + * @param message Plain 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 UpdateApiVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateApiVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.UpdateApiVersionRequest; + + /** + * Creates a plain object from an UpdateApiVersionRequest message. Also converts values to other types if specified. + * @param message UpdateApiVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.UpdateApiVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateApiVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteApiVersionRequest. */ + interface IDeleteApiVersionRequest { + + /** DeleteApiVersionRequest name */ + name?: (string|null); + } + + /** Represents a DeleteApiVersionRequest. */ + class DeleteApiVersionRequest implements IDeleteApiVersionRequest { + + /** + * Constructs a new DeleteApiVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest); + + /** DeleteApiVersionRequest name. */ + public name: string; + + /** + * Creates a new DeleteApiVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteApiVersionRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest): google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; + + /** + * Encodes the specified DeleteApiVersionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.verify|verify} messages. + * @param message DeleteApiVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteApiVersionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.verify|verify} messages. + * @param message DeleteApiVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteApiVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; + + /** + * Decodes a DeleteApiVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; + + /** + * Verifies a DeleteApiVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteApiVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteApiVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.DeleteApiVersionRequest; + + /** + * Creates a plain object from a DeleteApiVersionRequest message. Also converts values to other types if specified. + * @param message DeleteApiVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.DeleteApiVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteApiVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListApiSpecsRequest. */ + interface IListApiSpecsRequest { + + /** ListApiSpecsRequest parent */ + parent?: (string|null); + + /** ListApiSpecsRequest pageSize */ + pageSize?: (number|null); + + /** ListApiSpecsRequest pageToken */ + pageToken?: (string|null); + + /** ListApiSpecsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListApiSpecsRequest. */ + class ListApiSpecsRequest implements IListApiSpecsRequest { + + /** + * Constructs a new ListApiSpecsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApiSpecsRequest); + + /** ListApiSpecsRequest parent. */ + public parent: string; + + /** ListApiSpecsRequest pageSize. */ + public pageSize: number; + + /** ListApiSpecsRequest pageToken. */ + public pageToken: string; + + /** ListApiSpecsRequest filter. */ + public filter: string; + + /** + * Creates a new ListApiSpecsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApiSpecsRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApiSpecsRequest): google.cloud.apigeeregistry.v1.ListApiSpecsRequest; + + /** + * Encodes the specified ListApiSpecsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecsRequest.verify|verify} messages. + * @param message ListApiSpecsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApiSpecsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApiSpecsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecsRequest.verify|verify} messages. + * @param message ListApiSpecsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApiSpecsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApiSpecsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApiSpecsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApiSpecsRequest; + + /** + * Decodes a ListApiSpecsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApiSpecsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApiSpecsRequest; + + /** + * Verifies a ListApiSpecsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApiSpecsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApiSpecsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApiSpecsRequest; + + /** + * Creates a plain object from a ListApiSpecsRequest message. Also converts values to other types if specified. + * @param message ListApiSpecsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApiSpecsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApiSpecsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListApiSpecsResponse. */ + interface IListApiSpecsResponse { + + /** ListApiSpecsResponse apiSpecs */ + apiSpecs?: (google.cloud.apigeeregistry.v1.IApiSpec[]|null); + + /** ListApiSpecsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListApiSpecsResponse. */ + class ListApiSpecsResponse implements IListApiSpecsResponse { + + /** + * Constructs a new ListApiSpecsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApiSpecsResponse); + + /** ListApiSpecsResponse apiSpecs. */ + public apiSpecs: google.cloud.apigeeregistry.v1.IApiSpec[]; + + /** ListApiSpecsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListApiSpecsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApiSpecsResponse instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApiSpecsResponse): google.cloud.apigeeregistry.v1.ListApiSpecsResponse; + + /** + * Encodes the specified ListApiSpecsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecsResponse.verify|verify} messages. + * @param message ListApiSpecsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApiSpecsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApiSpecsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecsResponse.verify|verify} messages. + * @param message ListApiSpecsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApiSpecsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApiSpecsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApiSpecsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApiSpecsResponse; + + /** + * Decodes a ListApiSpecsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApiSpecsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApiSpecsResponse; + + /** + * Verifies a ListApiSpecsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApiSpecsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApiSpecsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApiSpecsResponse; + + /** + * Creates a plain object from a ListApiSpecsResponse message. Also converts values to other types if specified. + * @param message ListApiSpecsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApiSpecsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApiSpecsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetApiSpecRequest. */ + interface IGetApiSpecRequest { + + /** GetApiSpecRequest name */ + name?: (string|null); + } + + /** Represents a GetApiSpecRequest. */ + class GetApiSpecRequest implements IGetApiSpecRequest { + + /** + * Constructs a new GetApiSpecRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IGetApiSpecRequest); + + /** GetApiSpecRequest name. */ + public name: string; + + /** + * Creates a new GetApiSpecRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetApiSpecRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IGetApiSpecRequest): google.cloud.apigeeregistry.v1.GetApiSpecRequest; + + /** + * Encodes the specified GetApiSpecRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiSpecRequest.verify|verify} messages. + * @param message GetApiSpecRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IGetApiSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetApiSpecRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiSpecRequest.verify|verify} messages. + * @param message GetApiSpecRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IGetApiSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetApiSpecRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.GetApiSpecRequest; + + /** + * Decodes a GetApiSpecRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.GetApiSpecRequest; + + /** + * Verifies a GetApiSpecRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetApiSpecRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetApiSpecRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.GetApiSpecRequest; + + /** + * Creates a plain object from a GetApiSpecRequest message. Also converts values to other types if specified. + * @param message GetApiSpecRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.GetApiSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetApiSpecRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetApiSpecContentsRequest. */ + interface IGetApiSpecContentsRequest { + + /** GetApiSpecContentsRequest name */ + name?: (string|null); + } + + /** Represents a GetApiSpecContentsRequest. */ + class GetApiSpecContentsRequest implements IGetApiSpecContentsRequest { + + /** + * Constructs a new GetApiSpecContentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest); + + /** GetApiSpecContentsRequest name. */ + public name: string; + + /** + * Creates a new GetApiSpecContentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetApiSpecContentsRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest): google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; + + /** + * Encodes the specified GetApiSpecContentsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.verify|verify} messages. + * @param message GetApiSpecContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetApiSpecContentsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.verify|verify} messages. + * @param message GetApiSpecContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetApiSpecContentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetApiSpecContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; + + /** + * Decodes a GetApiSpecContentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetApiSpecContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; + + /** + * Verifies a GetApiSpecContentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetApiSpecContentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetApiSpecContentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest; + + /** + * Creates a plain object from a GetApiSpecContentsRequest message. Also converts values to other types if specified. + * @param message GetApiSpecContentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetApiSpecContentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateApiSpecRequest. */ + interface ICreateApiSpecRequest { + + /** CreateApiSpecRequest parent */ + parent?: (string|null); + + /** CreateApiSpecRequest apiSpec */ + apiSpec?: (google.cloud.apigeeregistry.v1.IApiSpec|null); + + /** CreateApiSpecRequest apiSpecId */ + apiSpecId?: (string|null); + } + + /** Represents a CreateApiSpecRequest. */ + class CreateApiSpecRequest implements ICreateApiSpecRequest { + + /** + * Constructs a new CreateApiSpecRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.ICreateApiSpecRequest); + + /** CreateApiSpecRequest parent. */ + public parent: string; + + /** CreateApiSpecRequest apiSpec. */ + public apiSpec?: (google.cloud.apigeeregistry.v1.IApiSpec|null); + + /** CreateApiSpecRequest apiSpecId. */ + public apiSpecId: string; + + /** + * Creates a new CreateApiSpecRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateApiSpecRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.ICreateApiSpecRequest): google.cloud.apigeeregistry.v1.CreateApiSpecRequest; + + /** + * Encodes the specified CreateApiSpecRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiSpecRequest.verify|verify} messages. + * @param message CreateApiSpecRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.ICreateApiSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateApiSpecRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiSpecRequest.verify|verify} messages. + * @param message CreateApiSpecRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.ICreateApiSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateApiSpecRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.CreateApiSpecRequest; + + /** + * Decodes a CreateApiSpecRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.CreateApiSpecRequest; + + /** + * Verifies a CreateApiSpecRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateApiSpecRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateApiSpecRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.CreateApiSpecRequest; + + /** + * Creates a plain object from a CreateApiSpecRequest message. Also converts values to other types if specified. + * @param message CreateApiSpecRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.CreateApiSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateApiSpecRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateApiSpecRequest. */ + interface IUpdateApiSpecRequest { + + /** UpdateApiSpecRequest apiSpec */ + apiSpec?: (google.cloud.apigeeregistry.v1.IApiSpec|null); + + /** UpdateApiSpecRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateApiSpecRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents an UpdateApiSpecRequest. */ + class UpdateApiSpecRequest implements IUpdateApiSpecRequest { + + /** + * Constructs a new UpdateApiSpecRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest); + + /** UpdateApiSpecRequest apiSpec. */ + public apiSpec?: (google.cloud.apigeeregistry.v1.IApiSpec|null); + + /** UpdateApiSpecRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateApiSpecRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new UpdateApiSpecRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateApiSpecRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest): google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; + + /** + * Encodes the specified UpdateApiSpecRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.verify|verify} messages. + * @param message UpdateApiSpecRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateApiSpecRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.verify|verify} messages. + * @param message UpdateApiSpecRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateApiSpecRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; + + /** + * Decodes an UpdateApiSpecRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; + + /** + * Verifies an UpdateApiSpecRequest message. + * @param message Plain 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 UpdateApiSpecRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateApiSpecRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.UpdateApiSpecRequest; + + /** + * Creates a plain object from an UpdateApiSpecRequest message. Also converts values to other types if specified. + * @param message UpdateApiSpecRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.UpdateApiSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateApiSpecRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteApiSpecRequest. */ + interface IDeleteApiSpecRequest { + + /** DeleteApiSpecRequest name */ + name?: (string|null); + + /** DeleteApiSpecRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteApiSpecRequest. */ + class DeleteApiSpecRequest implements IDeleteApiSpecRequest { + + /** + * Constructs a new DeleteApiSpecRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest); + + /** DeleteApiSpecRequest name. */ + public name: string; + + /** DeleteApiSpecRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteApiSpecRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteApiSpecRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest): google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; + + /** + * Encodes the specified DeleteApiSpecRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.verify|verify} messages. + * @param message DeleteApiSpecRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteApiSpecRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.verify|verify} messages. + * @param message DeleteApiSpecRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteApiSpecRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; + + /** + * Decodes a DeleteApiSpecRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; + + /** + * Verifies a DeleteApiSpecRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteApiSpecRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteApiSpecRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.DeleteApiSpecRequest; + + /** + * Creates a plain object from a DeleteApiSpecRequest message. Also converts values to other types if specified. + * @param message DeleteApiSpecRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.DeleteApiSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteApiSpecRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TagApiSpecRevisionRequest. */ + interface ITagApiSpecRevisionRequest { + + /** TagApiSpecRevisionRequest name */ + name?: (string|null); + + /** TagApiSpecRevisionRequest tag */ + tag?: (string|null); + } + + /** Represents a TagApiSpecRevisionRequest. */ + class TagApiSpecRevisionRequest implements ITagApiSpecRevisionRequest { + + /** + * Constructs a new TagApiSpecRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest); + + /** TagApiSpecRevisionRequest name. */ + public name: string; + + /** TagApiSpecRevisionRequest tag. */ + public tag: string; + + /** + * Creates a new TagApiSpecRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TagApiSpecRevisionRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest): google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; + + /** + * Encodes the specified TagApiSpecRevisionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.verify|verify} messages. + * @param message TagApiSpecRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TagApiSpecRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.verify|verify} messages. + * @param message TagApiSpecRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TagApiSpecRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TagApiSpecRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; + + /** + * Decodes a TagApiSpecRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TagApiSpecRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; + + /** + * Verifies a TagApiSpecRevisionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TagApiSpecRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TagApiSpecRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest; + + /** + * Creates a plain object from a TagApiSpecRevisionRequest message. Also converts values to other types if specified. + * @param message TagApiSpecRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TagApiSpecRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListApiSpecRevisionsRequest. */ + interface IListApiSpecRevisionsRequest { + + /** ListApiSpecRevisionsRequest name */ + name?: (string|null); + + /** ListApiSpecRevisionsRequest pageSize */ + pageSize?: (number|null); + + /** ListApiSpecRevisionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListApiSpecRevisionsRequest. */ + class ListApiSpecRevisionsRequest implements IListApiSpecRevisionsRequest { + + /** + * Constructs a new ListApiSpecRevisionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest); + + /** ListApiSpecRevisionsRequest name. */ + public name: string; + + /** ListApiSpecRevisionsRequest pageSize. */ + public pageSize: number; + + /** ListApiSpecRevisionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListApiSpecRevisionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApiSpecRevisionsRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest): google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; + + /** + * Encodes the specified ListApiSpecRevisionsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.verify|verify} messages. + * @param message ListApiSpecRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApiSpecRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.verify|verify} messages. + * @param message ListApiSpecRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApiSpecRevisionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApiSpecRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; + + /** + * Decodes a ListApiSpecRevisionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApiSpecRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; + + /** + * Verifies a ListApiSpecRevisionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApiSpecRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApiSpecRevisionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest; + + /** + * Creates a plain object from a ListApiSpecRevisionsRequest message. Also converts values to other types if specified. + * @param message ListApiSpecRevisionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApiSpecRevisionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListApiSpecRevisionsResponse. */ + interface IListApiSpecRevisionsResponse { + + /** ListApiSpecRevisionsResponse apiSpecs */ + apiSpecs?: (google.cloud.apigeeregistry.v1.IApiSpec[]|null); + + /** ListApiSpecRevisionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListApiSpecRevisionsResponse. */ + class ListApiSpecRevisionsResponse implements IListApiSpecRevisionsResponse { + + /** + * Constructs a new ListApiSpecRevisionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse); + + /** ListApiSpecRevisionsResponse apiSpecs. */ + public apiSpecs: google.cloud.apigeeregistry.v1.IApiSpec[]; + + /** ListApiSpecRevisionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListApiSpecRevisionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApiSpecRevisionsResponse instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse): google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; + + /** + * Encodes the specified ListApiSpecRevisionsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.verify|verify} messages. + * @param message ListApiSpecRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApiSpecRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.verify|verify} messages. + * @param message ListApiSpecRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApiSpecRevisionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApiSpecRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; + + /** + * Decodes a ListApiSpecRevisionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApiSpecRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; + + /** + * Verifies a ListApiSpecRevisionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApiSpecRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApiSpecRevisionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse; + + /** + * Creates a plain object from a ListApiSpecRevisionsResponse message. Also converts values to other types if specified. + * @param message ListApiSpecRevisionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApiSpecRevisionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RollbackApiSpecRequest. */ + interface IRollbackApiSpecRequest { + + /** RollbackApiSpecRequest name */ + name?: (string|null); + + /** RollbackApiSpecRequest revisionId */ + revisionId?: (string|null); + } + + /** Represents a RollbackApiSpecRequest. */ + class RollbackApiSpecRequest implements IRollbackApiSpecRequest { + + /** + * Constructs a new RollbackApiSpecRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest); + + /** RollbackApiSpecRequest name. */ + public name: string; + + /** RollbackApiSpecRequest revisionId. */ + public revisionId: string; + + /** + * Creates a new RollbackApiSpecRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RollbackApiSpecRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest): google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; + + /** + * Encodes the specified RollbackApiSpecRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.verify|verify} messages. + * @param message RollbackApiSpecRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RollbackApiSpecRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.verify|verify} messages. + * @param message RollbackApiSpecRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RollbackApiSpecRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RollbackApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; + + /** + * Decodes a RollbackApiSpecRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RollbackApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; + + /** + * Verifies a RollbackApiSpecRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RollbackApiSpecRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RollbackApiSpecRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.RollbackApiSpecRequest; + + /** + * Creates a plain object from a RollbackApiSpecRequest message. Also converts values to other types if specified. + * @param message RollbackApiSpecRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.RollbackApiSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RollbackApiSpecRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteApiSpecRevisionRequest. */ + interface IDeleteApiSpecRevisionRequest { + + /** DeleteApiSpecRevisionRequest name */ + name?: (string|null); + } + + /** Represents a DeleteApiSpecRevisionRequest. */ + class DeleteApiSpecRevisionRequest implements IDeleteApiSpecRevisionRequest { + + /** + * Constructs a new DeleteApiSpecRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest); + + /** DeleteApiSpecRevisionRequest name. */ + public name: string; + + /** + * Creates a new DeleteApiSpecRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteApiSpecRevisionRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest): google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; + + /** + * Encodes the specified DeleteApiSpecRevisionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.verify|verify} messages. + * @param message DeleteApiSpecRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteApiSpecRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.verify|verify} messages. + * @param message DeleteApiSpecRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteApiSpecRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteApiSpecRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; + + /** + * Decodes a DeleteApiSpecRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteApiSpecRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; + + /** + * Verifies a DeleteApiSpecRevisionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteApiSpecRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteApiSpecRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest; + + /** + * Creates a plain object from a DeleteApiSpecRevisionRequest message. Also converts values to other types if specified. + * @param message DeleteApiSpecRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteApiSpecRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListApiDeploymentsRequest. */ + interface IListApiDeploymentsRequest { + + /** ListApiDeploymentsRequest parent */ + parent?: (string|null); + + /** ListApiDeploymentsRequest pageSize */ + pageSize?: (number|null); + + /** ListApiDeploymentsRequest pageToken */ + pageToken?: (string|null); + + /** ListApiDeploymentsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListApiDeploymentsRequest. */ + class ListApiDeploymentsRequest implements IListApiDeploymentsRequest { + + /** + * Constructs a new ListApiDeploymentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest); + + /** ListApiDeploymentsRequest parent. */ + public parent: string; + + /** ListApiDeploymentsRequest pageSize. */ + public pageSize: number; + + /** ListApiDeploymentsRequest pageToken. */ + public pageToken: string; + + /** ListApiDeploymentsRequest filter. */ + public filter: string; + + /** + * Creates a new ListApiDeploymentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApiDeploymentsRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest): google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; + + /** + * Encodes the specified ListApiDeploymentsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.verify|verify} messages. + * @param message ListApiDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApiDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.verify|verify} messages. + * @param message ListApiDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApiDeploymentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApiDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; + + /** + * Decodes a ListApiDeploymentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApiDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; + + /** + * Verifies a ListApiDeploymentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApiDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApiDeploymentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest; + + /** + * Creates a plain object from a ListApiDeploymentsRequest message. Also converts values to other types if specified. + * @param message ListApiDeploymentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApiDeploymentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListApiDeploymentsResponse. */ + interface IListApiDeploymentsResponse { + + /** ListApiDeploymentsResponse apiDeployments */ + apiDeployments?: (google.cloud.apigeeregistry.v1.IApiDeployment[]|null); + + /** ListApiDeploymentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListApiDeploymentsResponse. */ + class ListApiDeploymentsResponse implements IListApiDeploymentsResponse { + + /** + * Constructs a new ListApiDeploymentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse); + + /** ListApiDeploymentsResponse apiDeployments. */ + public apiDeployments: google.cloud.apigeeregistry.v1.IApiDeployment[]; + + /** ListApiDeploymentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListApiDeploymentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApiDeploymentsResponse instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse): google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; + + /** + * Encodes the specified ListApiDeploymentsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.verify|verify} messages. + * @param message ListApiDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApiDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.verify|verify} messages. + * @param message ListApiDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApiDeploymentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApiDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; + + /** + * Decodes a ListApiDeploymentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApiDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; + + /** + * Verifies a ListApiDeploymentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApiDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApiDeploymentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse; + + /** + * Creates a plain object from a ListApiDeploymentsResponse message. Also converts values to other types if specified. + * @param message ListApiDeploymentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApiDeploymentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetApiDeploymentRequest. */ + interface IGetApiDeploymentRequest { + + /** GetApiDeploymentRequest name */ + name?: (string|null); + } + + /** Represents a GetApiDeploymentRequest. */ + class GetApiDeploymentRequest implements IGetApiDeploymentRequest { + + /** + * Constructs a new GetApiDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest); + + /** GetApiDeploymentRequest name. */ + public name: string; + + /** + * Creates a new GetApiDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetApiDeploymentRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest): google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; + + /** + * Encodes the specified GetApiDeploymentRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.verify|verify} messages. + * @param message GetApiDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetApiDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.verify|verify} messages. + * @param message GetApiDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetApiDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; + + /** + * Decodes a GetApiDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; + + /** + * Verifies a GetApiDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetApiDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetApiDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.GetApiDeploymentRequest; + + /** + * Creates a plain object from a GetApiDeploymentRequest message. Also converts values to other types if specified. + * @param message GetApiDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.GetApiDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetApiDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateApiDeploymentRequest. */ + interface ICreateApiDeploymentRequest { + + /** CreateApiDeploymentRequest parent */ + parent?: (string|null); + + /** CreateApiDeploymentRequest apiDeployment */ + apiDeployment?: (google.cloud.apigeeregistry.v1.IApiDeployment|null); + + /** CreateApiDeploymentRequest apiDeploymentId */ + apiDeploymentId?: (string|null); + } + + /** Represents a CreateApiDeploymentRequest. */ + class CreateApiDeploymentRequest implements ICreateApiDeploymentRequest { + + /** + * Constructs a new CreateApiDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest); + + /** CreateApiDeploymentRequest parent. */ + public parent: string; + + /** CreateApiDeploymentRequest apiDeployment. */ + public apiDeployment?: (google.cloud.apigeeregistry.v1.IApiDeployment|null); + + /** CreateApiDeploymentRequest apiDeploymentId. */ + public apiDeploymentId: string; + + /** + * Creates a new CreateApiDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateApiDeploymentRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest): google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; + + /** + * Encodes the specified CreateApiDeploymentRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.verify|verify} messages. + * @param message CreateApiDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateApiDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.verify|verify} messages. + * @param message CreateApiDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateApiDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; + + /** + * Decodes a CreateApiDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; + + /** + * Verifies a CreateApiDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateApiDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateApiDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest; + + /** + * Creates a plain object from a CreateApiDeploymentRequest message. Also converts values to other types if specified. + * @param message CreateApiDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateApiDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateApiDeploymentRequest. */ + interface IUpdateApiDeploymentRequest { + + /** UpdateApiDeploymentRequest apiDeployment */ + apiDeployment?: (google.cloud.apigeeregistry.v1.IApiDeployment|null); + + /** UpdateApiDeploymentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateApiDeploymentRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents an UpdateApiDeploymentRequest. */ + class UpdateApiDeploymentRequest implements IUpdateApiDeploymentRequest { + + /** + * Constructs a new UpdateApiDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest); + + /** UpdateApiDeploymentRequest apiDeployment. */ + public apiDeployment?: (google.cloud.apigeeregistry.v1.IApiDeployment|null); + + /** UpdateApiDeploymentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateApiDeploymentRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new UpdateApiDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateApiDeploymentRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest): google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; + + /** + * Encodes the specified UpdateApiDeploymentRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.verify|verify} messages. + * @param message UpdateApiDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateApiDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.verify|verify} messages. + * @param message UpdateApiDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateApiDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; + + /** + * Decodes an UpdateApiDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; + + /** + * Verifies an UpdateApiDeploymentRequest message. + * @param message Plain 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 UpdateApiDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateApiDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest; + + /** + * Creates a plain object from an UpdateApiDeploymentRequest message. Also converts values to other types if specified. + * @param message UpdateApiDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateApiDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteApiDeploymentRequest. */ + interface IDeleteApiDeploymentRequest { + + /** DeleteApiDeploymentRequest name */ + name?: (string|null); + + /** DeleteApiDeploymentRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteApiDeploymentRequest. */ + class DeleteApiDeploymentRequest implements IDeleteApiDeploymentRequest { + + /** + * Constructs a new DeleteApiDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest); + + /** DeleteApiDeploymentRequest name. */ + public name: string; + + /** DeleteApiDeploymentRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteApiDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteApiDeploymentRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest): google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; + + /** + * Encodes the specified DeleteApiDeploymentRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.verify|verify} messages. + * @param message DeleteApiDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteApiDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.verify|verify} messages. + * @param message DeleteApiDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteApiDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; + + /** + * Decodes a DeleteApiDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; + + /** + * Verifies a DeleteApiDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteApiDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteApiDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest; + + /** + * Creates a plain object from a DeleteApiDeploymentRequest message. Also converts values to other types if specified. + * @param message DeleteApiDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteApiDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TagApiDeploymentRevisionRequest. */ + interface ITagApiDeploymentRevisionRequest { + + /** TagApiDeploymentRevisionRequest name */ + name?: (string|null); + + /** TagApiDeploymentRevisionRequest tag */ + tag?: (string|null); + } + + /** Represents a TagApiDeploymentRevisionRequest. */ + class TagApiDeploymentRevisionRequest implements ITagApiDeploymentRevisionRequest { + + /** + * Constructs a new TagApiDeploymentRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest); + + /** TagApiDeploymentRevisionRequest name. */ + public name: string; + + /** TagApiDeploymentRevisionRequest tag. */ + public tag: string; + + /** + * Creates a new TagApiDeploymentRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TagApiDeploymentRevisionRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest): google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; + + /** + * Encodes the specified TagApiDeploymentRevisionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.verify|verify} messages. + * @param message TagApiDeploymentRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TagApiDeploymentRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.verify|verify} messages. + * @param message TagApiDeploymentRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TagApiDeploymentRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TagApiDeploymentRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; + + /** + * Decodes a TagApiDeploymentRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TagApiDeploymentRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; + + /** + * Verifies a TagApiDeploymentRevisionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TagApiDeploymentRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TagApiDeploymentRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest; + + /** + * Creates a plain object from a TagApiDeploymentRevisionRequest message. Also converts values to other types if specified. + * @param message TagApiDeploymentRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TagApiDeploymentRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListApiDeploymentRevisionsRequest. */ + interface IListApiDeploymentRevisionsRequest { + + /** ListApiDeploymentRevisionsRequest name */ + name?: (string|null); + + /** ListApiDeploymentRevisionsRequest pageSize */ + pageSize?: (number|null); + + /** ListApiDeploymentRevisionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListApiDeploymentRevisionsRequest. */ + class ListApiDeploymentRevisionsRequest implements IListApiDeploymentRevisionsRequest { + + /** + * Constructs a new ListApiDeploymentRevisionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest); + + /** ListApiDeploymentRevisionsRequest name. */ + public name: string; + + /** ListApiDeploymentRevisionsRequest pageSize. */ + public pageSize: number; + + /** ListApiDeploymentRevisionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListApiDeploymentRevisionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApiDeploymentRevisionsRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest): google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; + + /** + * Encodes the specified ListApiDeploymentRevisionsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.verify|verify} messages. + * @param message ListApiDeploymentRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApiDeploymentRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.verify|verify} messages. + * @param message ListApiDeploymentRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApiDeploymentRevisionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApiDeploymentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; + + /** + * Decodes a ListApiDeploymentRevisionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApiDeploymentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; + + /** + * Verifies a ListApiDeploymentRevisionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApiDeploymentRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApiDeploymentRevisionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest; + + /** + * Creates a plain object from a ListApiDeploymentRevisionsRequest message. Also converts values to other types if specified. + * @param message ListApiDeploymentRevisionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApiDeploymentRevisionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListApiDeploymentRevisionsResponse. */ + interface IListApiDeploymentRevisionsResponse { + + /** ListApiDeploymentRevisionsResponse apiDeployments */ + apiDeployments?: (google.cloud.apigeeregistry.v1.IApiDeployment[]|null); + + /** ListApiDeploymentRevisionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListApiDeploymentRevisionsResponse. */ + class ListApiDeploymentRevisionsResponse implements IListApiDeploymentRevisionsResponse { + + /** + * Constructs a new ListApiDeploymentRevisionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse); + + /** ListApiDeploymentRevisionsResponse apiDeployments. */ + public apiDeployments: google.cloud.apigeeregistry.v1.IApiDeployment[]; + + /** ListApiDeploymentRevisionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListApiDeploymentRevisionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListApiDeploymentRevisionsResponse instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse): google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; + + /** + * Encodes the specified ListApiDeploymentRevisionsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.verify|verify} messages. + * @param message ListApiDeploymentRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListApiDeploymentRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.verify|verify} messages. + * @param message ListApiDeploymentRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListApiDeploymentRevisionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListApiDeploymentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; + + /** + * Decodes a ListApiDeploymentRevisionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListApiDeploymentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; + + /** + * Verifies a ListApiDeploymentRevisionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListApiDeploymentRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListApiDeploymentRevisionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse; + + /** + * Creates a plain object from a ListApiDeploymentRevisionsResponse message. Also converts values to other types if specified. + * @param message ListApiDeploymentRevisionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListApiDeploymentRevisionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RollbackApiDeploymentRequest. */ + interface IRollbackApiDeploymentRequest { + + /** RollbackApiDeploymentRequest name */ + name?: (string|null); + + /** RollbackApiDeploymentRequest revisionId */ + revisionId?: (string|null); + } + + /** Represents a RollbackApiDeploymentRequest. */ + class RollbackApiDeploymentRequest implements IRollbackApiDeploymentRequest { + + /** + * Constructs a new RollbackApiDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest); + + /** RollbackApiDeploymentRequest name. */ + public name: string; + + /** RollbackApiDeploymentRequest revisionId. */ + public revisionId: string; + + /** + * Creates a new RollbackApiDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RollbackApiDeploymentRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest): google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; + + /** + * Encodes the specified RollbackApiDeploymentRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.verify|verify} messages. + * @param message RollbackApiDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RollbackApiDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.verify|verify} messages. + * @param message RollbackApiDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RollbackApiDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RollbackApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; + + /** + * Decodes a RollbackApiDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RollbackApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; + + /** + * Verifies a RollbackApiDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RollbackApiDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RollbackApiDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest; + + /** + * Creates a plain object from a RollbackApiDeploymentRequest message. Also converts values to other types if specified. + * @param message RollbackApiDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RollbackApiDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteApiDeploymentRevisionRequest. */ + interface IDeleteApiDeploymentRevisionRequest { + + /** DeleteApiDeploymentRevisionRequest name */ + name?: (string|null); + } + + /** Represents a DeleteApiDeploymentRevisionRequest. */ + class DeleteApiDeploymentRevisionRequest implements IDeleteApiDeploymentRevisionRequest { + + /** + * Constructs a new DeleteApiDeploymentRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest); + + /** DeleteApiDeploymentRevisionRequest name. */ + public name: string; + + /** + * Creates a new DeleteApiDeploymentRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteApiDeploymentRevisionRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest): google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; + + /** + * Encodes the specified DeleteApiDeploymentRevisionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.verify|verify} messages. + * @param message DeleteApiDeploymentRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteApiDeploymentRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.verify|verify} messages. + * @param message DeleteApiDeploymentRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteApiDeploymentRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteApiDeploymentRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; + + /** + * Decodes a DeleteApiDeploymentRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteApiDeploymentRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; + + /** + * Verifies a DeleteApiDeploymentRevisionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteApiDeploymentRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteApiDeploymentRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest; + + /** + * Creates a plain object from a DeleteApiDeploymentRevisionRequest message. Also converts values to other types if specified. + * @param message DeleteApiDeploymentRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteApiDeploymentRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListArtifactsRequest. */ + interface IListArtifactsRequest { + + /** ListArtifactsRequest parent */ + parent?: (string|null); + + /** ListArtifactsRequest pageSize */ + pageSize?: (number|null); + + /** ListArtifactsRequest pageToken */ + pageToken?: (string|null); + + /** ListArtifactsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListArtifactsRequest. */ + class ListArtifactsRequest implements IListArtifactsRequest { + + /** + * Constructs a new ListArtifactsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListArtifactsRequest); + + /** ListArtifactsRequest parent. */ + public parent: string; + + /** ListArtifactsRequest pageSize. */ + public pageSize: number; + + /** ListArtifactsRequest pageToken. */ + public pageToken: string; + + /** ListArtifactsRequest filter. */ + public filter: string; + + /** + * Creates a new ListArtifactsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListArtifactsRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListArtifactsRequest): google.cloud.apigeeregistry.v1.ListArtifactsRequest; + + /** + * Encodes the specified ListArtifactsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListArtifactsRequest.verify|verify} messages. + * @param message ListArtifactsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListArtifactsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListArtifactsRequest.verify|verify} messages. + * @param message ListArtifactsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListArtifactsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListArtifactsRequest; + + /** + * Decodes a ListArtifactsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListArtifactsRequest; + + /** + * Verifies a ListArtifactsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListArtifactsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListArtifactsRequest; + + /** + * Creates a plain object from a ListArtifactsRequest message. Also converts values to other types if specified. + * @param message ListArtifactsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListArtifactsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListArtifactsResponse. */ + interface IListArtifactsResponse { + + /** ListArtifactsResponse artifacts */ + artifacts?: (google.cloud.apigeeregistry.v1.IArtifact[]|null); + + /** ListArtifactsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListArtifactsResponse. */ + class ListArtifactsResponse implements IListArtifactsResponse { + + /** + * Constructs a new ListArtifactsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IListArtifactsResponse); + + /** ListArtifactsResponse artifacts. */ + public artifacts: google.cloud.apigeeregistry.v1.IArtifact[]; + + /** ListArtifactsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListArtifactsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListArtifactsResponse instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IListArtifactsResponse): google.cloud.apigeeregistry.v1.ListArtifactsResponse; + + /** + * Encodes the specified ListArtifactsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListArtifactsResponse.verify|verify} messages. + * @param message ListArtifactsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IListArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListArtifactsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListArtifactsResponse.verify|verify} messages. + * @param message ListArtifactsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IListArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListArtifactsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ListArtifactsResponse; + + /** + * Decodes a ListArtifactsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ListArtifactsResponse; + + /** + * Verifies a ListArtifactsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListArtifactsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ListArtifactsResponse; + + /** + * Creates a plain object from a ListArtifactsResponse message. Also converts values to other types if specified. + * @param message ListArtifactsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ListArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListArtifactsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetArtifactRequest. */ + interface IGetArtifactRequest { + + /** GetArtifactRequest name */ + name?: (string|null); + } + + /** Represents a GetArtifactRequest. */ + class GetArtifactRequest implements IGetArtifactRequest { + + /** + * Constructs a new GetArtifactRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IGetArtifactRequest); + + /** GetArtifactRequest name. */ + public name: string; + + /** + * Creates a new GetArtifactRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetArtifactRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IGetArtifactRequest): google.cloud.apigeeregistry.v1.GetArtifactRequest; + + /** + * Encodes the specified GetArtifactRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetArtifactRequest.verify|verify} messages. + * @param message GetArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IGetArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetArtifactRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetArtifactRequest.verify|verify} messages. + * @param message GetArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IGetArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetArtifactRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.GetArtifactRequest; + + /** + * Decodes a GetArtifactRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.GetArtifactRequest; + + /** + * Verifies a GetArtifactRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetArtifactRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.GetArtifactRequest; + + /** + * Creates a plain object from a GetArtifactRequest message. Also converts values to other types if specified. + * @param message GetArtifactRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.GetArtifactRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetArtifactRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetArtifactContentsRequest. */ + interface IGetArtifactContentsRequest { + + /** GetArtifactContentsRequest name */ + name?: (string|null); + } + + /** Represents a GetArtifactContentsRequest. */ + class GetArtifactContentsRequest implements IGetArtifactContentsRequest { + + /** + * Constructs a new GetArtifactContentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest); + + /** GetArtifactContentsRequest name. */ + public name: string; + + /** + * Creates a new GetArtifactContentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetArtifactContentsRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest): google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; + + /** + * Encodes the specified GetArtifactContentsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.verify|verify} messages. + * @param message GetArtifactContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetArtifactContentsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.verify|verify} messages. + * @param message GetArtifactContentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetArtifactContentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetArtifactContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; + + /** + * Decodes a GetArtifactContentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetArtifactContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; + + /** + * Verifies a GetArtifactContentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetArtifactContentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetArtifactContentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.GetArtifactContentsRequest; + + /** + * Creates a plain object from a GetArtifactContentsRequest message. Also converts values to other types if specified. + * @param message GetArtifactContentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.GetArtifactContentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetArtifactContentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateArtifactRequest. */ + interface ICreateArtifactRequest { + + /** CreateArtifactRequest parent */ + parent?: (string|null); + + /** CreateArtifactRequest artifact */ + artifact?: (google.cloud.apigeeregistry.v1.IArtifact|null); + + /** CreateArtifactRequest artifactId */ + artifactId?: (string|null); + } + + /** Represents a CreateArtifactRequest. */ + class CreateArtifactRequest implements ICreateArtifactRequest { + + /** + * Constructs a new CreateArtifactRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.ICreateArtifactRequest); + + /** CreateArtifactRequest parent. */ + public parent: string; + + /** CreateArtifactRequest artifact. */ + public artifact?: (google.cloud.apigeeregistry.v1.IArtifact|null); + + /** CreateArtifactRequest artifactId. */ + public artifactId: string; + + /** + * Creates a new CreateArtifactRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateArtifactRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.ICreateArtifactRequest): google.cloud.apigeeregistry.v1.CreateArtifactRequest; + + /** + * Encodes the specified CreateArtifactRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateArtifactRequest.verify|verify} messages. + * @param message CreateArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.ICreateArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateArtifactRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateArtifactRequest.verify|verify} messages. + * @param message CreateArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.ICreateArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateArtifactRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.CreateArtifactRequest; + + /** + * Decodes a CreateArtifactRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.CreateArtifactRequest; + + /** + * Verifies a CreateArtifactRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateArtifactRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.CreateArtifactRequest; + + /** + * Creates a plain object from a CreateArtifactRequest message. Also converts values to other types if specified. + * @param message CreateArtifactRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.CreateArtifactRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateArtifactRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReplaceArtifactRequest. */ + interface IReplaceArtifactRequest { + + /** ReplaceArtifactRequest artifact */ + artifact?: (google.cloud.apigeeregistry.v1.IArtifact|null); + } + + /** Represents a ReplaceArtifactRequest. */ + class ReplaceArtifactRequest implements IReplaceArtifactRequest { + + /** + * Constructs a new ReplaceArtifactRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IReplaceArtifactRequest); + + /** ReplaceArtifactRequest artifact. */ + public artifact?: (google.cloud.apigeeregistry.v1.IArtifact|null); + + /** + * Creates a new ReplaceArtifactRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReplaceArtifactRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IReplaceArtifactRequest): google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; + + /** + * Encodes the specified ReplaceArtifactRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.verify|verify} messages. + * @param message ReplaceArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IReplaceArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReplaceArtifactRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.verify|verify} messages. + * @param message ReplaceArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IReplaceArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReplaceArtifactRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReplaceArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; + + /** + * Decodes a ReplaceArtifactRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReplaceArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; + + /** + * Verifies a ReplaceArtifactRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReplaceArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReplaceArtifactRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.ReplaceArtifactRequest; + + /** + * Creates a plain object from a ReplaceArtifactRequest message. Also converts values to other types if specified. + * @param message ReplaceArtifactRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.ReplaceArtifactRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReplaceArtifactRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteArtifactRequest. */ + interface IDeleteArtifactRequest { + + /** DeleteArtifactRequest name */ + name?: (string|null); + } + + /** Represents a DeleteArtifactRequest. */ + class DeleteArtifactRequest implements IDeleteArtifactRequest { + + /** + * Constructs a new DeleteArtifactRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.apigeeregistry.v1.IDeleteArtifactRequest); + + /** DeleteArtifactRequest name. */ + public name: string; + + /** + * Creates a new DeleteArtifactRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteArtifactRequest instance + */ + public static create(properties?: google.cloud.apigeeregistry.v1.IDeleteArtifactRequest): google.cloud.apigeeregistry.v1.DeleteArtifactRequest; + + /** + * Encodes the specified DeleteArtifactRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteArtifactRequest.verify|verify} messages. + * @param message DeleteArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.apigeeregistry.v1.IDeleteArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteArtifactRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteArtifactRequest.verify|verify} messages. + * @param message DeleteArtifactRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.apigeeregistry.v1.IDeleteArtifactRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteArtifactRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.apigeeregistry.v1.DeleteArtifactRequest; + + /** + * Decodes a DeleteArtifactRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.apigeeregistry.v1.DeleteArtifactRequest; + + /** + * Verifies a DeleteArtifactRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteArtifactRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.apigeeregistry.v1.DeleteArtifactRequest; + + /** + * Creates a plain object from a DeleteArtifactRequest message. Also converts values to other types if specified. + * @param message DeleteArtifactRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.apigeeregistry.v1.DeleteArtifactRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteArtifactRequest 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, + 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 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); + + /** 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 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 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 }; + } + } + + /** 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-apigeeregistry/protos/protos.js b/packages/google-cloud-apigeeregistry/protos/protos.js new file mode 100644 index 00000000000..e94c299b4e2 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/protos/protos.js @@ -0,0 +1,28351 @@ +// 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_apigee_registry_protos || ($protobuf.roots._google_cloud_apigee_registry_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.apigeeregistry = (function() { + + /** + * Namespace apigeeregistry. + * @memberof google.cloud + * @namespace + */ + var apigeeregistry = {}; + + apigeeregistry.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.apigeeregistry + * @namespace + */ + var v1 = {}; + + v1.Provisioning = (function() { + + /** + * Constructs a new Provisioning service. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a Provisioning + * @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 Provisioning(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Provisioning.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Provisioning; + + /** + * Creates new Provisioning service using the specified rpc implementation. + * @function create + * @memberof google.cloud.apigeeregistry.v1.Provisioning + * @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 {Provisioning} RPC service. Useful where requests and/or responses are streamed. + */ + Provisioning.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#createInstance}. + * @memberof google.cloud.apigeeregistry.v1.Provisioning + * @typedef CreateInstanceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateInstance. + * @function createInstance + * @memberof google.cloud.apigeeregistry.v1.Provisioning + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateInstanceRequest} request CreateInstanceRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Provisioning.CreateInstanceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Provisioning.prototype.createInstance = function createInstance(request, callback) { + return this.rpcCall(createInstance, $root.google.cloud.apigeeregistry.v1.CreateInstanceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateInstance" }); + + /** + * Calls CreateInstance. + * @function createInstance + * @memberof google.cloud.apigeeregistry.v1.Provisioning + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateInstanceRequest} request CreateInstanceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#deleteInstance}. + * @memberof google.cloud.apigeeregistry.v1.Provisioning + * @typedef DeleteInstanceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteInstance. + * @function deleteInstance + * @memberof google.cloud.apigeeregistry.v1.Provisioning + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteInstanceRequest} request DeleteInstanceRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Provisioning.DeleteInstanceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Provisioning.prototype.deleteInstance = function deleteInstance(request, callback) { + return this.rpcCall(deleteInstance, $root.google.cloud.apigeeregistry.v1.DeleteInstanceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteInstance" }); + + /** + * Calls DeleteInstance. + * @function deleteInstance + * @memberof google.cloud.apigeeregistry.v1.Provisioning + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteInstanceRequest} request DeleteInstanceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#getInstance}. + * @memberof google.cloud.apigeeregistry.v1.Provisioning + * @typedef GetInstanceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.Instance} [response] Instance + */ + + /** + * Calls GetInstance. + * @function getInstance + * @memberof google.cloud.apigeeregistry.v1.Provisioning + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetInstanceRequest} request GetInstanceRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Provisioning.GetInstanceCallback} callback Node-style callback called with the error, if any, and Instance + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Provisioning.prototype.getInstance = function getInstance(request, callback) { + return this.rpcCall(getInstance, $root.google.cloud.apigeeregistry.v1.GetInstanceRequest, $root.google.cloud.apigeeregistry.v1.Instance, request, callback); + }, "name", { value: "GetInstance" }); + + /** + * Calls GetInstance. + * @function getInstance + * @memberof google.cloud.apigeeregistry.v1.Provisioning + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetInstanceRequest} request GetInstanceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Provisioning; + })(); + + v1.CreateInstanceRequest = (function() { + + /** + * Properties of a CreateInstanceRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface ICreateInstanceRequest + * @property {string|null} [parent] CreateInstanceRequest parent + * @property {string|null} [instanceId] CreateInstanceRequest instanceId + * @property {google.cloud.apigeeregistry.v1.IInstance|null} [instance] CreateInstanceRequest instance + */ + + /** + * Constructs a new CreateInstanceRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a CreateInstanceRequest. + * @implements ICreateInstanceRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.ICreateInstanceRequest=} [properties] Properties to set + */ + function CreateInstanceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateInstanceRequest parent. + * @member {string} parent + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @instance + */ + CreateInstanceRequest.prototype.parent = ""; + + /** + * CreateInstanceRequest instanceId. + * @member {string} instanceId + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @instance + */ + CreateInstanceRequest.prototype.instanceId = ""; + + /** + * CreateInstanceRequest instance. + * @member {google.cloud.apigeeregistry.v1.IInstance|null|undefined} instance + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @instance + */ + CreateInstanceRequest.prototype.instance = null; + + /** + * Creates a new CreateInstanceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateInstanceRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.CreateInstanceRequest} CreateInstanceRequest instance + */ + CreateInstanceRequest.create = function create(properties) { + return new CreateInstanceRequest(properties); + }; + + /** + * Encodes the specified CreateInstanceRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateInstanceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateInstanceRequest} message CreateInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateInstanceRequest.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.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.apigeeregistry.v1.Instance.encode(message.instance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateInstanceRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateInstanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateInstanceRequest} message CreateInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateInstanceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.CreateInstanceRequest} CreateInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateInstanceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.CreateInstanceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.instanceId = reader.string(); + break; + case 3: + message.instance = $root.google.cloud.apigeeregistry.v1.Instance.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateInstanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.CreateInstanceRequest} CreateInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateInstanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateInstanceRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateInstanceRequest.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.instanceId != null && message.hasOwnProperty("instanceId")) + if (!$util.isString(message.instanceId)) + return "instanceId: string expected"; + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.apigeeregistry.v1.Instance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a CreateInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.CreateInstanceRequest} CreateInstanceRequest + */ + CreateInstanceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.CreateInstanceRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.CreateInstanceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.instanceId != null) + message.instanceId = String(object.instanceId); + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.CreateInstanceRequest.instance: object expected"); + message.instance = $root.google.cloud.apigeeregistry.v1.Instance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a CreateInstanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.CreateInstanceRequest} message CreateInstanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateInstanceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.instanceId = ""; + object.instance = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + object.instanceId = message.instanceId; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.apigeeregistry.v1.Instance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this CreateInstanceRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateInstanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateInstanceRequest; + })(); + + v1.DeleteInstanceRequest = (function() { + + /** + * Properties of a DeleteInstanceRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IDeleteInstanceRequest + * @property {string|null} [name] DeleteInstanceRequest name + */ + + /** + * Constructs a new DeleteInstanceRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a DeleteInstanceRequest. + * @implements IDeleteInstanceRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IDeleteInstanceRequest=} [properties] Properties to set + */ + function DeleteInstanceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteInstanceRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.DeleteInstanceRequest + * @instance + */ + DeleteInstanceRequest.prototype.name = ""; + + /** + * Creates a new DeleteInstanceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.DeleteInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteInstanceRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.DeleteInstanceRequest} DeleteInstanceRequest instance + */ + DeleteInstanceRequest.create = function create(properties) { + return new DeleteInstanceRequest(properties); + }; + + /** + * Encodes the specified DeleteInstanceRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteInstanceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.DeleteInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteInstanceRequest} message DeleteInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteInstanceRequest.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 DeleteInstanceRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteInstanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteInstanceRequest} message DeleteInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteInstanceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.DeleteInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.DeleteInstanceRequest} DeleteInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteInstanceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.DeleteInstanceRequest(); + 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 DeleteInstanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.DeleteInstanceRequest} DeleteInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteInstanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteInstanceRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.DeleteInstanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteInstanceRequest.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 DeleteInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.DeleteInstanceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.DeleteInstanceRequest} DeleteInstanceRequest + */ + DeleteInstanceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.DeleteInstanceRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.DeleteInstanceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteInstanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.DeleteInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.DeleteInstanceRequest} message DeleteInstanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteInstanceRequest.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 DeleteInstanceRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.DeleteInstanceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteInstanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteInstanceRequest; + })(); + + v1.GetInstanceRequest = (function() { + + /** + * Properties of a GetInstanceRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IGetInstanceRequest + * @property {string|null} [name] GetInstanceRequest name + */ + + /** + * Constructs a new GetInstanceRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a GetInstanceRequest. + * @implements IGetInstanceRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IGetInstanceRequest=} [properties] Properties to set + */ + function GetInstanceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetInstanceRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.GetInstanceRequest + * @instance + */ + GetInstanceRequest.prototype.name = ""; + + /** + * Creates a new GetInstanceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.GetInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetInstanceRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.GetInstanceRequest} GetInstanceRequest instance + */ + GetInstanceRequest.create = function create(properties) { + return new GetInstanceRequest(properties); + }; + + /** + * Encodes the specified GetInstanceRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetInstanceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.GetInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetInstanceRequest} message GetInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInstanceRequest.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 GetInstanceRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetInstanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetInstanceRequest} message GetInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetInstanceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.GetInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.GetInstanceRequest} GetInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInstanceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.GetInstanceRequest(); + 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 GetInstanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.GetInstanceRequest} GetInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInstanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetInstanceRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.GetInstanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetInstanceRequest.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 GetInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.GetInstanceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.GetInstanceRequest} GetInstanceRequest + */ + GetInstanceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.GetInstanceRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.GetInstanceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetInstanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.GetInstanceRequest + * @static + * @param {google.cloud.apigeeregistry.v1.GetInstanceRequest} message GetInstanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetInstanceRequest.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 GetInstanceRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.GetInstanceRequest + * @instance + * @returns {Object.} JSON object + */ + GetInstanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetInstanceRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.apigeeregistry.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} [cancellationRequested] OperationMetadata cancellationRequested + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.apigeeregistry.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.apigeeregistry.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.apigeeregistry.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.apigeeregistry.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.apigeeregistry.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.apigeeregistry.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata cancellationRequested. + * @member {boolean} cancellationRequested + * @memberof google.cloud.apigeeregistry.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.cancellationRequested = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.apigeeregistry.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.OperationMetadata + * @static + * @param {google.cloud.apigeeregistry.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.apigeeregistry.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.OperationMetadata + * @static + * @param {google.cloud.apigeeregistry.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.cancellationRequested != null && Object.hasOwnProperty.call(message, "cancellationRequested")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancellationRequested); + 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.apigeeregistry.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.OperationMetadata + * @static + * @param {google.cloud.apigeeregistry.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.apigeeregistry.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.apigeeregistry.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.apigeeregistry.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.cancellationRequested = 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.apigeeregistry.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.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.apigeeregistry.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.cancellationRequested != null && message.hasOwnProperty("cancellationRequested")) + if (typeof message.cancellationRequested !== "boolean") + return "cancellationRequested: 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.apigeeregistry.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.apigeeregistry.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.apigeeregistry.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.cancellationRequested != null) + message.cancellationRequested = Boolean(object.cancellationRequested); + 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.apigeeregistry.v1.OperationMetadata + * @static + * @param {google.cloud.apigeeregistry.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.cancellationRequested = 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.cancellationRequested != null && message.hasOwnProperty("cancellationRequested")) + object.cancellationRequested = message.cancellationRequested; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationMetadata; + })(); + + v1.Instance = (function() { + + /** + * Properties of an Instance. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IInstance + * @property {string|null} [name] Instance name + * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Instance updateTime + * @property {google.cloud.apigeeregistry.v1.Instance.State|null} [state] Instance state + * @property {string|null} [stateMessage] Instance stateMessage + * @property {google.cloud.apigeeregistry.v1.Instance.IConfig|null} [config] Instance config + */ + + /** + * Constructs a new Instance. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents an Instance. + * @implements IInstance + * @constructor + * @param {google.cloud.apigeeregistry.v1.IInstance=} [properties] Properties to set + */ + function Instance(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Instance name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.Instance + * @instance + */ + Instance.prototype.name = ""; + + /** + * Instance createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.apigeeregistry.v1.Instance + * @instance + */ + Instance.prototype.createTime = null; + + /** + * Instance updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.apigeeregistry.v1.Instance + * @instance + */ + Instance.prototype.updateTime = null; + + /** + * Instance state. + * @member {google.cloud.apigeeregistry.v1.Instance.State} state + * @memberof google.cloud.apigeeregistry.v1.Instance + * @instance + */ + Instance.prototype.state = 0; + + /** + * Instance stateMessage. + * @member {string} stateMessage + * @memberof google.cloud.apigeeregistry.v1.Instance + * @instance + */ + Instance.prototype.stateMessage = ""; + + /** + * Instance config. + * @member {google.cloud.apigeeregistry.v1.Instance.IConfig|null|undefined} config + * @memberof google.cloud.apigeeregistry.v1.Instance + * @instance + */ + Instance.prototype.config = null; + + /** + * Creates a new Instance instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.Instance + * @static + * @param {google.cloud.apigeeregistry.v1.IInstance=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.Instance} Instance instance + */ + Instance.create = function create(properties) { + return new Instance(properties); + }; + + /** + * Encodes the specified Instance message. Does not implicitly {@link google.cloud.apigeeregistry.v1.Instance.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.Instance + * @static + * @param {google.cloud.apigeeregistry.v1.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.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 2, wireType 2 =*/18).fork()).ldelim(); + 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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.stateMessage != null && Object.hasOwnProperty.call(message, "stateMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.stateMessage); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.apigeeregistry.v1.Instance.Config.encode(message.config, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.Instance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.Instance + * @static + * @param {google.cloud.apigeeregistry.v1.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Instance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.Instance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.stateMessage = reader.string(); + break; + case 6: + message.config = $root.google.cloud.apigeeregistry.v1.Instance.Config.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Instance message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.Instance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Instance.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.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (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: + case 5: + case 6: + break; + } + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + if (!$util.isString(message.stateMessage)) + return "stateMessage: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.apigeeregistry.v1.Instance.Config.verify(message.config); + if (error) + return "config." + error; + } + return null; + }; + + /** + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.Instance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.Instance} Instance + */ + Instance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.Instance) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.Instance(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.Instance.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.apigeeregistry.v1.Instance.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "INACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "ACTIVE": + case 3: + message.state = 3; + break; + case "UPDATING": + case 4: + message.state = 4; + break; + case "DELETING": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + } + if (object.stateMessage != null) + message.stateMessage = String(object.stateMessage); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.Instance.config: object expected"); + message.config = $root.google.cloud.apigeeregistry.v1.Instance.Config.fromObject(object.config); + } + return message; + }; + + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.Instance + * @static + * @param {google.cloud.apigeeregistry.v1.Instance} message Instance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Instance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateMessage = ""; + object.config = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.apigeeregistry.v1.Instance.State[message.state] : message.state; + if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) + object.stateMessage = message.stateMessage; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.apigeeregistry.v1.Instance.Config.toObject(message.config, options); + return object; + }; + + /** + * Converts this Instance to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.Instance + * @instance + * @returns {Object.} JSON object + */ + Instance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.apigeeregistry.v1.Instance.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} INACTIVE=1 INACTIVE value + * @property {number} CREATING=2 CREATING value + * @property {number} ACTIVE=3 ACTIVE value + * @property {number} UPDATING=4 UPDATING value + * @property {number} DELETING=5 DELETING value + * @property {number} FAILED=6 FAILED value + */ + Instance.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INACTIVE"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "ACTIVE"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + values[valuesById[5] = "DELETING"] = 5; + values[valuesById[6] = "FAILED"] = 6; + return values; + })(); + + Instance.Config = (function() { + + /** + * Properties of a Config. + * @memberof google.cloud.apigeeregistry.v1.Instance + * @interface IConfig + * @property {string|null} [location] Config location + * @property {string|null} [cmekKeyName] Config cmekKeyName + */ + + /** + * Constructs a new Config. + * @memberof google.cloud.apigeeregistry.v1.Instance + * @classdesc Represents a Config. + * @implements IConfig + * @constructor + * @param {google.cloud.apigeeregistry.v1.Instance.IConfig=} [properties] Properties to set + */ + function Config(properties) { + if (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 location. + * @member {string} location + * @memberof google.cloud.apigeeregistry.v1.Instance.Config + * @instance + */ + Config.prototype.location = ""; + + /** + * Config cmekKeyName. + * @member {string} cmekKeyName + * @memberof google.cloud.apigeeregistry.v1.Instance.Config + * @instance + */ + Config.prototype.cmekKeyName = ""; + + /** + * Creates a new Config instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.Instance.Config + * @static + * @param {google.cloud.apigeeregistry.v1.Instance.IConfig=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.Instance.Config} Config instance + */ + Config.create = function create(properties) { + return new Config(properties); + }; + + /** + * Encodes the specified Config message. Does not implicitly {@link google.cloud.apigeeregistry.v1.Instance.Config.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.Instance.Config + * @static + * @param {google.cloud.apigeeregistry.v1.Instance.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.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.cmekKeyName != null && Object.hasOwnProperty.call(message, "cmekKeyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cmekKeyName); + return writer; + }; + + /** + * Encodes the specified Config message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.Instance.Config.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.Instance.Config + * @static + * @param {google.cloud.apigeeregistry.v1.Instance.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.apigeeregistry.v1.Instance.Config + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.Instance.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.apigeeregistry.v1.Instance.Config(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = reader.string(); + break; + case 2: + message.cmekKeyName = 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.apigeeregistry.v1.Instance.Config + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.Instance.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.apigeeregistry.v1.Instance.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.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.cmekKeyName != null && message.hasOwnProperty("cmekKeyName")) + if (!$util.isString(message.cmekKeyName)) + return "cmekKeyName: 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.apigeeregistry.v1.Instance.Config + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.Instance.Config} Config + */ + Config.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.Instance.Config) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.Instance.Config(); + if (object.location != null) + message.location = String(object.location); + if (object.cmekKeyName != null) + message.cmekKeyName = String(object.cmekKeyName); + return message; + }; + + /** + * Creates a plain object from a Config message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.Instance.Config + * @static + * @param {google.cloud.apigeeregistry.v1.Instance.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.defaults) { + object.location = ""; + object.cmekKeyName = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.cmekKeyName != null && message.hasOwnProperty("cmekKeyName")) + object.cmekKeyName = message.cmekKeyName; + return object; + }; + + /** + * Converts this Config to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.Instance.Config + * @instance + * @returns {Object.} JSON object + */ + Config.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Config; + })(); + + return Instance; + })(); + + v1.Api = (function() { + + /** + * Properties of an Api. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IApi + * @property {string|null} [name] Api name + * @property {string|null} [displayName] Api displayName + * @property {string|null} [description] Api description + * @property {google.protobuf.ITimestamp|null} [createTime] Api createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Api updateTime + * @property {string|null} [availability] Api availability + * @property {string|null} [recommendedVersion] Api recommendedVersion + * @property {string|null} [recommendedDeployment] Api recommendedDeployment + * @property {Object.|null} [labels] Api labels + * @property {Object.|null} [annotations] Api annotations + */ + + /** + * Constructs a new Api. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents an Api. + * @implements IApi + * @constructor + * @param {google.cloud.apigeeregistry.v1.IApi=} [properties] Properties to set + */ + function Api(properties) { + this.labels = {}; + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Api name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.Api + * @instance + */ + Api.prototype.name = ""; + + /** + * Api displayName. + * @member {string} displayName + * @memberof google.cloud.apigeeregistry.v1.Api + * @instance + */ + Api.prototype.displayName = ""; + + /** + * Api description. + * @member {string} description + * @memberof google.cloud.apigeeregistry.v1.Api + * @instance + */ + Api.prototype.description = ""; + + /** + * Api createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.apigeeregistry.v1.Api + * @instance + */ + Api.prototype.createTime = null; + + /** + * Api updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.apigeeregistry.v1.Api + * @instance + */ + Api.prototype.updateTime = null; + + /** + * Api availability. + * @member {string} availability + * @memberof google.cloud.apigeeregistry.v1.Api + * @instance + */ + Api.prototype.availability = ""; + + /** + * Api recommendedVersion. + * @member {string} recommendedVersion + * @memberof google.cloud.apigeeregistry.v1.Api + * @instance + */ + Api.prototype.recommendedVersion = ""; + + /** + * Api recommendedDeployment. + * @member {string} recommendedDeployment + * @memberof google.cloud.apigeeregistry.v1.Api + * @instance + */ + Api.prototype.recommendedDeployment = ""; + + /** + * Api labels. + * @member {Object.} labels + * @memberof google.cloud.apigeeregistry.v1.Api + * @instance + */ + Api.prototype.labels = $util.emptyObject; + + /** + * Api annotations. + * @member {Object.} annotations + * @memberof google.cloud.apigeeregistry.v1.Api + * @instance + */ + Api.prototype.annotations = $util.emptyObject; + + /** + * Creates a new Api instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.Api + * @static + * @param {google.cloud.apigeeregistry.v1.IApi=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.Api} Api instance + */ + Api.create = function create(properties) { + return new Api(properties); + }; + + /** + * Encodes the specified Api message. Does not implicitly {@link google.cloud.apigeeregistry.v1.Api.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.Api + * @static + * @param {google.cloud.apigeeregistry.v1.IApi} message Api message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Api.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 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.availability != null && Object.hasOwnProperty.call(message, "availability")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.availability); + if (message.recommendedVersion != null && Object.hasOwnProperty.call(message, "recommendedVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.recommendedVersion); + if (message.recommendedDeployment != null && Object.hasOwnProperty.call(message, "recommendedDeployment")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.recommendedDeployment); + 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 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + 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 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Api message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.Api.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.Api + * @static + * @param {google.cloud.apigeeregistry.v1.IApi} message Api message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Api.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Api message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.Api + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.Api} Api + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Api.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.Api(), 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.description = 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: + message.availability = reader.string(); + break; + case 7: + message.recommendedVersion = reader.string(); + break; + case 8: + message.recommendedDeployment = reader.string(); + break; + case 9: + 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 10: + 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; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Api message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.Api + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.Api} Api + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Api.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Api message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.Api + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Api.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.availability != null && message.hasOwnProperty("availability")) + if (!$util.isString(message.availability)) + return "availability: string expected"; + if (message.recommendedVersion != null && message.hasOwnProperty("recommendedVersion")) + if (!$util.isString(message.recommendedVersion)) + return "recommendedVersion: string expected"; + if (message.recommendedDeployment != null && message.hasOwnProperty("recommendedDeployment")) + if (!$util.isString(message.recommendedDeployment)) + return "recommendedDeployment: 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.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"; + } + return null; + }; + + /** + * Creates an Api message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.Api + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.Api} Api + */ + Api.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.Api) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.Api(); + 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.apigeeregistry.v1.Api.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.apigeeregistry.v1.Api.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.availability != null) + message.availability = String(object.availability); + if (object.recommendedVersion != null) + message.recommendedVersion = String(object.recommendedVersion); + if (object.recommendedDeployment != null) + message.recommendedDeployment = String(object.recommendedDeployment); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.Api.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.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.Api.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]]); + } + return message; + }; + + /** + * Creates a plain object from an Api message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.Api + * @static + * @param {google.cloud.apigeeregistry.v1.Api} message Api + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Api.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.availability = ""; + object.recommendedVersion = ""; + object.recommendedDeployment = ""; + } + 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.availability != null && message.hasOwnProperty("availability")) + object.availability = message.availability; + if (message.recommendedVersion != null && message.hasOwnProperty("recommendedVersion")) + object.recommendedVersion = message.recommendedVersion; + if (message.recommendedDeployment != null && message.hasOwnProperty("recommendedDeployment")) + object.recommendedDeployment = message.recommendedDeployment; + 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.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]]; + } + return object; + }; + + /** + * Converts this Api to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.Api + * @instance + * @returns {Object.} JSON object + */ + Api.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Api; + })(); + + v1.ApiVersion = (function() { + + /** + * Properties of an ApiVersion. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IApiVersion + * @property {string|null} [name] ApiVersion name + * @property {string|null} [displayName] ApiVersion displayName + * @property {string|null} [description] ApiVersion description + * @property {google.protobuf.ITimestamp|null} [createTime] ApiVersion createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ApiVersion updateTime + * @property {string|null} [state] ApiVersion state + * @property {Object.|null} [labels] ApiVersion labels + * @property {Object.|null} [annotations] ApiVersion annotations + */ + + /** + * Constructs a new ApiVersion. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents an ApiVersion. + * @implements IApiVersion + * @constructor + * @param {google.cloud.apigeeregistry.v1.IApiVersion=} [properties] Properties to set + */ + function ApiVersion(properties) { + this.labels = {}; + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ApiVersion name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @instance + */ + ApiVersion.prototype.name = ""; + + /** + * ApiVersion displayName. + * @member {string} displayName + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @instance + */ + ApiVersion.prototype.displayName = ""; + + /** + * ApiVersion description. + * @member {string} description + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @instance + */ + ApiVersion.prototype.description = ""; + + /** + * ApiVersion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @instance + */ + ApiVersion.prototype.createTime = null; + + /** + * ApiVersion updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @instance + */ + ApiVersion.prototype.updateTime = null; + + /** + * ApiVersion state. + * @member {string} state + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @instance + */ + ApiVersion.prototype.state = ""; + + /** + * ApiVersion labels. + * @member {Object.} labels + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @instance + */ + ApiVersion.prototype.labels = $util.emptyObject; + + /** + * ApiVersion annotations. + * @member {Object.} annotations + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @instance + */ + ApiVersion.prototype.annotations = $util.emptyObject; + + /** + * Creates a new ApiVersion instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @static + * @param {google.cloud.apigeeregistry.v1.IApiVersion=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ApiVersion} ApiVersion instance + */ + ApiVersion.create = function create(properties) { + return new ApiVersion(properties); + }; + + /** + * Encodes the specified ApiVersion message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @static + * @param {google.cloud.apigeeregistry.v1.IApiVersion} message ApiVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApiVersion.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 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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 2 =*/50).string(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 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + 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 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ApiVersion message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @static + * @param {google.cloud.apigeeregistry.v1.IApiVersion} message ApiVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApiVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApiVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ApiVersion} ApiVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApiVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ApiVersion(), 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.description = 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: + message.state = reader.string(); + break; + case 7: + 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 8: + 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; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApiVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ApiVersion} ApiVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApiVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApiVersion message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApiVersion.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.state != null && message.hasOwnProperty("state")) + if (!$util.isString(message.state)) + return "state: 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.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"; + } + return null; + }; + + /** + * Creates an ApiVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ApiVersion} ApiVersion + */ + ApiVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ApiVersion) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ApiVersion(); + 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.apigeeregistry.v1.ApiVersion.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.apigeeregistry.v1.ApiVersion.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.state != null) + message.state = String(object.state); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiVersion.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.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiVersion.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]]); + } + return message; + }; + + /** + * Creates a plain object from an ApiVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @static + * @param {google.cloud.apigeeregistry.v1.ApiVersion} message ApiVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApiVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.state = ""; + } + 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.state != null && message.hasOwnProperty("state")) + object.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.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]]; + } + return object; + }; + + /** + * Converts this ApiVersion to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @instance + * @returns {Object.} JSON object + */ + ApiVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ApiVersion; + })(); + + v1.ApiSpec = (function() { + + /** + * Properties of an ApiSpec. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IApiSpec + * @property {string|null} [name] ApiSpec name + * @property {string|null} [filename] ApiSpec filename + * @property {string|null} [description] ApiSpec description + * @property {string|null} [revisionId] ApiSpec revisionId + * @property {google.protobuf.ITimestamp|null} [createTime] ApiSpec createTime + * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] ApiSpec revisionCreateTime + * @property {google.protobuf.ITimestamp|null} [revisionUpdateTime] ApiSpec revisionUpdateTime + * @property {string|null} [mimeType] ApiSpec mimeType + * @property {number|null} [sizeBytes] ApiSpec sizeBytes + * @property {string|null} [hash] ApiSpec hash + * @property {string|null} [sourceUri] ApiSpec sourceUri + * @property {Uint8Array|null} [contents] ApiSpec contents + * @property {Object.|null} [labels] ApiSpec labels + * @property {Object.|null} [annotations] ApiSpec annotations + */ + + /** + * Constructs a new ApiSpec. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents an ApiSpec. + * @implements IApiSpec + * @constructor + * @param {google.cloud.apigeeregistry.v1.IApiSpec=} [properties] Properties to set + */ + function ApiSpec(properties) { + this.labels = {}; + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ApiSpec name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.name = ""; + + /** + * ApiSpec filename. + * @member {string} filename + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.filename = ""; + + /** + * ApiSpec description. + * @member {string} description + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.description = ""; + + /** + * ApiSpec revisionId. + * @member {string} revisionId + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.revisionId = ""; + + /** + * ApiSpec createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.createTime = null; + + /** + * ApiSpec revisionCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.revisionCreateTime = null; + + /** + * ApiSpec revisionUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} revisionUpdateTime + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.revisionUpdateTime = null; + + /** + * ApiSpec mimeType. + * @member {string} mimeType + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.mimeType = ""; + + /** + * ApiSpec sizeBytes. + * @member {number} sizeBytes + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.sizeBytes = 0; + + /** + * ApiSpec hash. + * @member {string} hash + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.hash = ""; + + /** + * ApiSpec sourceUri. + * @member {string} sourceUri + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.sourceUri = ""; + + /** + * ApiSpec contents. + * @member {Uint8Array} contents + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.contents = $util.newBuffer([]); + + /** + * ApiSpec labels. + * @member {Object.} labels + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.labels = $util.emptyObject; + + /** + * ApiSpec annotations. + * @member {Object.} annotations + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + */ + ApiSpec.prototype.annotations = $util.emptyObject; + + /** + * Creates a new ApiSpec instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @static + * @param {google.cloud.apigeeregistry.v1.IApiSpec=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ApiSpec} ApiSpec instance + */ + ApiSpec.create = function create(properties) { + return new ApiSpec(properties); + }; + + /** + * Encodes the specified ApiSpec message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @static + * @param {google.cloud.apigeeregistry.v1.IApiSpec} message ApiSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApiSpec.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.filename != null && Object.hasOwnProperty.call(message, "filename")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filename); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.revisionId); + 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.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) + $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.revisionUpdateTime != null && Object.hasOwnProperty.call(message, "revisionUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.revisionUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.mimeType); + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.sizeBytes); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.hash); + if (message.sourceUri != null && Object.hasOwnProperty.call(message, "sourceUri")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.sourceUri); + if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) + writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.contents); + 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + 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 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ApiSpec message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @static + * @param {google.cloud.apigeeregistry.v1.IApiSpec} message ApiSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApiSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApiSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ApiSpec} ApiSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApiSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ApiSpec(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.filename = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.revisionId = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.revisionUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.mimeType = reader.string(); + break; + case 9: + message.sizeBytes = reader.int32(); + break; + case 10: + message.hash = reader.string(); + break; + case 11: + message.sourceUri = reader.string(); + break; + case 12: + message.contents = reader.bytes(); + break; + case 14: + 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 15: + 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; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApiSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ApiSpec} ApiSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApiSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApiSpec message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApiSpec.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.filename != null && message.hasOwnProperty("filename")) + if (!$util.isString(message.filename)) + return "filename: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: 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.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); + if (error) + return "revisionCreateTime." + error; + } + if (message.revisionUpdateTime != null && message.hasOwnProperty("revisionUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revisionUpdateTime); + if (error) + return "revisionUpdateTime." + error; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (!$util.isInteger(message.sizeBytes)) + return "sizeBytes: integer expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!$util.isString(message.hash)) + return "hash: string expected"; + if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) + if (!$util.isString(message.sourceUri)) + return "sourceUri: string expected"; + if (message.contents != null && message.hasOwnProperty("contents")) + if (!(message.contents && typeof message.contents.length === "number" || $util.isString(message.contents))) + return "contents: buffer 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.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"; + } + return null; + }; + + /** + * Creates an ApiSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ApiSpec} ApiSpec + */ + ApiSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ApiSpec) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ApiSpec(); + if (object.name != null) + message.name = String(object.name); + if (object.filename != null) + message.filename = String(object.filename); + if (object.description != null) + message.description = String(object.description); + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiSpec.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.revisionCreateTime != null) { + if (typeof object.revisionCreateTime !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiSpec.revisionCreateTime: object expected"); + message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); + } + if (object.revisionUpdateTime != null) { + if (typeof object.revisionUpdateTime !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiSpec.revisionUpdateTime: object expected"); + message.revisionUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionUpdateTime); + } + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.sizeBytes != null) + message.sizeBytes = object.sizeBytes | 0; + if (object.hash != null) + message.hash = String(object.hash); + if (object.sourceUri != null) + message.sourceUri = String(object.sourceUri); + if (object.contents != null) + if (typeof object.contents === "string") + $util.base64.decode(object.contents, message.contents = $util.newBuffer($util.base64.length(object.contents)), 0); + else if (object.contents.length) + message.contents = object.contents; + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiSpec.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.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiSpec.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]]); + } + return message; + }; + + /** + * Creates a plain object from an ApiSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @static + * @param {google.cloud.apigeeregistry.v1.ApiSpec} message ApiSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApiSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { + object.name = ""; + object.filename = ""; + object.description = ""; + object.revisionId = ""; + object.createTime = null; + object.revisionCreateTime = null; + object.revisionUpdateTime = null; + object.mimeType = ""; + object.sizeBytes = 0; + object.hash = ""; + object.sourceUri = ""; + if (options.bytes === String) + object.contents = ""; + else { + object.contents = []; + if (options.bytes !== Array) + object.contents = $util.newBuffer(object.contents); + } + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.filename != null && message.hasOwnProperty("filename")) + object.filename = message.filename; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) + object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); + if (message.revisionUpdateTime != null && message.hasOwnProperty("revisionUpdateTime")) + object.revisionUpdateTime = $root.google.protobuf.Timestamp.toObject(message.revisionUpdateTime, options); + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + object.sizeBytes = message.sizeBytes; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = message.hash; + if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) + object.sourceUri = message.sourceUri; + if (message.contents != null && message.hasOwnProperty("contents")) + object.contents = options.bytes === String ? $util.base64.encode(message.contents, 0, message.contents.length) : options.bytes === Array ? Array.prototype.slice.call(message.contents) : message.contents; + 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.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]]; + } + return object; + }; + + /** + * Converts this ApiSpec to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @instance + * @returns {Object.} JSON object + */ + ApiSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ApiSpec; + })(); + + v1.ApiDeployment = (function() { + + /** + * Properties of an ApiDeployment. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IApiDeployment + * @property {string|null} [name] ApiDeployment name + * @property {string|null} [displayName] ApiDeployment displayName + * @property {string|null} [description] ApiDeployment description + * @property {string|null} [revisionId] ApiDeployment revisionId + * @property {google.protobuf.ITimestamp|null} [createTime] ApiDeployment createTime + * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] ApiDeployment revisionCreateTime + * @property {google.protobuf.ITimestamp|null} [revisionUpdateTime] ApiDeployment revisionUpdateTime + * @property {string|null} [apiSpecRevision] ApiDeployment apiSpecRevision + * @property {string|null} [endpointUri] ApiDeployment endpointUri + * @property {string|null} [externalChannelUri] ApiDeployment externalChannelUri + * @property {string|null} [intendedAudience] ApiDeployment intendedAudience + * @property {string|null} [accessGuidance] ApiDeployment accessGuidance + * @property {Object.|null} [labels] ApiDeployment labels + * @property {Object.|null} [annotations] ApiDeployment annotations + */ + + /** + * Constructs a new ApiDeployment. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents an ApiDeployment. + * @implements IApiDeployment + * @constructor + * @param {google.cloud.apigeeregistry.v1.IApiDeployment=} [properties] Properties to set + */ + function ApiDeployment(properties) { + this.labels = {}; + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ApiDeployment name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.name = ""; + + /** + * ApiDeployment displayName. + * @member {string} displayName + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.displayName = ""; + + /** + * ApiDeployment description. + * @member {string} description + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.description = ""; + + /** + * ApiDeployment revisionId. + * @member {string} revisionId + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.revisionId = ""; + + /** + * ApiDeployment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.createTime = null; + + /** + * ApiDeployment revisionCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.revisionCreateTime = null; + + /** + * ApiDeployment revisionUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} revisionUpdateTime + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.revisionUpdateTime = null; + + /** + * ApiDeployment apiSpecRevision. + * @member {string} apiSpecRevision + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.apiSpecRevision = ""; + + /** + * ApiDeployment endpointUri. + * @member {string} endpointUri + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.endpointUri = ""; + + /** + * ApiDeployment externalChannelUri. + * @member {string} externalChannelUri + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.externalChannelUri = ""; + + /** + * ApiDeployment intendedAudience. + * @member {string} intendedAudience + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.intendedAudience = ""; + + /** + * ApiDeployment accessGuidance. + * @member {string} accessGuidance + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.accessGuidance = ""; + + /** + * ApiDeployment labels. + * @member {Object.} labels + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.labels = $util.emptyObject; + + /** + * ApiDeployment annotations. + * @member {Object.} annotations + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + */ + ApiDeployment.prototype.annotations = $util.emptyObject; + + /** + * Creates a new ApiDeployment instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @static + * @param {google.cloud.apigeeregistry.v1.IApiDeployment=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ApiDeployment} ApiDeployment instance + */ + ApiDeployment.create = function create(properties) { + return new ApiDeployment(properties); + }; + + /** + * Encodes the specified ApiDeployment message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiDeployment.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @static + * @param {google.cloud.apigeeregistry.v1.IApiDeployment} message ApiDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApiDeployment.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.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.revisionId); + 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.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) + $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.revisionUpdateTime != null && Object.hasOwnProperty.call(message, "revisionUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.revisionUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.apiSpecRevision != null && Object.hasOwnProperty.call(message, "apiSpecRevision")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.apiSpecRevision); + if (message.endpointUri != null && Object.hasOwnProperty.call(message, "endpointUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.endpointUri); + if (message.externalChannelUri != null && Object.hasOwnProperty.call(message, "externalChannelUri")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.externalChannelUri); + if (message.intendedAudience != null && Object.hasOwnProperty.call(message, "intendedAudience")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.intendedAudience); + if (message.accessGuidance != null && Object.hasOwnProperty.call(message, "accessGuidance")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.accessGuidance); + 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + 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 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ApiDeployment message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ApiDeployment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @static + * @param {google.cloud.apigeeregistry.v1.IApiDeployment} message ApiDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApiDeployment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApiDeployment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ApiDeployment} ApiDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApiDeployment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ApiDeployment(), 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.description = reader.string(); + break; + case 4: + message.revisionId = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.revisionUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.apiSpecRevision = reader.string(); + break; + case 9: + message.endpointUri = reader.string(); + break; + case 10: + message.externalChannelUri = reader.string(); + break; + case 11: + message.intendedAudience = reader.string(); + break; + case 12: + message.accessGuidance = reader.string(); + break; + case 14: + 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 15: + 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; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApiDeployment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ApiDeployment} ApiDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApiDeployment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApiDeployment message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApiDeployment.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.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: 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.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); + if (error) + return "revisionCreateTime." + error; + } + if (message.revisionUpdateTime != null && message.hasOwnProperty("revisionUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revisionUpdateTime); + if (error) + return "revisionUpdateTime." + error; + } + if (message.apiSpecRevision != null && message.hasOwnProperty("apiSpecRevision")) + if (!$util.isString(message.apiSpecRevision)) + return "apiSpecRevision: string expected"; + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + if (!$util.isString(message.endpointUri)) + return "endpointUri: string expected"; + if (message.externalChannelUri != null && message.hasOwnProperty("externalChannelUri")) + if (!$util.isString(message.externalChannelUri)) + return "externalChannelUri: string expected"; + if (message.intendedAudience != null && message.hasOwnProperty("intendedAudience")) + if (!$util.isString(message.intendedAudience)) + return "intendedAudience: string expected"; + if (message.accessGuidance != null && message.hasOwnProperty("accessGuidance")) + if (!$util.isString(message.accessGuidance)) + return "accessGuidance: 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.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"; + } + return null; + }; + + /** + * Creates an ApiDeployment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ApiDeployment} ApiDeployment + */ + ApiDeployment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ApiDeployment) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ApiDeployment(); + 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.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiDeployment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.revisionCreateTime != null) { + if (typeof object.revisionCreateTime !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiDeployment.revisionCreateTime: object expected"); + message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); + } + if (object.revisionUpdateTime != null) { + if (typeof object.revisionUpdateTime !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiDeployment.revisionUpdateTime: object expected"); + message.revisionUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionUpdateTime); + } + if (object.apiSpecRevision != null) + message.apiSpecRevision = String(object.apiSpecRevision); + if (object.endpointUri != null) + message.endpointUri = String(object.endpointUri); + if (object.externalChannelUri != null) + message.externalChannelUri = String(object.externalChannelUri); + if (object.intendedAudience != null) + message.intendedAudience = String(object.intendedAudience); + if (object.accessGuidance != null) + message.accessGuidance = String(object.accessGuidance); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiDeployment.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.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ApiDeployment.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]]); + } + return message; + }; + + /** + * Creates a plain object from an ApiDeployment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @static + * @param {google.cloud.apigeeregistry.v1.ApiDeployment} message ApiDeployment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApiDeployment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.revisionId = ""; + object.createTime = null; + object.revisionCreateTime = null; + object.revisionUpdateTime = null; + object.apiSpecRevision = ""; + object.endpointUri = ""; + object.externalChannelUri = ""; + object.intendedAudience = ""; + object.accessGuidance = ""; + } + 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.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) + object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); + if (message.revisionUpdateTime != null && message.hasOwnProperty("revisionUpdateTime")) + object.revisionUpdateTime = $root.google.protobuf.Timestamp.toObject(message.revisionUpdateTime, options); + if (message.apiSpecRevision != null && message.hasOwnProperty("apiSpecRevision")) + object.apiSpecRevision = message.apiSpecRevision; + if (message.endpointUri != null && message.hasOwnProperty("endpointUri")) + object.endpointUri = message.endpointUri; + if (message.externalChannelUri != null && message.hasOwnProperty("externalChannelUri")) + object.externalChannelUri = message.externalChannelUri; + if (message.intendedAudience != null && message.hasOwnProperty("intendedAudience")) + object.intendedAudience = message.intendedAudience; + if (message.accessGuidance != null && message.hasOwnProperty("accessGuidance")) + object.accessGuidance = message.accessGuidance; + 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.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]]; + } + return object; + }; + + /** + * Converts this ApiDeployment to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @instance + * @returns {Object.} JSON object + */ + ApiDeployment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ApiDeployment; + })(); + + v1.Artifact = (function() { + + /** + * Properties of an Artifact. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IArtifact + * @property {string|null} [name] Artifact name + * @property {google.protobuf.ITimestamp|null} [createTime] Artifact createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Artifact updateTime + * @property {string|null} [mimeType] Artifact mimeType + * @property {number|null} [sizeBytes] Artifact sizeBytes + * @property {string|null} [hash] Artifact hash + * @property {Uint8Array|null} [contents] Artifact contents + */ + + /** + * Constructs a new Artifact. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents an Artifact. + * @implements IArtifact + * @constructor + * @param {google.cloud.apigeeregistry.v1.IArtifact=} [properties] Properties to set + */ + function Artifact(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Artifact name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @instance + */ + Artifact.prototype.name = ""; + + /** + * Artifact createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @instance + */ + Artifact.prototype.createTime = null; + + /** + * Artifact updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @instance + */ + Artifact.prototype.updateTime = null; + + /** + * Artifact mimeType. + * @member {string} mimeType + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @instance + */ + Artifact.prototype.mimeType = ""; + + /** + * Artifact sizeBytes. + * @member {number} sizeBytes + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @instance + */ + Artifact.prototype.sizeBytes = 0; + + /** + * Artifact hash. + * @member {string} hash + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @instance + */ + Artifact.prototype.hash = ""; + + /** + * Artifact contents. + * @member {Uint8Array} contents + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @instance + */ + Artifact.prototype.contents = $util.newBuffer([]); + + /** + * Creates a new Artifact instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @static + * @param {google.cloud.apigeeregistry.v1.IArtifact=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.Artifact} Artifact instance + */ + Artifact.create = function create(properties) { + return new Artifact(properties); + }; + + /** + * Encodes the specified Artifact message. Does not implicitly {@link google.cloud.apigeeregistry.v1.Artifact.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @static + * @param {google.cloud.apigeeregistry.v1.IArtifact} message Artifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Artifact.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 2, wireType 2 =*/18).fork()).ldelim(); + 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.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.mimeType); + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sizeBytes); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.hash); + if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.contents); + return writer; + }; + + /** + * Encodes the specified Artifact message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.Artifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @static + * @param {google.cloud.apigeeregistry.v1.IArtifact} message Artifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Artifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Artifact message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.Artifact} Artifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Artifact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.Artifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.mimeType = reader.string(); + break; + case 5: + message.sizeBytes = reader.int32(); + break; + case 6: + message.hash = reader.string(); + break; + case 7: + message.contents = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Artifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.Artifact} Artifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Artifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Artifact message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Artifact.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.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (!$util.isInteger(message.sizeBytes)) + return "sizeBytes: integer expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!$util.isString(message.hash)) + return "hash: string expected"; + if (message.contents != null && message.hasOwnProperty("contents")) + if (!(message.contents && typeof message.contents.length === "number" || $util.isString(message.contents))) + return "contents: buffer expected"; + return null; + }; + + /** + * Creates an Artifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.Artifact} Artifact + */ + Artifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.Artifact) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.Artifact(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.Artifact.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.apigeeregistry.v1.Artifact.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.sizeBytes != null) + message.sizeBytes = object.sizeBytes | 0; + if (object.hash != null) + message.hash = String(object.hash); + if (object.contents != null) + if (typeof object.contents === "string") + $util.base64.decode(object.contents, message.contents = $util.newBuffer($util.base64.length(object.contents)), 0); + else if (object.contents.length) + message.contents = object.contents; + return message; + }; + + /** + * Creates a plain object from an Artifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @static + * @param {google.cloud.apigeeregistry.v1.Artifact} message Artifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Artifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.mimeType = ""; + object.sizeBytes = 0; + object.hash = ""; + if (options.bytes === String) + object.contents = ""; + else { + object.contents = []; + if (options.bytes !== Array) + object.contents = $util.newBuffer(object.contents); + } + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + object.sizeBytes = message.sizeBytes; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = message.hash; + if (message.contents != null && message.hasOwnProperty("contents")) + object.contents = options.bytes === String ? $util.base64.encode(message.contents, 0, message.contents.length) : options.bytes === Array ? Array.prototype.slice.call(message.contents) : message.contents; + return object; + }; + + /** + * Converts this Artifact to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @instance + * @returns {Object.} JSON object + */ + Artifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Artifact; + })(); + + v1.Registry = (function() { + + /** + * Constructs a new Registry service. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a Registry + * @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 Registry(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Registry.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Registry; + + /** + * Creates new Registry service using the specified rpc implementation. + * @function create + * @memberof google.cloud.apigeeregistry.v1.Registry + * @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 {Registry} RPC service. Useful where requests and/or responses are streamed. + */ + Registry.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApis}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef ListApisCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ListApisResponse} [response] ListApisResponse + */ + + /** + * Calls ListApis. + * @function listApis + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApisRequest} request ListApisRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.ListApisCallback} callback Node-style callback called with the error, if any, and ListApisResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.listApis = function listApis(request, callback) { + return this.rpcCall(listApis, $root.google.cloud.apigeeregistry.v1.ListApisRequest, $root.google.cloud.apigeeregistry.v1.ListApisResponse, request, callback); + }, "name", { value: "ListApis" }); + + /** + * Calls ListApis. + * @function listApis + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApisRequest} request ListApisRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApi}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef GetApiCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.Api} [response] Api + */ + + /** + * Calls GetApi. + * @function getApi + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetApiRequest} request GetApiRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.GetApiCallback} callback Node-style callback called with the error, if any, and Api + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.getApi = function getApi(request, callback) { + return this.rpcCall(getApi, $root.google.cloud.apigeeregistry.v1.GetApiRequest, $root.google.cloud.apigeeregistry.v1.Api, request, callback); + }, "name", { value: "GetApi" }); + + /** + * Calls GetApi. + * @function getApi + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetApiRequest} request GetApiRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApi}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef CreateApiCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.Api} [response] Api + */ + + /** + * Calls CreateApi. + * @function createApi + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateApiRequest} request CreateApiRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.CreateApiCallback} callback Node-style callback called with the error, if any, and Api + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.createApi = function createApi(request, callback) { + return this.rpcCall(createApi, $root.google.cloud.apigeeregistry.v1.CreateApiRequest, $root.google.cloud.apigeeregistry.v1.Api, request, callback); + }, "name", { value: "CreateApi" }); + + /** + * Calls CreateApi. + * @function createApi + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateApiRequest} request CreateApiRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApi}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef UpdateApiCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.Api} [response] Api + */ + + /** + * Calls UpdateApi. + * @function updateApi + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IUpdateApiRequest} request UpdateApiRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.UpdateApiCallback} callback Node-style callback called with the error, if any, and Api + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.updateApi = function updateApi(request, callback) { + return this.rpcCall(updateApi, $root.google.cloud.apigeeregistry.v1.UpdateApiRequest, $root.google.cloud.apigeeregistry.v1.Api, request, callback); + }, "name", { value: "UpdateApi" }); + + /** + * Calls UpdateApi. + * @function updateApi + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IUpdateApiRequest} request UpdateApiRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApi}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef DeleteApiCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteApi. + * @function deleteApi + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiRequest} request DeleteApiRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.DeleteApiCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.deleteApi = function deleteApi(request, callback) { + return this.rpcCall(deleteApi, $root.google.cloud.apigeeregistry.v1.DeleteApiRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteApi" }); + + /** + * Calls DeleteApi. + * @function deleteApi + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiRequest} request DeleteApiRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiVersions}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef ListApiVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ListApiVersionsResponse} [response] ListApiVersionsResponse + */ + + /** + * Calls ListApiVersions. + * @function listApiVersions + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApiVersionsRequest} request ListApiVersionsRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.ListApiVersionsCallback} callback Node-style callback called with the error, if any, and ListApiVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.listApiVersions = function listApiVersions(request, callback) { + return this.rpcCall(listApiVersions, $root.google.cloud.apigeeregistry.v1.ListApiVersionsRequest, $root.google.cloud.apigeeregistry.v1.ListApiVersionsResponse, request, callback); + }, "name", { value: "ListApiVersions" }); + + /** + * Calls ListApiVersions. + * @function listApiVersions + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApiVersionsRequest} request ListApiVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiVersion}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef GetApiVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiVersion} [response] ApiVersion + */ + + /** + * Calls GetApiVersion. + * @function getApiVersion + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetApiVersionRequest} request GetApiVersionRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.GetApiVersionCallback} callback Node-style callback called with the error, if any, and ApiVersion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.getApiVersion = function getApiVersion(request, callback) { + return this.rpcCall(getApiVersion, $root.google.cloud.apigeeregistry.v1.GetApiVersionRequest, $root.google.cloud.apigeeregistry.v1.ApiVersion, request, callback); + }, "name", { value: "GetApiVersion" }); + + /** + * Calls GetApiVersion. + * @function getApiVersion + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetApiVersionRequest} request GetApiVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiVersion}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef CreateApiVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiVersion} [response] ApiVersion + */ + + /** + * Calls CreateApiVersion. + * @function createApiVersion + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateApiVersionRequest} request CreateApiVersionRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.CreateApiVersionCallback} callback Node-style callback called with the error, if any, and ApiVersion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.createApiVersion = function createApiVersion(request, callback) { + return this.rpcCall(createApiVersion, $root.google.cloud.apigeeregistry.v1.CreateApiVersionRequest, $root.google.cloud.apigeeregistry.v1.ApiVersion, request, callback); + }, "name", { value: "CreateApiVersion" }); + + /** + * Calls CreateApiVersion. + * @function createApiVersion + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateApiVersionRequest} request CreateApiVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiVersion}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef UpdateApiVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiVersion} [response] ApiVersion + */ + + /** + * Calls UpdateApiVersion. + * @function updateApiVersion + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest} request UpdateApiVersionRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.UpdateApiVersionCallback} callback Node-style callback called with the error, if any, and ApiVersion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.updateApiVersion = function updateApiVersion(request, callback) { + return this.rpcCall(updateApiVersion, $root.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest, $root.google.cloud.apigeeregistry.v1.ApiVersion, request, callback); + }, "name", { value: "UpdateApiVersion" }); + + /** + * Calls UpdateApiVersion. + * @function updateApiVersion + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest} request UpdateApiVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiVersion}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef DeleteApiVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteApiVersion. + * @function deleteApiVersion + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest} request DeleteApiVersionRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.DeleteApiVersionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.deleteApiVersion = function deleteApiVersion(request, callback) { + return this.rpcCall(deleteApiVersion, $root.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteApiVersion" }); + + /** + * Calls DeleteApiVersion. + * @function deleteApiVersion + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest} request DeleteApiVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiSpecs}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef ListApiSpecsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ListApiSpecsResponse} [response] ListApiSpecsResponse + */ + + /** + * Calls ListApiSpecs. + * @function listApiSpecs + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApiSpecsRequest} request ListApiSpecsRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.ListApiSpecsCallback} callback Node-style callback called with the error, if any, and ListApiSpecsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.listApiSpecs = function listApiSpecs(request, callback) { + return this.rpcCall(listApiSpecs, $root.google.cloud.apigeeregistry.v1.ListApiSpecsRequest, $root.google.cloud.apigeeregistry.v1.ListApiSpecsResponse, request, callback); + }, "name", { value: "ListApiSpecs" }); + + /** + * Calls ListApiSpecs. + * @function listApiSpecs + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApiSpecsRequest} request ListApiSpecsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiSpec}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef GetApiSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiSpec} [response] ApiSpec + */ + + /** + * Calls GetApiSpec. + * @function getApiSpec + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecRequest} request GetApiSpecRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.GetApiSpecCallback} callback Node-style callback called with the error, if any, and ApiSpec + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.getApiSpec = function getApiSpec(request, callback) { + return this.rpcCall(getApiSpec, $root.google.cloud.apigeeregistry.v1.GetApiSpecRequest, $root.google.cloud.apigeeregistry.v1.ApiSpec, request, callback); + }, "name", { value: "GetApiSpec" }); + + /** + * Calls GetApiSpec. + * @function getApiSpec + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecRequest} request GetApiSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiSpecContents}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef GetApiSpecContentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls GetApiSpecContents. + * @function getApiSpecContents + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest} request GetApiSpecContentsRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.GetApiSpecContentsCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.getApiSpecContents = function getApiSpecContents(request, callback) { + return this.rpcCall(getApiSpecContents, $root.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "GetApiSpecContents" }); + + /** + * Calls GetApiSpecContents. + * @function getApiSpecContents + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest} request GetApiSpecContentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiSpec}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef CreateApiSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiSpec} [response] ApiSpec + */ + + /** + * Calls CreateApiSpec. + * @function createApiSpec + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateApiSpecRequest} request CreateApiSpecRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.CreateApiSpecCallback} callback Node-style callback called with the error, if any, and ApiSpec + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.createApiSpec = function createApiSpec(request, callback) { + return this.rpcCall(createApiSpec, $root.google.cloud.apigeeregistry.v1.CreateApiSpecRequest, $root.google.cloud.apigeeregistry.v1.ApiSpec, request, callback); + }, "name", { value: "CreateApiSpec" }); + + /** + * Calls CreateApiSpec. + * @function createApiSpec + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateApiSpecRequest} request CreateApiSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiSpec}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef UpdateApiSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiSpec} [response] ApiSpec + */ + + /** + * Calls UpdateApiSpec. + * @function updateApiSpec + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest} request UpdateApiSpecRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.UpdateApiSpecCallback} callback Node-style callback called with the error, if any, and ApiSpec + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.updateApiSpec = function updateApiSpec(request, callback) { + return this.rpcCall(updateApiSpec, $root.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest, $root.google.cloud.apigeeregistry.v1.ApiSpec, request, callback); + }, "name", { value: "UpdateApiSpec" }); + + /** + * Calls UpdateApiSpec. + * @function updateApiSpec + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest} request UpdateApiSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiSpec}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef DeleteApiSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteApiSpec. + * @function deleteApiSpec + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest} request DeleteApiSpecRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.deleteApiSpec = function deleteApiSpec(request, callback) { + return this.rpcCall(deleteApiSpec, $root.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteApiSpec" }); + + /** + * Calls DeleteApiSpec. + * @function deleteApiSpec + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest} request DeleteApiSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#tagApiSpecRevision}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef TagApiSpecRevisionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiSpec} [response] ApiSpec + */ + + /** + * Calls TagApiSpecRevision. + * @function tagApiSpecRevision + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest} request TagApiSpecRevisionRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.TagApiSpecRevisionCallback} callback Node-style callback called with the error, if any, and ApiSpec + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.tagApiSpecRevision = function tagApiSpecRevision(request, callback) { + return this.rpcCall(tagApiSpecRevision, $root.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest, $root.google.cloud.apigeeregistry.v1.ApiSpec, request, callback); + }, "name", { value: "TagApiSpecRevision" }); + + /** + * Calls TagApiSpecRevision. + * @function tagApiSpecRevision + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest} request TagApiSpecRevisionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiSpecRevisions}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef ListApiSpecRevisionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse} [response] ListApiSpecRevisionsResponse + */ + + /** + * Calls ListApiSpecRevisions. + * @function listApiSpecRevisions + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest} request ListApiSpecRevisionsRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.ListApiSpecRevisionsCallback} callback Node-style callback called with the error, if any, and ListApiSpecRevisionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.listApiSpecRevisions = function listApiSpecRevisions(request, callback) { + return this.rpcCall(listApiSpecRevisions, $root.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest, $root.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse, request, callback); + }, "name", { value: "ListApiSpecRevisions" }); + + /** + * Calls ListApiSpecRevisions. + * @function listApiSpecRevisions + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest} request ListApiSpecRevisionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#rollbackApiSpec}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef RollbackApiSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiSpec} [response] ApiSpec + */ + + /** + * Calls RollbackApiSpec. + * @function rollbackApiSpec + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest} request RollbackApiSpecRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.RollbackApiSpecCallback} callback Node-style callback called with the error, if any, and ApiSpec + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.rollbackApiSpec = function rollbackApiSpec(request, callback) { + return this.rpcCall(rollbackApiSpec, $root.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest, $root.google.cloud.apigeeregistry.v1.ApiSpec, request, callback); + }, "name", { value: "RollbackApiSpec" }); + + /** + * Calls RollbackApiSpec. + * @function rollbackApiSpec + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest} request RollbackApiSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiSpecRevision}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef DeleteApiSpecRevisionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiSpec} [response] ApiSpec + */ + + /** + * Calls DeleteApiSpecRevision. + * @function deleteApiSpecRevision + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest} request DeleteApiSpecRevisionRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecRevisionCallback} callback Node-style callback called with the error, if any, and ApiSpec + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.deleteApiSpecRevision = function deleteApiSpecRevision(request, callback) { + return this.rpcCall(deleteApiSpecRevision, $root.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest, $root.google.cloud.apigeeregistry.v1.ApiSpec, request, callback); + }, "name", { value: "DeleteApiSpecRevision" }); + + /** + * Calls DeleteApiSpecRevision. + * @function deleteApiSpecRevision + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest} request DeleteApiSpecRevisionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiDeployments}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef ListApiDeploymentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse} [response] ListApiDeploymentsResponse + */ + + /** + * Calls ListApiDeployments. + * @function listApiDeployments + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest} request ListApiDeploymentsRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentsCallback} callback Node-style callback called with the error, if any, and ListApiDeploymentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.listApiDeployments = function listApiDeployments(request, callback) { + return this.rpcCall(listApiDeployments, $root.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest, $root.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse, request, callback); + }, "name", { value: "ListApiDeployments" }); + + /** + * Calls ListApiDeployments. + * @function listApiDeployments + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest} request ListApiDeploymentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiDeployment}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef GetApiDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiDeployment} [response] ApiDeployment + */ + + /** + * Calls GetApiDeployment. + * @function getApiDeployment + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest} request GetApiDeploymentRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.GetApiDeploymentCallback} callback Node-style callback called with the error, if any, and ApiDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.getApiDeployment = function getApiDeployment(request, callback) { + return this.rpcCall(getApiDeployment, $root.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest, $root.google.cloud.apigeeregistry.v1.ApiDeployment, request, callback); + }, "name", { value: "GetApiDeployment" }); + + /** + * Calls GetApiDeployment. + * @function getApiDeployment + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest} request GetApiDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiDeployment}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef CreateApiDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiDeployment} [response] ApiDeployment + */ + + /** + * Calls CreateApiDeployment. + * @function createApiDeployment + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest} request CreateApiDeploymentRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.CreateApiDeploymentCallback} callback Node-style callback called with the error, if any, and ApiDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.createApiDeployment = function createApiDeployment(request, callback) { + return this.rpcCall(createApiDeployment, $root.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest, $root.google.cloud.apigeeregistry.v1.ApiDeployment, request, callback); + }, "name", { value: "CreateApiDeployment" }); + + /** + * Calls CreateApiDeployment. + * @function createApiDeployment + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest} request CreateApiDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiDeployment}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef UpdateApiDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiDeployment} [response] ApiDeployment + */ + + /** + * Calls UpdateApiDeployment. + * @function updateApiDeployment + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest} request UpdateApiDeploymentRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.UpdateApiDeploymentCallback} callback Node-style callback called with the error, if any, and ApiDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.updateApiDeployment = function updateApiDeployment(request, callback) { + return this.rpcCall(updateApiDeployment, $root.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest, $root.google.cloud.apigeeregistry.v1.ApiDeployment, request, callback); + }, "name", { value: "UpdateApiDeployment" }); + + /** + * Calls UpdateApiDeployment. + * @function updateApiDeployment + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest} request UpdateApiDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiDeployment}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef DeleteApiDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteApiDeployment. + * @function deleteApiDeployment + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest} request DeleteApiDeploymentRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.deleteApiDeployment = function deleteApiDeployment(request, callback) { + return this.rpcCall(deleteApiDeployment, $root.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteApiDeployment" }); + + /** + * Calls DeleteApiDeployment. + * @function deleteApiDeployment + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest} request DeleteApiDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#tagApiDeploymentRevision}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef TagApiDeploymentRevisionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiDeployment} [response] ApiDeployment + */ + + /** + * Calls TagApiDeploymentRevision. + * @function tagApiDeploymentRevision + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest} request TagApiDeploymentRevisionRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.TagApiDeploymentRevisionCallback} callback Node-style callback called with the error, if any, and ApiDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.tagApiDeploymentRevision = function tagApiDeploymentRevision(request, callback) { + return this.rpcCall(tagApiDeploymentRevision, $root.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest, $root.google.cloud.apigeeregistry.v1.ApiDeployment, request, callback); + }, "name", { value: "TagApiDeploymentRevision" }); + + /** + * Calls TagApiDeploymentRevision. + * @function tagApiDeploymentRevision + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest} request TagApiDeploymentRevisionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiDeploymentRevisions}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef ListApiDeploymentRevisionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse} [response] ListApiDeploymentRevisionsResponse + */ + + /** + * Calls ListApiDeploymentRevisions. + * @function listApiDeploymentRevisions + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest} request ListApiDeploymentRevisionsRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentRevisionsCallback} callback Node-style callback called with the error, if any, and ListApiDeploymentRevisionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.listApiDeploymentRevisions = function listApiDeploymentRevisions(request, callback) { + return this.rpcCall(listApiDeploymentRevisions, $root.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest, $root.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse, request, callback); + }, "name", { value: "ListApiDeploymentRevisions" }); + + /** + * Calls ListApiDeploymentRevisions. + * @function listApiDeploymentRevisions + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest} request ListApiDeploymentRevisionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#rollbackApiDeployment}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef RollbackApiDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiDeployment} [response] ApiDeployment + */ + + /** + * Calls RollbackApiDeployment. + * @function rollbackApiDeployment + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest} request RollbackApiDeploymentRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.RollbackApiDeploymentCallback} callback Node-style callback called with the error, if any, and ApiDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.rollbackApiDeployment = function rollbackApiDeployment(request, callback) { + return this.rpcCall(rollbackApiDeployment, $root.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest, $root.google.cloud.apigeeregistry.v1.ApiDeployment, request, callback); + }, "name", { value: "RollbackApiDeployment" }); + + /** + * Calls RollbackApiDeployment. + * @function rollbackApiDeployment + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest} request RollbackApiDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiDeploymentRevision}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef DeleteApiDeploymentRevisionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ApiDeployment} [response] ApiDeployment + */ + + /** + * Calls DeleteApiDeploymentRevision. + * @function deleteApiDeploymentRevision + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest} request DeleteApiDeploymentRevisionRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentRevisionCallback} callback Node-style callback called with the error, if any, and ApiDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.deleteApiDeploymentRevision = function deleteApiDeploymentRevision(request, callback) { + return this.rpcCall(deleteApiDeploymentRevision, $root.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest, $root.google.cloud.apigeeregistry.v1.ApiDeployment, request, callback); + }, "name", { value: "DeleteApiDeploymentRevision" }); + + /** + * Calls DeleteApiDeploymentRevision. + * @function deleteApiDeploymentRevision + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest} request DeleteApiDeploymentRevisionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listArtifacts}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef ListArtifactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.ListArtifactsResponse} [response] ListArtifactsResponse + */ + + /** + * Calls ListArtifacts. + * @function listArtifacts + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListArtifactsRequest} request ListArtifactsRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.ListArtifactsCallback} callback Node-style callback called with the error, if any, and ListArtifactsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.listArtifacts = function listArtifacts(request, callback) { + return this.rpcCall(listArtifacts, $root.google.cloud.apigeeregistry.v1.ListArtifactsRequest, $root.google.cloud.apigeeregistry.v1.ListArtifactsResponse, request, callback); + }, "name", { value: "ListArtifacts" }); + + /** + * Calls ListArtifacts. + * @function listArtifacts + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IListArtifactsRequest} request ListArtifactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getArtifact}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef GetArtifactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.Artifact} [response] Artifact + */ + + /** + * Calls GetArtifact. + * @function getArtifact + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetArtifactRequest} request GetArtifactRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.GetArtifactCallback} callback Node-style callback called with the error, if any, and Artifact + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.getArtifact = function getArtifact(request, callback) { + return this.rpcCall(getArtifact, $root.google.cloud.apigeeregistry.v1.GetArtifactRequest, $root.google.cloud.apigeeregistry.v1.Artifact, request, callback); + }, "name", { value: "GetArtifact" }); + + /** + * Calls GetArtifact. + * @function getArtifact + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetArtifactRequest} request GetArtifactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getArtifactContents}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef GetArtifactContentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls GetArtifactContents. + * @function getArtifactContents + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest} request GetArtifactContentsRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.GetArtifactContentsCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.getArtifactContents = function getArtifactContents(request, callback) { + return this.rpcCall(getArtifactContents, $root.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "GetArtifactContents" }); + + /** + * Calls GetArtifactContents. + * @function getArtifactContents + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest} request GetArtifactContentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createArtifact}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef CreateArtifactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.Artifact} [response] Artifact + */ + + /** + * Calls CreateArtifact. + * @function createArtifact + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateArtifactRequest} request CreateArtifactRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.CreateArtifactCallback} callback Node-style callback called with the error, if any, and Artifact + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.createArtifact = function createArtifact(request, callback) { + return this.rpcCall(createArtifact, $root.google.cloud.apigeeregistry.v1.CreateArtifactRequest, $root.google.cloud.apigeeregistry.v1.Artifact, request, callback); + }, "name", { value: "CreateArtifact" }); + + /** + * Calls CreateArtifact. + * @function createArtifact + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.ICreateArtifactRequest} request CreateArtifactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#replaceArtifact}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef ReplaceArtifactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.apigeeregistry.v1.Artifact} [response] Artifact + */ + + /** + * Calls ReplaceArtifact. + * @function replaceArtifact + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IReplaceArtifactRequest} request ReplaceArtifactRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.ReplaceArtifactCallback} callback Node-style callback called with the error, if any, and Artifact + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.replaceArtifact = function replaceArtifact(request, callback) { + return this.rpcCall(replaceArtifact, $root.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest, $root.google.cloud.apigeeregistry.v1.Artifact, request, callback); + }, "name", { value: "ReplaceArtifact" }); + + /** + * Calls ReplaceArtifact. + * @function replaceArtifact + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IReplaceArtifactRequest} request ReplaceArtifactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteArtifact}. + * @memberof google.cloud.apigeeregistry.v1.Registry + * @typedef DeleteArtifactCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteArtifact. + * @function deleteArtifact + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteArtifactRequest} request DeleteArtifactRequest message or plain object + * @param {google.cloud.apigeeregistry.v1.Registry.DeleteArtifactCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Registry.prototype.deleteArtifact = function deleteArtifact(request, callback) { + return this.rpcCall(deleteArtifact, $root.google.cloud.apigeeregistry.v1.DeleteArtifactRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteArtifact" }); + + /** + * Calls DeleteArtifact. + * @function deleteArtifact + * @memberof google.cloud.apigeeregistry.v1.Registry + * @instance + * @param {google.cloud.apigeeregistry.v1.IDeleteArtifactRequest} request DeleteArtifactRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Registry; + })(); + + v1.ListApisRequest = (function() { + + /** + * Properties of a ListApisRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApisRequest + * @property {string|null} [parent] ListApisRequest parent + * @property {number|null} [pageSize] ListApisRequest pageSize + * @property {string|null} [pageToken] ListApisRequest pageToken + * @property {string|null} [filter] ListApisRequest filter + */ + + /** + * Constructs a new ListApisRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApisRequest. + * @implements IListApisRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApisRequest=} [properties] Properties to set + */ + function ListApisRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApisRequest parent. + * @member {string} parent + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @instance + */ + ListApisRequest.prototype.parent = ""; + + /** + * ListApisRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @instance + */ + ListApisRequest.prototype.pageSize = 0; + + /** + * ListApisRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @instance + */ + ListApisRequest.prototype.pageToken = ""; + + /** + * ListApisRequest filter. + * @member {string} filter + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @instance + */ + ListApisRequest.prototype.filter = ""; + + /** + * Creates a new ListApisRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApisRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApisRequest} ListApisRequest instance + */ + ListApisRequest.create = function create(properties) { + return new ListApisRequest(properties); + }; + + /** + * Encodes the specified ListApisRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApisRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApisRequest} message ListApisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApisRequest.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 ListApisRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApisRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApisRequest} message ListApisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApisRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApisRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApisRequest} ListApisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApisRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApisRequest(); + 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 ListApisRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApisRequest} ListApisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApisRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApisRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApisRequest.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 ListApisRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApisRequest} ListApisRequest + */ + ListApisRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApisRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApisRequest(); + 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 ListApisRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ListApisRequest} message ListApisRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApisRequest.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 ListApisRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @instance + * @returns {Object.} JSON object + */ + ListApisRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApisRequest; + })(); + + v1.ListApisResponse = (function() { + + /** + * Properties of a ListApisResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApisResponse + * @property {Array.|null} [apis] ListApisResponse apis + * @property {string|null} [nextPageToken] ListApisResponse nextPageToken + */ + + /** + * Constructs a new ListApisResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApisResponse. + * @implements IListApisResponse + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApisResponse=} [properties] Properties to set + */ + function ListApisResponse(properties) { + this.apis = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApisResponse apis. + * @member {Array.} apis + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @instance + */ + ListApisResponse.prototype.apis = $util.emptyArray; + + /** + * ListApisResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @instance + */ + ListApisResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListApisResponse instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApisResponse=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApisResponse} ListApisResponse instance + */ + ListApisResponse.create = function create(properties) { + return new ListApisResponse(properties); + }; + + /** + * Encodes the specified ListApisResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApisResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApisResponse} message ListApisResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApisResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apis != null && message.apis.length) + for (var i = 0; i < message.apis.length; ++i) + $root.google.cloud.apigeeregistry.v1.Api.encode(message.apis[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 ListApisResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApisResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApisResponse} message ListApisResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApisResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApisResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApisResponse} ListApisResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApisResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApisResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.apis && message.apis.length)) + message.apis = []; + message.apis.push($root.google.cloud.apigeeregistry.v1.Api.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListApisResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApisResponse} ListApisResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApisResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApisResponse message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApisResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apis != null && message.hasOwnProperty("apis")) { + if (!Array.isArray(message.apis)) + return "apis: array expected"; + for (var i = 0; i < message.apis.length; ++i) { + var error = $root.google.cloud.apigeeregistry.v1.Api.verify(message.apis[i]); + if (error) + return "apis." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListApisResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApisResponse} ListApisResponse + */ + ListApisResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApisResponse) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApisResponse(); + if (object.apis) { + if (!Array.isArray(object.apis)) + throw TypeError(".google.cloud.apigeeregistry.v1.ListApisResponse.apis: array expected"); + message.apis = []; + for (var i = 0; i < object.apis.length; ++i) { + if (typeof object.apis[i] !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ListApisResponse.apis: object expected"); + message.apis[i] = $root.google.cloud.apigeeregistry.v1.Api.fromObject(object.apis[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListApisResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @static + * @param {google.cloud.apigeeregistry.v1.ListApisResponse} message ListApisResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApisResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.apis = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.apis && message.apis.length) { + object.apis = []; + for (var j = 0; j < message.apis.length; ++j) + object.apis[j] = $root.google.cloud.apigeeregistry.v1.Api.toObject(message.apis[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListApisResponse to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @instance + * @returns {Object.} JSON object + */ + ListApisResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApisResponse; + })(); + + v1.GetApiRequest = (function() { + + /** + * Properties of a GetApiRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IGetApiRequest + * @property {string|null} [name] GetApiRequest name + */ + + /** + * Constructs a new GetApiRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a GetApiRequest. + * @implements IGetApiRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IGetApiRequest=} [properties] Properties to set + */ + function GetApiRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetApiRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.GetApiRequest + * @instance + */ + GetApiRequest.prototype.name = ""; + + /** + * Creates a new GetApiRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.GetApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.GetApiRequest} GetApiRequest instance + */ + GetApiRequest.create = function create(properties) { + return new GetApiRequest(properties); + }; + + /** + * Encodes the specified GetApiRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.GetApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiRequest} message GetApiRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetApiRequest.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 GetApiRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiRequest} message GetApiRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetApiRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetApiRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.GetApiRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.GetApiRequest} GetApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetApiRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.GetApiRequest(); + 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 GetApiRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetApiRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.GetApiRequest} GetApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetApiRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetApiRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.GetApiRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetApiRequest.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 GetApiRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.GetApiRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.GetApiRequest} GetApiRequest + */ + GetApiRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.GetApiRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.GetApiRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetApiRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.GetApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.GetApiRequest} message GetApiRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetApiRequest.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 GetApiRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.GetApiRequest + * @instance + * @returns {Object.} JSON object + */ + GetApiRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetApiRequest; + })(); + + v1.CreateApiRequest = (function() { + + /** + * Properties of a CreateApiRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface ICreateApiRequest + * @property {string|null} [parent] CreateApiRequest parent + * @property {google.cloud.apigeeregistry.v1.IApi|null} [api] CreateApiRequest api + * @property {string|null} [apiId] CreateApiRequest apiId + */ + + /** + * Constructs a new CreateApiRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a CreateApiRequest. + * @implements ICreateApiRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.ICreateApiRequest=} [properties] Properties to set + */ + function CreateApiRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateApiRequest parent. + * @member {string} parent + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @instance + */ + CreateApiRequest.prototype.parent = ""; + + /** + * CreateApiRequest api. + * @member {google.cloud.apigeeregistry.v1.IApi|null|undefined} api + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @instance + */ + CreateApiRequest.prototype.api = null; + + /** + * CreateApiRequest apiId. + * @member {string} apiId + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @instance + */ + CreateApiRequest.prototype.apiId = ""; + + /** + * Creates a new CreateApiRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.CreateApiRequest} CreateApiRequest instance + */ + CreateApiRequest.create = function create(properties) { + return new CreateApiRequest(properties); + }; + + /** + * Encodes the specified CreateApiRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiRequest} message CreateApiRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateApiRequest.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.api != null && Object.hasOwnProperty.call(message, "api")) + $root.google.cloud.apigeeregistry.v1.Api.encode(message.api, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.apiId != null && Object.hasOwnProperty.call(message, "apiId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.apiId); + return writer; + }; + + /** + * Encodes the specified CreateApiRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiRequest} message CreateApiRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateApiRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateApiRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.CreateApiRequest} CreateApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateApiRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.CreateApiRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.api = $root.google.cloud.apigeeregistry.v1.Api.decode(reader, reader.uint32()); + break; + case 3: + message.apiId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateApiRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.CreateApiRequest} CreateApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateApiRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateApiRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateApiRequest.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.api != null && message.hasOwnProperty("api")) { + var error = $root.google.cloud.apigeeregistry.v1.Api.verify(message.api); + if (error) + return "api." + error; + } + if (message.apiId != null && message.hasOwnProperty("apiId")) + if (!$util.isString(message.apiId)) + return "apiId: string expected"; + return null; + }; + + /** + * Creates a CreateApiRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.CreateApiRequest} CreateApiRequest + */ + CreateApiRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.CreateApiRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.CreateApiRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.api != null) { + if (typeof object.api !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.CreateApiRequest.api: object expected"); + message.api = $root.google.cloud.apigeeregistry.v1.Api.fromObject(object.api); + } + if (object.apiId != null) + message.apiId = String(object.apiId); + return message; + }; + + /** + * Creates a plain object from a CreateApiRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.CreateApiRequest} message CreateApiRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateApiRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.api = null; + object.apiId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.api != null && message.hasOwnProperty("api")) + object.api = $root.google.cloud.apigeeregistry.v1.Api.toObject(message.api, options); + if (message.apiId != null && message.hasOwnProperty("apiId")) + object.apiId = message.apiId; + return object; + }; + + /** + * Converts this CreateApiRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @instance + * @returns {Object.} JSON object + */ + CreateApiRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateApiRequest; + })(); + + v1.UpdateApiRequest = (function() { + + /** + * Properties of an UpdateApiRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IUpdateApiRequest + * @property {google.cloud.apigeeregistry.v1.IApi|null} [api] UpdateApiRequest api + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateApiRequest updateMask + * @property {boolean|null} [allowMissing] UpdateApiRequest allowMissing + */ + + /** + * Constructs a new UpdateApiRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents an UpdateApiRequest. + * @implements IUpdateApiRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IUpdateApiRequest=} [properties] Properties to set + */ + function UpdateApiRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateApiRequest api. + * @member {google.cloud.apigeeregistry.v1.IApi|null|undefined} api + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @instance + */ + UpdateApiRequest.prototype.api = null; + + /** + * UpdateApiRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @instance + */ + UpdateApiRequest.prototype.updateMask = null; + + /** + * UpdateApiRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @instance + */ + UpdateApiRequest.prototype.allowMissing = false; + + /** + * Creates a new UpdateApiRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.UpdateApiRequest} UpdateApiRequest instance + */ + UpdateApiRequest.create = function create(properties) { + return new UpdateApiRequest(properties); + }; + + /** + * Encodes the specified UpdateApiRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiRequest} message UpdateApiRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateApiRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.api != null && Object.hasOwnProperty.call(message, "api")) + $root.google.cloud.apigeeregistry.v1.Api.encode(message.api, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified UpdateApiRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiRequest} message UpdateApiRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateApiRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateApiRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.UpdateApiRequest} UpdateApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateApiRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.UpdateApiRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.api = $root.google.cloud.apigeeregistry.v1.Api.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.allowMissing = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateApiRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.UpdateApiRequest} UpdateApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateApiRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateApiRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateApiRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.api != null && message.hasOwnProperty("api")) { + var error = $root.google.cloud.apigeeregistry.v1.Api.verify(message.api); + if (error) + return "api." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates an UpdateApiRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.UpdateApiRequest} UpdateApiRequest + */ + UpdateApiRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.UpdateApiRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.UpdateApiRequest(); + if (object.api != null) { + if (typeof object.api !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.UpdateApiRequest.api: object expected"); + message.api = $root.google.cloud.apigeeregistry.v1.Api.fromObject(object.api); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.UpdateApiRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from an UpdateApiRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.UpdateApiRequest} message UpdateApiRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateApiRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.api = null; + object.updateMask = null; + object.allowMissing = false; + } + if (message.api != null && message.hasOwnProperty("api")) + object.api = $root.google.cloud.apigeeregistry.v1.Api.toObject(message.api, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this UpdateApiRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateApiRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateApiRequest; + })(); + + v1.DeleteApiRequest = (function() { + + /** + * Properties of a DeleteApiRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IDeleteApiRequest + * @property {string|null} [name] DeleteApiRequest name + */ + + /** + * Constructs a new DeleteApiRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a DeleteApiRequest. + * @implements IDeleteApiRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IDeleteApiRequest=} [properties] Properties to set + */ + function DeleteApiRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteApiRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @instance + */ + DeleteApiRequest.prototype.name = ""; + + /** + * Creates a new DeleteApiRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.DeleteApiRequest} DeleteApiRequest instance + */ + DeleteApiRequest.create = function create(properties) { + return new DeleteApiRequest(properties); + }; + + /** + * Encodes the specified DeleteApiRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiRequest} message DeleteApiRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiRequest.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 DeleteApiRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiRequest} message DeleteApiRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteApiRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.DeleteApiRequest} DeleteApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.DeleteApiRequest(); + 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 DeleteApiRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.DeleteApiRequest} DeleteApiRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteApiRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteApiRequest.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 DeleteApiRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.DeleteApiRequest} DeleteApiRequest + */ + DeleteApiRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.DeleteApiRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.DeleteApiRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteApiRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @static + * @param {google.cloud.apigeeregistry.v1.DeleteApiRequest} message DeleteApiRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteApiRequest.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 DeleteApiRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteApiRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteApiRequest; + })(); + + v1.ListApiVersionsRequest = (function() { + + /** + * Properties of a ListApiVersionsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApiVersionsRequest + * @property {string|null} [parent] ListApiVersionsRequest parent + * @property {number|null} [pageSize] ListApiVersionsRequest pageSize + * @property {string|null} [pageToken] ListApiVersionsRequest pageToken + * @property {string|null} [filter] ListApiVersionsRequest filter + */ + + /** + * Constructs a new ListApiVersionsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApiVersionsRequest. + * @implements IListApiVersionsRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApiVersionsRequest=} [properties] Properties to set + */ + function ListApiVersionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApiVersionsRequest parent. + * @member {string} parent + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @instance + */ + ListApiVersionsRequest.prototype.parent = ""; + + /** + * ListApiVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @instance + */ + ListApiVersionsRequest.prototype.pageSize = 0; + + /** + * ListApiVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @instance + */ + ListApiVersionsRequest.prototype.pageToken = ""; + + /** + * ListApiVersionsRequest filter. + * @member {string} filter + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @instance + */ + ListApiVersionsRequest.prototype.filter = ""; + + /** + * Creates a new ListApiVersionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApiVersionsRequest} ListApiVersionsRequest instance + */ + ListApiVersionsRequest.create = function create(properties) { + return new ListApiVersionsRequest(properties); + }; + + /** + * Encodes the specified ListApiVersionsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiVersionsRequest} message ListApiVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiVersionsRequest.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 ListApiVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiVersionsRequest} message ListApiVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApiVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApiVersionsRequest} ListApiVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiVersionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApiVersionsRequest(); + 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 ListApiVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApiVersionsRequest} ListApiVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApiVersionsRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApiVersionsRequest.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 ListApiVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApiVersionsRequest} ListApiVersionsRequest + */ + ListApiVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApiVersionsRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApiVersionsRequest(); + 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 ListApiVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ListApiVersionsRequest} message ListApiVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApiVersionsRequest.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 ListApiVersionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListApiVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApiVersionsRequest; + })(); + + v1.ListApiVersionsResponse = (function() { + + /** + * Properties of a ListApiVersionsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApiVersionsResponse + * @property {Array.|null} [apiVersions] ListApiVersionsResponse apiVersions + * @property {string|null} [nextPageToken] ListApiVersionsResponse nextPageToken + */ + + /** + * Constructs a new ListApiVersionsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApiVersionsResponse. + * @implements IListApiVersionsResponse + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApiVersionsResponse=} [properties] Properties to set + */ + function ListApiVersionsResponse(properties) { + this.apiVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApiVersionsResponse apiVersions. + * @member {Array.} apiVersions + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @instance + */ + ListApiVersionsResponse.prototype.apiVersions = $util.emptyArray; + + /** + * ListApiVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @instance + */ + ListApiVersionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListApiVersionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApiVersionsResponse} ListApiVersionsResponse instance + */ + ListApiVersionsResponse.create = function create(properties) { + return new ListApiVersionsResponse(properties); + }; + + /** + * Encodes the specified ListApiVersionsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiVersionsResponse} message ListApiVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiVersionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiVersions != null && message.apiVersions.length) + for (var i = 0; i < message.apiVersions.length; ++i) + $root.google.cloud.apigeeregistry.v1.ApiVersion.encode(message.apiVersions[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 ListApiVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiVersionsResponse} message ListApiVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApiVersionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApiVersionsResponse} ListApiVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiVersionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApiVersionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.apiVersions && message.apiVersions.length)) + message.apiVersions = []; + message.apiVersions.push($root.google.cloud.apigeeregistry.v1.ApiVersion.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListApiVersionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApiVersionsResponse} ListApiVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApiVersionsResponse message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApiVersionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiVersions != null && message.hasOwnProperty("apiVersions")) { + if (!Array.isArray(message.apiVersions)) + return "apiVersions: array expected"; + for (var i = 0; i < message.apiVersions.length; ++i) { + var error = $root.google.cloud.apigeeregistry.v1.ApiVersion.verify(message.apiVersions[i]); + if (error) + return "apiVersions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListApiVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApiVersionsResponse} ListApiVersionsResponse + */ + ListApiVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApiVersionsResponse) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApiVersionsResponse(); + if (object.apiVersions) { + if (!Array.isArray(object.apiVersions)) + throw TypeError(".google.cloud.apigeeregistry.v1.ListApiVersionsResponse.apiVersions: array expected"); + message.apiVersions = []; + for (var i = 0; i < object.apiVersions.length; ++i) { + if (typeof object.apiVersions[i] !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ListApiVersionsResponse.apiVersions: object expected"); + message.apiVersions[i] = $root.google.cloud.apigeeregistry.v1.ApiVersion.fromObject(object.apiVersions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListApiVersionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.ListApiVersionsResponse} message ListApiVersionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApiVersionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.apiVersions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.apiVersions && message.apiVersions.length) { + object.apiVersions = []; + for (var j = 0; j < message.apiVersions.length; ++j) + object.apiVersions[j] = $root.google.cloud.apigeeregistry.v1.ApiVersion.toObject(message.apiVersions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListApiVersionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListApiVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApiVersionsResponse; + })(); + + v1.GetApiVersionRequest = (function() { + + /** + * Properties of a GetApiVersionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IGetApiVersionRequest + * @property {string|null} [name] GetApiVersionRequest name + */ + + /** + * Constructs a new GetApiVersionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a GetApiVersionRequest. + * @implements IGetApiVersionRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IGetApiVersionRequest=} [properties] Properties to set + */ + function GetApiVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetApiVersionRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.GetApiVersionRequest + * @instance + */ + GetApiVersionRequest.prototype.name = ""; + + /** + * Creates a new GetApiVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.GetApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiVersionRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.GetApiVersionRequest} GetApiVersionRequest instance + */ + GetApiVersionRequest.create = function create(properties) { + return new GetApiVersionRequest(properties); + }; + + /** + * Encodes the specified GetApiVersionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.GetApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiVersionRequest} message GetApiVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetApiVersionRequest.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 GetApiVersionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiVersionRequest} message GetApiVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetApiVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetApiVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.GetApiVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.GetApiVersionRequest} GetApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetApiVersionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.GetApiVersionRequest(); + 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 GetApiVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetApiVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.GetApiVersionRequest} GetApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetApiVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetApiVersionRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.GetApiVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetApiVersionRequest.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 GetApiVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.GetApiVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.GetApiVersionRequest} GetApiVersionRequest + */ + GetApiVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.GetApiVersionRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.GetApiVersionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetApiVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.GetApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.GetApiVersionRequest} message GetApiVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetApiVersionRequest.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 GetApiVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.GetApiVersionRequest + * @instance + * @returns {Object.} JSON object + */ + GetApiVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetApiVersionRequest; + })(); + + v1.CreateApiVersionRequest = (function() { + + /** + * Properties of a CreateApiVersionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface ICreateApiVersionRequest + * @property {string|null} [parent] CreateApiVersionRequest parent + * @property {google.cloud.apigeeregistry.v1.IApiVersion|null} [apiVersion] CreateApiVersionRequest apiVersion + * @property {string|null} [apiVersionId] CreateApiVersionRequest apiVersionId + */ + + /** + * Constructs a new CreateApiVersionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a CreateApiVersionRequest. + * @implements ICreateApiVersionRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.ICreateApiVersionRequest=} [properties] Properties to set + */ + function CreateApiVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateApiVersionRequest parent. + * @member {string} parent + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @instance + */ + CreateApiVersionRequest.prototype.parent = ""; + + /** + * CreateApiVersionRequest apiVersion. + * @member {google.cloud.apigeeregistry.v1.IApiVersion|null|undefined} apiVersion + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @instance + */ + CreateApiVersionRequest.prototype.apiVersion = null; + + /** + * CreateApiVersionRequest apiVersionId. + * @member {string} apiVersionId + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @instance + */ + CreateApiVersionRequest.prototype.apiVersionId = ""; + + /** + * Creates a new CreateApiVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiVersionRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.CreateApiVersionRequest} CreateApiVersionRequest instance + */ + CreateApiVersionRequest.create = function create(properties) { + return new CreateApiVersionRequest(properties); + }; + + /** + * Encodes the specified CreateApiVersionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiVersionRequest} message CreateApiVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateApiVersionRequest.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.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + $root.google.cloud.apigeeregistry.v1.ApiVersion.encode(message.apiVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.apiVersionId != null && Object.hasOwnProperty.call(message, "apiVersionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.apiVersionId); + return writer; + }; + + /** + * Encodes the specified CreateApiVersionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiVersionRequest} message CreateApiVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateApiVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateApiVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.CreateApiVersionRequest} CreateApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateApiVersionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.CreateApiVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.apiVersion = $root.google.cloud.apigeeregistry.v1.ApiVersion.decode(reader, reader.uint32()); + break; + case 3: + message.apiVersionId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateApiVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.CreateApiVersionRequest} CreateApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateApiVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateApiVersionRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateApiVersionRequest.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.apiVersion != null && message.hasOwnProperty("apiVersion")) { + var error = $root.google.cloud.apigeeregistry.v1.ApiVersion.verify(message.apiVersion); + if (error) + return "apiVersion." + error; + } + if (message.apiVersionId != null && message.hasOwnProperty("apiVersionId")) + if (!$util.isString(message.apiVersionId)) + return "apiVersionId: string expected"; + return null; + }; + + /** + * Creates a CreateApiVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.CreateApiVersionRequest} CreateApiVersionRequest + */ + CreateApiVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.CreateApiVersionRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.CreateApiVersionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.apiVersion != null) { + if (typeof object.apiVersion !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.CreateApiVersionRequest.apiVersion: object expected"); + message.apiVersion = $root.google.cloud.apigeeregistry.v1.ApiVersion.fromObject(object.apiVersion); + } + if (object.apiVersionId != null) + message.apiVersionId = String(object.apiVersionId); + return message; + }; + + /** + * Creates a plain object from a CreateApiVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.CreateApiVersionRequest} message CreateApiVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateApiVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.apiVersion = null; + object.apiVersionId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = $root.google.cloud.apigeeregistry.v1.ApiVersion.toObject(message.apiVersion, options); + if (message.apiVersionId != null && message.hasOwnProperty("apiVersionId")) + object.apiVersionId = message.apiVersionId; + return object; + }; + + /** + * Converts this CreateApiVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateApiVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateApiVersionRequest; + })(); + + v1.UpdateApiVersionRequest = (function() { + + /** + * Properties of an UpdateApiVersionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IUpdateApiVersionRequest + * @property {google.cloud.apigeeregistry.v1.IApiVersion|null} [apiVersion] UpdateApiVersionRequest apiVersion + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateApiVersionRequest updateMask + * @property {boolean|null} [allowMissing] UpdateApiVersionRequest allowMissing + */ + + /** + * Constructs a new UpdateApiVersionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents an UpdateApiVersionRequest. + * @implements IUpdateApiVersionRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest=} [properties] Properties to set + */ + function UpdateApiVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateApiVersionRequest apiVersion. + * @member {google.cloud.apigeeregistry.v1.IApiVersion|null|undefined} apiVersion + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @instance + */ + UpdateApiVersionRequest.prototype.apiVersion = null; + + /** + * UpdateApiVersionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @instance + */ + UpdateApiVersionRequest.prototype.updateMask = null; + + /** + * UpdateApiVersionRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @instance + */ + UpdateApiVersionRequest.prototype.allowMissing = false; + + /** + * Creates a new UpdateApiVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.UpdateApiVersionRequest} UpdateApiVersionRequest instance + */ + UpdateApiVersionRequest.create = function create(properties) { + return new UpdateApiVersionRequest(properties); + }; + + /** + * Encodes the specified UpdateApiVersionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest} message UpdateApiVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateApiVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + $root.google.cloud.apigeeregistry.v1.ApiVersion.encode(message.apiVersion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified UpdateApiVersionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest} message UpdateApiVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateApiVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateApiVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.UpdateApiVersionRequest} UpdateApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateApiVersionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.apiVersion = $root.google.cloud.apigeeregistry.v1.ApiVersion.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.allowMissing = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateApiVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.UpdateApiVersionRequest} UpdateApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateApiVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateApiVersionRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateApiVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) { + var error = $root.google.cloud.apigeeregistry.v1.ApiVersion.verify(message.apiVersion); + if (error) + return "apiVersion." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates an UpdateApiVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.UpdateApiVersionRequest} UpdateApiVersionRequest + */ + UpdateApiVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest(); + if (object.apiVersion != null) { + if (typeof object.apiVersion !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.apiVersion: object expected"); + message.apiVersion = $root.google.cloud.apigeeregistry.v1.ApiVersion.fromObject(object.apiVersion); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.UpdateApiVersionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from an UpdateApiVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.UpdateApiVersionRequest} message UpdateApiVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateApiVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.apiVersion = null; + object.updateMask = null; + object.allowMissing = false; + } + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = $root.google.cloud.apigeeregistry.v1.ApiVersion.toObject(message.apiVersion, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this UpdateApiVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateApiVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateApiVersionRequest; + })(); + + v1.DeleteApiVersionRequest = (function() { + + /** + * Properties of a DeleteApiVersionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IDeleteApiVersionRequest + * @property {string|null} [name] DeleteApiVersionRequest name + */ + + /** + * Constructs a new DeleteApiVersionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a DeleteApiVersionRequest. + * @implements IDeleteApiVersionRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest=} [properties] Properties to set + */ + function DeleteApiVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteApiVersionRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @instance + */ + DeleteApiVersionRequest.prototype.name = ""; + + /** + * Creates a new DeleteApiVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.DeleteApiVersionRequest} DeleteApiVersionRequest instance + */ + DeleteApiVersionRequest.create = function create(properties) { + return new DeleteApiVersionRequest(properties); + }; + + /** + * Encodes the specified DeleteApiVersionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest} message DeleteApiVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiVersionRequest.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 DeleteApiVersionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest} message DeleteApiVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteApiVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.DeleteApiVersionRequest} DeleteApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiVersionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest(); + 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 DeleteApiVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.DeleteApiVersionRequest} DeleteApiVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteApiVersionRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteApiVersionRequest.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 DeleteApiVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.DeleteApiVersionRequest} DeleteApiVersionRequest + */ + DeleteApiVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteApiVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.DeleteApiVersionRequest} message DeleteApiVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteApiVersionRequest.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 DeleteApiVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteApiVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteApiVersionRequest; + })(); + + v1.ListApiSpecsRequest = (function() { + + /** + * Properties of a ListApiSpecsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApiSpecsRequest + * @property {string|null} [parent] ListApiSpecsRequest parent + * @property {number|null} [pageSize] ListApiSpecsRequest pageSize + * @property {string|null} [pageToken] ListApiSpecsRequest pageToken + * @property {string|null} [filter] ListApiSpecsRequest filter + */ + + /** + * Constructs a new ListApiSpecsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApiSpecsRequest. + * @implements IListApiSpecsRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApiSpecsRequest=} [properties] Properties to set + */ + function ListApiSpecsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApiSpecsRequest parent. + * @member {string} parent + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @instance + */ + ListApiSpecsRequest.prototype.parent = ""; + + /** + * ListApiSpecsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @instance + */ + ListApiSpecsRequest.prototype.pageSize = 0; + + /** + * ListApiSpecsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @instance + */ + ListApiSpecsRequest.prototype.pageToken = ""; + + /** + * ListApiSpecsRequest filter. + * @member {string} filter + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @instance + */ + ListApiSpecsRequest.prototype.filter = ""; + + /** + * Creates a new ListApiSpecsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecsRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecsRequest} ListApiSpecsRequest instance + */ + ListApiSpecsRequest.create = function create(properties) { + return new ListApiSpecsRequest(properties); + }; + + /** + * Encodes the specified ListApiSpecsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecsRequest} message ListApiSpecsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiSpecsRequest.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 ListApiSpecsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecsRequest} message ListApiSpecsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiSpecsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApiSpecsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecsRequest} ListApiSpecsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiSpecsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApiSpecsRequest(); + 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 ListApiSpecsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecsRequest} ListApiSpecsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiSpecsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApiSpecsRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApiSpecsRequest.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 ListApiSpecsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecsRequest} ListApiSpecsRequest + */ + ListApiSpecsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApiSpecsRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApiSpecsRequest(); + 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 ListApiSpecsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ListApiSpecsRequest} message ListApiSpecsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApiSpecsRequest.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 ListApiSpecsRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @instance + * @returns {Object.} JSON object + */ + ListApiSpecsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApiSpecsRequest; + })(); + + v1.ListApiSpecsResponse = (function() { + + /** + * Properties of a ListApiSpecsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApiSpecsResponse + * @property {Array.|null} [apiSpecs] ListApiSpecsResponse apiSpecs + * @property {string|null} [nextPageToken] ListApiSpecsResponse nextPageToken + */ + + /** + * Constructs a new ListApiSpecsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApiSpecsResponse. + * @implements IListApiSpecsResponse + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApiSpecsResponse=} [properties] Properties to set + */ + function ListApiSpecsResponse(properties) { + this.apiSpecs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApiSpecsResponse apiSpecs. + * @member {Array.} apiSpecs + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @instance + */ + ListApiSpecsResponse.prototype.apiSpecs = $util.emptyArray; + + /** + * ListApiSpecsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @instance + */ + ListApiSpecsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListApiSpecsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecsResponse=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecsResponse} ListApiSpecsResponse instance + */ + ListApiSpecsResponse.create = function create(properties) { + return new ListApiSpecsResponse(properties); + }; + + /** + * Encodes the specified ListApiSpecsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecsResponse} message ListApiSpecsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiSpecsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiSpecs != null && message.apiSpecs.length) + for (var i = 0; i < message.apiSpecs.length; ++i) + $root.google.cloud.apigeeregistry.v1.ApiSpec.encode(message.apiSpecs[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 ListApiSpecsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecsResponse} message ListApiSpecsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiSpecsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApiSpecsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecsResponse} ListApiSpecsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiSpecsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApiSpecsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.apiSpecs && message.apiSpecs.length)) + message.apiSpecs = []; + message.apiSpecs.push($root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListApiSpecsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecsResponse} ListApiSpecsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiSpecsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApiSpecsResponse message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApiSpecsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiSpecs != null && message.hasOwnProperty("apiSpecs")) { + if (!Array.isArray(message.apiSpecs)) + return "apiSpecs: array expected"; + for (var i = 0; i < message.apiSpecs.length; ++i) { + var error = $root.google.cloud.apigeeregistry.v1.ApiSpec.verify(message.apiSpecs[i]); + if (error) + return "apiSpecs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListApiSpecsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecsResponse} ListApiSpecsResponse + */ + ListApiSpecsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApiSpecsResponse) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApiSpecsResponse(); + if (object.apiSpecs) { + if (!Array.isArray(object.apiSpecs)) + throw TypeError(".google.cloud.apigeeregistry.v1.ListApiSpecsResponse.apiSpecs: array expected"); + message.apiSpecs = []; + for (var i = 0; i < object.apiSpecs.length; ++i) { + if (typeof object.apiSpecs[i] !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ListApiSpecsResponse.apiSpecs: object expected"); + message.apiSpecs[i] = $root.google.cloud.apigeeregistry.v1.ApiSpec.fromObject(object.apiSpecs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListApiSpecsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.ListApiSpecsResponse} message ListApiSpecsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApiSpecsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.apiSpecs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.apiSpecs && message.apiSpecs.length) { + object.apiSpecs = []; + for (var j = 0; j < message.apiSpecs.length; ++j) + object.apiSpecs[j] = $root.google.cloud.apigeeregistry.v1.ApiSpec.toObject(message.apiSpecs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListApiSpecsResponse to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @instance + * @returns {Object.} JSON object + */ + ListApiSpecsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApiSpecsResponse; + })(); + + v1.GetApiSpecRequest = (function() { + + /** + * Properties of a GetApiSpecRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IGetApiSpecRequest + * @property {string|null} [name] GetApiSpecRequest name + */ + + /** + * Constructs a new GetApiSpecRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a GetApiSpecRequest. + * @implements IGetApiSpecRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecRequest=} [properties] Properties to set + */ + function GetApiSpecRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetApiSpecRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecRequest + * @instance + */ + GetApiSpecRequest.prototype.name = ""; + + /** + * Creates a new GetApiSpecRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.GetApiSpecRequest} GetApiSpecRequest instance + */ + GetApiSpecRequest.create = function create(properties) { + return new GetApiSpecRequest(properties); + }; + + /** + * Encodes the specified GetApiSpecRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiSpecRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecRequest} message GetApiSpecRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetApiSpecRequest.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 GetApiSpecRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiSpecRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecRequest} message GetApiSpecRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetApiSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetApiSpecRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.GetApiSpecRequest} GetApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetApiSpecRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.GetApiSpecRequest(); + 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 GetApiSpecRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.GetApiSpecRequest} GetApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetApiSpecRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetApiSpecRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetApiSpecRequest.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 GetApiSpecRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.GetApiSpecRequest} GetApiSpecRequest + */ + GetApiSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.GetApiSpecRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.GetApiSpecRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetApiSpecRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.GetApiSpecRequest} message GetApiSpecRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetApiSpecRequest.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 GetApiSpecRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecRequest + * @instance + * @returns {Object.} JSON object + */ + GetApiSpecRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetApiSpecRequest; + })(); + + v1.GetApiSpecContentsRequest = (function() { + + /** + * Properties of a GetApiSpecContentsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IGetApiSpecContentsRequest + * @property {string|null} [name] GetApiSpecContentsRequest name + */ + + /** + * Constructs a new GetApiSpecContentsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a GetApiSpecContentsRequest. + * @implements IGetApiSpecContentsRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest=} [properties] Properties to set + */ + function GetApiSpecContentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetApiSpecContentsRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest + * @instance + */ + GetApiSpecContentsRequest.prototype.name = ""; + + /** + * Creates a new GetApiSpecContentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest} GetApiSpecContentsRequest instance + */ + GetApiSpecContentsRequest.create = function create(properties) { + return new GetApiSpecContentsRequest(properties); + }; + + /** + * Encodes the specified GetApiSpecContentsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest} message GetApiSpecContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetApiSpecContentsRequest.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 GetApiSpecContentsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest} message GetApiSpecContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetApiSpecContentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetApiSpecContentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest} GetApiSpecContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetApiSpecContentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest(); + 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 GetApiSpecContentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest} GetApiSpecContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetApiSpecContentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetApiSpecContentsRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetApiSpecContentsRequest.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 GetApiSpecContentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest} GetApiSpecContentsRequest + */ + GetApiSpecContentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetApiSpecContentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest} message GetApiSpecContentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetApiSpecContentsRequest.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 GetApiSpecContentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest + * @instance + * @returns {Object.} JSON object + */ + GetApiSpecContentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetApiSpecContentsRequest; + })(); + + v1.CreateApiSpecRequest = (function() { + + /** + * Properties of a CreateApiSpecRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface ICreateApiSpecRequest + * @property {string|null} [parent] CreateApiSpecRequest parent + * @property {google.cloud.apigeeregistry.v1.IApiSpec|null} [apiSpec] CreateApiSpecRequest apiSpec + * @property {string|null} [apiSpecId] CreateApiSpecRequest apiSpecId + */ + + /** + * Constructs a new CreateApiSpecRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a CreateApiSpecRequest. + * @implements ICreateApiSpecRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.ICreateApiSpecRequest=} [properties] Properties to set + */ + function CreateApiSpecRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateApiSpecRequest parent. + * @member {string} parent + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @instance + */ + CreateApiSpecRequest.prototype.parent = ""; + + /** + * CreateApiSpecRequest apiSpec. + * @member {google.cloud.apigeeregistry.v1.IApiSpec|null|undefined} apiSpec + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @instance + */ + CreateApiSpecRequest.prototype.apiSpec = null; + + /** + * CreateApiSpecRequest apiSpecId. + * @member {string} apiSpecId + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @instance + */ + CreateApiSpecRequest.prototype.apiSpecId = ""; + + /** + * Creates a new CreateApiSpecRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiSpecRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.CreateApiSpecRequest} CreateApiSpecRequest instance + */ + CreateApiSpecRequest.create = function create(properties) { + return new CreateApiSpecRequest(properties); + }; + + /** + * Encodes the specified CreateApiSpecRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiSpecRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiSpecRequest} message CreateApiSpecRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateApiSpecRequest.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.apiSpec != null && Object.hasOwnProperty.call(message, "apiSpec")) + $root.google.cloud.apigeeregistry.v1.ApiSpec.encode(message.apiSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.apiSpecId != null && Object.hasOwnProperty.call(message, "apiSpecId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.apiSpecId); + return writer; + }; + + /** + * Encodes the specified CreateApiSpecRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiSpecRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiSpecRequest} message CreateApiSpecRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateApiSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateApiSpecRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.CreateApiSpecRequest} CreateApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateApiSpecRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.CreateApiSpecRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.apiSpec = $root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32()); + break; + case 3: + message.apiSpecId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateApiSpecRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.CreateApiSpecRequest} CreateApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateApiSpecRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateApiSpecRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateApiSpecRequest.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.apiSpec != null && message.hasOwnProperty("apiSpec")) { + var error = $root.google.cloud.apigeeregistry.v1.ApiSpec.verify(message.apiSpec); + if (error) + return "apiSpec." + error; + } + if (message.apiSpecId != null && message.hasOwnProperty("apiSpecId")) + if (!$util.isString(message.apiSpecId)) + return "apiSpecId: string expected"; + return null; + }; + + /** + * Creates a CreateApiSpecRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.CreateApiSpecRequest} CreateApiSpecRequest + */ + CreateApiSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.CreateApiSpecRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.CreateApiSpecRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.apiSpec != null) { + if (typeof object.apiSpec !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.CreateApiSpecRequest.apiSpec: object expected"); + message.apiSpec = $root.google.cloud.apigeeregistry.v1.ApiSpec.fromObject(object.apiSpec); + } + if (object.apiSpecId != null) + message.apiSpecId = String(object.apiSpecId); + return message; + }; + + /** + * Creates a plain object from a CreateApiSpecRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.CreateApiSpecRequest} message CreateApiSpecRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateApiSpecRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.apiSpec = null; + object.apiSpecId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.apiSpec != null && message.hasOwnProperty("apiSpec")) + object.apiSpec = $root.google.cloud.apigeeregistry.v1.ApiSpec.toObject(message.apiSpec, options); + if (message.apiSpecId != null && message.hasOwnProperty("apiSpecId")) + object.apiSpecId = message.apiSpecId; + return object; + }; + + /** + * Converts this CreateApiSpecRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @instance + * @returns {Object.} JSON object + */ + CreateApiSpecRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateApiSpecRequest; + })(); + + v1.UpdateApiSpecRequest = (function() { + + /** + * Properties of an UpdateApiSpecRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IUpdateApiSpecRequest + * @property {google.cloud.apigeeregistry.v1.IApiSpec|null} [apiSpec] UpdateApiSpecRequest apiSpec + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateApiSpecRequest updateMask + * @property {boolean|null} [allowMissing] UpdateApiSpecRequest allowMissing + */ + + /** + * Constructs a new UpdateApiSpecRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents an UpdateApiSpecRequest. + * @implements IUpdateApiSpecRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest=} [properties] Properties to set + */ + function UpdateApiSpecRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateApiSpecRequest apiSpec. + * @member {google.cloud.apigeeregistry.v1.IApiSpec|null|undefined} apiSpec + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @instance + */ + UpdateApiSpecRequest.prototype.apiSpec = null; + + /** + * UpdateApiSpecRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @instance + */ + UpdateApiSpecRequest.prototype.updateMask = null; + + /** + * UpdateApiSpecRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @instance + */ + UpdateApiSpecRequest.prototype.allowMissing = false; + + /** + * Creates a new UpdateApiSpecRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.UpdateApiSpecRequest} UpdateApiSpecRequest instance + */ + UpdateApiSpecRequest.create = function create(properties) { + return new UpdateApiSpecRequest(properties); + }; + + /** + * Encodes the specified UpdateApiSpecRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest} message UpdateApiSpecRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateApiSpecRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiSpec != null && Object.hasOwnProperty.call(message, "apiSpec")) + $root.google.cloud.apigeeregistry.v1.ApiSpec.encode(message.apiSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified UpdateApiSpecRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest} message UpdateApiSpecRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateApiSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateApiSpecRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.UpdateApiSpecRequest} UpdateApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateApiSpecRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.apiSpec = $root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.allowMissing = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateApiSpecRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.UpdateApiSpecRequest} UpdateApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateApiSpecRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateApiSpecRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateApiSpecRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiSpec != null && message.hasOwnProperty("apiSpec")) { + var error = $root.google.cloud.apigeeregistry.v1.ApiSpec.verify(message.apiSpec); + if (error) + return "apiSpec." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates an UpdateApiSpecRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.UpdateApiSpecRequest} UpdateApiSpecRequest + */ + UpdateApiSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest(); + if (object.apiSpec != null) { + if (typeof object.apiSpec !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.apiSpec: object expected"); + message.apiSpec = $root.google.cloud.apigeeregistry.v1.ApiSpec.fromObject(object.apiSpec); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.UpdateApiSpecRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from an UpdateApiSpecRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.UpdateApiSpecRequest} message UpdateApiSpecRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateApiSpecRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.apiSpec = null; + object.updateMask = null; + object.allowMissing = false; + } + if (message.apiSpec != null && message.hasOwnProperty("apiSpec")) + object.apiSpec = $root.google.cloud.apigeeregistry.v1.ApiSpec.toObject(message.apiSpec, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this UpdateApiSpecRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateApiSpecRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateApiSpecRequest; + })(); + + v1.DeleteApiSpecRequest = (function() { + + /** + * Properties of a DeleteApiSpecRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IDeleteApiSpecRequest + * @property {string|null} [name] DeleteApiSpecRequest name + * @property {boolean|null} [force] DeleteApiSpecRequest force + */ + + /** + * Constructs a new DeleteApiSpecRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a DeleteApiSpecRequest. + * @implements IDeleteApiSpecRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest=} [properties] Properties to set + */ + function DeleteApiSpecRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteApiSpecRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @instance + */ + DeleteApiSpecRequest.prototype.name = ""; + + /** + * DeleteApiSpecRequest force. + * @member {boolean} force + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @instance + */ + DeleteApiSpecRequest.prototype.force = false; + + /** + * Creates a new DeleteApiSpecRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.DeleteApiSpecRequest} DeleteApiSpecRequest instance + */ + DeleteApiSpecRequest.create = function create(properties) { + return new DeleteApiSpecRequest(properties); + }; + + /** + * Encodes the specified DeleteApiSpecRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest} message DeleteApiSpecRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiSpecRequest.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.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteApiSpecRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiSpecRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest} message DeleteApiSpecRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteApiSpecRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.DeleteApiSpecRequest} DeleteApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiSpecRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.force = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteApiSpecRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.DeleteApiSpecRequest} DeleteApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiSpecRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteApiSpecRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteApiSpecRequest.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.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteApiSpecRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.DeleteApiSpecRequest} DeleteApiSpecRequest + */ + DeleteApiSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteApiSpecRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.DeleteApiSpecRequest} message DeleteApiSpecRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteApiSpecRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteApiSpecRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteApiSpecRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteApiSpecRequest; + })(); + + v1.TagApiSpecRevisionRequest = (function() { + + /** + * Properties of a TagApiSpecRevisionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface ITagApiSpecRevisionRequest + * @property {string|null} [name] TagApiSpecRevisionRequest name + * @property {string|null} [tag] TagApiSpecRevisionRequest tag + */ + + /** + * Constructs a new TagApiSpecRevisionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a TagApiSpecRevisionRequest. + * @implements ITagApiSpecRevisionRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest=} [properties] Properties to set + */ + function TagApiSpecRevisionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TagApiSpecRevisionRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @instance + */ + TagApiSpecRevisionRequest.prototype.name = ""; + + /** + * TagApiSpecRevisionRequest tag. + * @member {string} tag + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @instance + */ + TagApiSpecRevisionRequest.prototype.tag = ""; + + /** + * Creates a new TagApiSpecRevisionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest} TagApiSpecRevisionRequest instance + */ + TagApiSpecRevisionRequest.create = function create(properties) { + return new TagApiSpecRevisionRequest(properties); + }; + + /** + * Encodes the specified TagApiSpecRevisionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest} message TagApiSpecRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagApiSpecRevisionRequest.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.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tag); + return writer; + }; + + /** + * Encodes the specified TagApiSpecRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest} message TagApiSpecRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagApiSpecRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TagApiSpecRevisionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest} TagApiSpecRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagApiSpecRevisionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.tag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TagApiSpecRevisionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest} TagApiSpecRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagApiSpecRevisionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TagApiSpecRevisionRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TagApiSpecRevisionRequest.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.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + return null; + }; + + /** + * Creates a TagApiSpecRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest} TagApiSpecRevisionRequest + */ + TagApiSpecRevisionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.tag != null) + message.tag = String(object.tag); + return message; + }; + + /** + * Creates a plain object from a TagApiSpecRevisionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest} message TagApiSpecRevisionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TagApiSpecRevisionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.tag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + return object; + }; + + /** + * Converts this TagApiSpecRevisionRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @instance + * @returns {Object.} JSON object + */ + TagApiSpecRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TagApiSpecRevisionRequest; + })(); + + v1.ListApiSpecRevisionsRequest = (function() { + + /** + * Properties of a ListApiSpecRevisionsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApiSpecRevisionsRequest + * @property {string|null} [name] ListApiSpecRevisionsRequest name + * @property {number|null} [pageSize] ListApiSpecRevisionsRequest pageSize + * @property {string|null} [pageToken] ListApiSpecRevisionsRequest pageToken + */ + + /** + * Constructs a new ListApiSpecRevisionsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApiSpecRevisionsRequest. + * @implements IListApiSpecRevisionsRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest=} [properties] Properties to set + */ + function ListApiSpecRevisionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApiSpecRevisionsRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @instance + */ + ListApiSpecRevisionsRequest.prototype.name = ""; + + /** + * ListApiSpecRevisionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @instance + */ + ListApiSpecRevisionsRequest.prototype.pageSize = 0; + + /** + * ListApiSpecRevisionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @instance + */ + ListApiSpecRevisionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListApiSpecRevisionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest} ListApiSpecRevisionsRequest instance + */ + ListApiSpecRevisionsRequest.create = function create(properties) { + return new ListApiSpecRevisionsRequest(properties); + }; + + /** + * Encodes the specified ListApiSpecRevisionsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest} message ListApiSpecRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiSpecRevisionsRequest.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.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 ListApiSpecRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest} message ListApiSpecRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiSpecRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApiSpecRevisionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest} ListApiSpecRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiSpecRevisionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = 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 ListApiSpecRevisionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest} ListApiSpecRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiSpecRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApiSpecRevisionsRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApiSpecRevisionsRequest.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.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 ListApiSpecRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest} ListApiSpecRevisionsRequest + */ + ListApiSpecRevisionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest(); + if (object.name != null) + message.name = String(object.name); + 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 ListApiSpecRevisionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest} message ListApiSpecRevisionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApiSpecRevisionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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 ListApiSpecRevisionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListApiSpecRevisionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApiSpecRevisionsRequest; + })(); + + v1.ListApiSpecRevisionsResponse = (function() { + + /** + * Properties of a ListApiSpecRevisionsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApiSpecRevisionsResponse + * @property {Array.|null} [apiSpecs] ListApiSpecRevisionsResponse apiSpecs + * @property {string|null} [nextPageToken] ListApiSpecRevisionsResponse nextPageToken + */ + + /** + * Constructs a new ListApiSpecRevisionsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApiSpecRevisionsResponse. + * @implements IListApiSpecRevisionsResponse + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse=} [properties] Properties to set + */ + function ListApiSpecRevisionsResponse(properties) { + this.apiSpecs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApiSpecRevisionsResponse apiSpecs. + * @member {Array.} apiSpecs + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @instance + */ + ListApiSpecRevisionsResponse.prototype.apiSpecs = $util.emptyArray; + + /** + * ListApiSpecRevisionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @instance + */ + ListApiSpecRevisionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListApiSpecRevisionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse} ListApiSpecRevisionsResponse instance + */ + ListApiSpecRevisionsResponse.create = function create(properties) { + return new ListApiSpecRevisionsResponse(properties); + }; + + /** + * Encodes the specified ListApiSpecRevisionsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse} message ListApiSpecRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiSpecRevisionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiSpecs != null && message.apiSpecs.length) + for (var i = 0; i < message.apiSpecs.length; ++i) + $root.google.cloud.apigeeregistry.v1.ApiSpec.encode(message.apiSpecs[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 ListApiSpecRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse} message ListApiSpecRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiSpecRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApiSpecRevisionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse} ListApiSpecRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiSpecRevisionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.apiSpecs && message.apiSpecs.length)) + message.apiSpecs = []; + message.apiSpecs.push($root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListApiSpecRevisionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse} ListApiSpecRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiSpecRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApiSpecRevisionsResponse message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApiSpecRevisionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiSpecs != null && message.hasOwnProperty("apiSpecs")) { + if (!Array.isArray(message.apiSpecs)) + return "apiSpecs: array expected"; + for (var i = 0; i < message.apiSpecs.length; ++i) { + var error = $root.google.cloud.apigeeregistry.v1.ApiSpec.verify(message.apiSpecs[i]); + if (error) + return "apiSpecs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListApiSpecRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse} ListApiSpecRevisionsResponse + */ + ListApiSpecRevisionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse(); + if (object.apiSpecs) { + if (!Array.isArray(object.apiSpecs)) + throw TypeError(".google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.apiSpecs: array expected"); + message.apiSpecs = []; + for (var i = 0; i < object.apiSpecs.length; ++i) { + if (typeof object.apiSpecs[i] !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse.apiSpecs: object expected"); + message.apiSpecs[i] = $root.google.cloud.apigeeregistry.v1.ApiSpec.fromObject(object.apiSpecs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListApiSpecRevisionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse} message ListApiSpecRevisionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApiSpecRevisionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.apiSpecs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.apiSpecs && message.apiSpecs.length) { + object.apiSpecs = []; + for (var j = 0; j < message.apiSpecs.length; ++j) + object.apiSpecs[j] = $root.google.cloud.apigeeregistry.v1.ApiSpec.toObject(message.apiSpecs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListApiSpecRevisionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListApiSpecRevisionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApiSpecRevisionsResponse; + })(); + + v1.RollbackApiSpecRequest = (function() { + + /** + * Properties of a RollbackApiSpecRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IRollbackApiSpecRequest + * @property {string|null} [name] RollbackApiSpecRequest name + * @property {string|null} [revisionId] RollbackApiSpecRequest revisionId + */ + + /** + * Constructs a new RollbackApiSpecRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a RollbackApiSpecRequest. + * @implements IRollbackApiSpecRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest=} [properties] Properties to set + */ + function RollbackApiSpecRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RollbackApiSpecRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @instance + */ + RollbackApiSpecRequest.prototype.name = ""; + + /** + * RollbackApiSpecRequest revisionId. + * @member {string} revisionId + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @instance + */ + RollbackApiSpecRequest.prototype.revisionId = ""; + + /** + * Creates a new RollbackApiSpecRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.RollbackApiSpecRequest} RollbackApiSpecRequest instance + */ + RollbackApiSpecRequest.create = function create(properties) { + return new RollbackApiSpecRequest(properties); + }; + + /** + * Encodes the specified RollbackApiSpecRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest} message RollbackApiSpecRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RollbackApiSpecRequest.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.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); + return writer; + }; + + /** + * Encodes the specified RollbackApiSpecRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.RollbackApiSpecRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest} message RollbackApiSpecRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RollbackApiSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RollbackApiSpecRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.RollbackApiSpecRequest} RollbackApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RollbackApiSpecRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.revisionId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RollbackApiSpecRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.RollbackApiSpecRequest} RollbackApiSpecRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RollbackApiSpecRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RollbackApiSpecRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RollbackApiSpecRequest.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.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + return null; + }; + + /** + * Creates a RollbackApiSpecRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.RollbackApiSpecRequest} RollbackApiSpecRequest + */ + RollbackApiSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + return message; + }; + + /** + * Creates a plain object from a RollbackApiSpecRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @static + * @param {google.cloud.apigeeregistry.v1.RollbackApiSpecRequest} message RollbackApiSpecRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RollbackApiSpecRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.revisionId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + return object; + }; + + /** + * Converts this RollbackApiSpecRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @instance + * @returns {Object.} JSON object + */ + RollbackApiSpecRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RollbackApiSpecRequest; + })(); + + v1.DeleteApiSpecRevisionRequest = (function() { + + /** + * Properties of a DeleteApiSpecRevisionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IDeleteApiSpecRevisionRequest + * @property {string|null} [name] DeleteApiSpecRevisionRequest name + */ + + /** + * Constructs a new DeleteApiSpecRevisionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a DeleteApiSpecRevisionRequest. + * @implements IDeleteApiSpecRevisionRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest=} [properties] Properties to set + */ + function DeleteApiSpecRevisionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteApiSpecRevisionRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest + * @instance + */ + DeleteApiSpecRevisionRequest.prototype.name = ""; + + /** + * Creates a new DeleteApiSpecRevisionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest} DeleteApiSpecRevisionRequest instance + */ + DeleteApiSpecRevisionRequest.create = function create(properties) { + return new DeleteApiSpecRevisionRequest(properties); + }; + + /** + * Encodes the specified DeleteApiSpecRevisionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest} message DeleteApiSpecRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiSpecRevisionRequest.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 DeleteApiSpecRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest} message DeleteApiSpecRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiSpecRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteApiSpecRevisionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest} DeleteApiSpecRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiSpecRevisionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest(); + 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 DeleteApiSpecRevisionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest} DeleteApiSpecRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiSpecRevisionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteApiSpecRevisionRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteApiSpecRevisionRequest.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 DeleteApiSpecRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest} DeleteApiSpecRevisionRequest + */ + DeleteApiSpecRevisionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteApiSpecRevisionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest} message DeleteApiSpecRevisionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteApiSpecRevisionRequest.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 DeleteApiSpecRevisionRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteApiSpecRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteApiSpecRevisionRequest; + })(); + + v1.ListApiDeploymentsRequest = (function() { + + /** + * Properties of a ListApiDeploymentsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApiDeploymentsRequest + * @property {string|null} [parent] ListApiDeploymentsRequest parent + * @property {number|null} [pageSize] ListApiDeploymentsRequest pageSize + * @property {string|null} [pageToken] ListApiDeploymentsRequest pageToken + * @property {string|null} [filter] ListApiDeploymentsRequest filter + */ + + /** + * Constructs a new ListApiDeploymentsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApiDeploymentsRequest. + * @implements IListApiDeploymentsRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest=} [properties] Properties to set + */ + function ListApiDeploymentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApiDeploymentsRequest parent. + * @member {string} parent + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @instance + */ + ListApiDeploymentsRequest.prototype.parent = ""; + + /** + * ListApiDeploymentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @instance + */ + ListApiDeploymentsRequest.prototype.pageSize = 0; + + /** + * ListApiDeploymentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @instance + */ + ListApiDeploymentsRequest.prototype.pageToken = ""; + + /** + * ListApiDeploymentsRequest filter. + * @member {string} filter + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @instance + */ + ListApiDeploymentsRequest.prototype.filter = ""; + + /** + * Creates a new ListApiDeploymentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest} ListApiDeploymentsRequest instance + */ + ListApiDeploymentsRequest.create = function create(properties) { + return new ListApiDeploymentsRequest(properties); + }; + + /** + * Encodes the specified ListApiDeploymentsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest} message ListApiDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiDeploymentsRequest.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 ListApiDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest} message ListApiDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApiDeploymentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest} ListApiDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiDeploymentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest(); + 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 ListApiDeploymentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest} ListApiDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApiDeploymentsRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApiDeploymentsRequest.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 ListApiDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest} ListApiDeploymentsRequest + */ + ListApiDeploymentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest(); + 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 ListApiDeploymentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest} message ListApiDeploymentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApiDeploymentsRequest.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 ListApiDeploymentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListApiDeploymentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApiDeploymentsRequest; + })(); + + v1.ListApiDeploymentsResponse = (function() { + + /** + * Properties of a ListApiDeploymentsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApiDeploymentsResponse + * @property {Array.|null} [apiDeployments] ListApiDeploymentsResponse apiDeployments + * @property {string|null} [nextPageToken] ListApiDeploymentsResponse nextPageToken + */ + + /** + * Constructs a new ListApiDeploymentsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApiDeploymentsResponse. + * @implements IListApiDeploymentsResponse + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse=} [properties] Properties to set + */ + function ListApiDeploymentsResponse(properties) { + this.apiDeployments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApiDeploymentsResponse apiDeployments. + * @member {Array.} apiDeployments + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @instance + */ + ListApiDeploymentsResponse.prototype.apiDeployments = $util.emptyArray; + + /** + * ListApiDeploymentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @instance + */ + ListApiDeploymentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListApiDeploymentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse} ListApiDeploymentsResponse instance + */ + ListApiDeploymentsResponse.create = function create(properties) { + return new ListApiDeploymentsResponse(properties); + }; + + /** + * Encodes the specified ListApiDeploymentsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse} message ListApiDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiDeploymentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiDeployments != null && message.apiDeployments.length) + for (var i = 0; i < message.apiDeployments.length; ++i) + $root.google.cloud.apigeeregistry.v1.ApiDeployment.encode(message.apiDeployments[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 ListApiDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse} message ListApiDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApiDeploymentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse} ListApiDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiDeploymentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.apiDeployments && message.apiDeployments.length)) + message.apiDeployments = []; + message.apiDeployments.push($root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListApiDeploymentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse} ListApiDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApiDeploymentsResponse message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApiDeploymentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiDeployments != null && message.hasOwnProperty("apiDeployments")) { + if (!Array.isArray(message.apiDeployments)) + return "apiDeployments: array expected"; + for (var i = 0; i < message.apiDeployments.length; ++i) { + var error = $root.google.cloud.apigeeregistry.v1.ApiDeployment.verify(message.apiDeployments[i]); + if (error) + return "apiDeployments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListApiDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse} ListApiDeploymentsResponse + */ + ListApiDeploymentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse(); + if (object.apiDeployments) { + if (!Array.isArray(object.apiDeployments)) + throw TypeError(".google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.apiDeployments: array expected"); + message.apiDeployments = []; + for (var i = 0; i < object.apiDeployments.length; ++i) { + if (typeof object.apiDeployments[i] !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse.apiDeployments: object expected"); + message.apiDeployments[i] = $root.google.cloud.apigeeregistry.v1.ApiDeployment.fromObject(object.apiDeployments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListApiDeploymentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse} message ListApiDeploymentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApiDeploymentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.apiDeployments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.apiDeployments && message.apiDeployments.length) { + object.apiDeployments = []; + for (var j = 0; j < message.apiDeployments.length; ++j) + object.apiDeployments[j] = $root.google.cloud.apigeeregistry.v1.ApiDeployment.toObject(message.apiDeployments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListApiDeploymentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListApiDeploymentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApiDeploymentsResponse; + })(); + + v1.GetApiDeploymentRequest = (function() { + + /** + * Properties of a GetApiDeploymentRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IGetApiDeploymentRequest + * @property {string|null} [name] GetApiDeploymentRequest name + */ + + /** + * Constructs a new GetApiDeploymentRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a GetApiDeploymentRequest. + * @implements IGetApiDeploymentRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest=} [properties] Properties to set + */ + function GetApiDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetApiDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.GetApiDeploymentRequest + * @instance + */ + GetApiDeploymentRequest.prototype.name = ""; + + /** + * Creates a new GetApiDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.GetApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.GetApiDeploymentRequest} GetApiDeploymentRequest instance + */ + GetApiDeploymentRequest.create = function create(properties) { + return new GetApiDeploymentRequest(properties); + }; + + /** + * Encodes the specified GetApiDeploymentRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.GetApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest} message GetApiDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetApiDeploymentRequest.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 GetApiDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetApiDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest} message GetApiDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetApiDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetApiDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.GetApiDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.GetApiDeploymentRequest} GetApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetApiDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest(); + 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 GetApiDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetApiDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.GetApiDeploymentRequest} GetApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetApiDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetApiDeploymentRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.GetApiDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetApiDeploymentRequest.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 GetApiDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.GetApiDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.GetApiDeploymentRequest} GetApiDeploymentRequest + */ + GetApiDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetApiDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.GetApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.GetApiDeploymentRequest} message GetApiDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetApiDeploymentRequest.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 GetApiDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.GetApiDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + GetApiDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetApiDeploymentRequest; + })(); + + v1.CreateApiDeploymentRequest = (function() { + + /** + * Properties of a CreateApiDeploymentRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface ICreateApiDeploymentRequest + * @property {string|null} [parent] CreateApiDeploymentRequest parent + * @property {google.cloud.apigeeregistry.v1.IApiDeployment|null} [apiDeployment] CreateApiDeploymentRequest apiDeployment + * @property {string|null} [apiDeploymentId] CreateApiDeploymentRequest apiDeploymentId + */ + + /** + * Constructs a new CreateApiDeploymentRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a CreateApiDeploymentRequest. + * @implements ICreateApiDeploymentRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest=} [properties] Properties to set + */ + function CreateApiDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateApiDeploymentRequest parent. + * @member {string} parent + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @instance + */ + CreateApiDeploymentRequest.prototype.parent = ""; + + /** + * CreateApiDeploymentRequest apiDeployment. + * @member {google.cloud.apigeeregistry.v1.IApiDeployment|null|undefined} apiDeployment + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @instance + */ + CreateApiDeploymentRequest.prototype.apiDeployment = null; + + /** + * CreateApiDeploymentRequest apiDeploymentId. + * @member {string} apiDeploymentId + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @instance + */ + CreateApiDeploymentRequest.prototype.apiDeploymentId = ""; + + /** + * Creates a new CreateApiDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest} CreateApiDeploymentRequest instance + */ + CreateApiDeploymentRequest.create = function create(properties) { + return new CreateApiDeploymentRequest(properties); + }; + + /** + * Encodes the specified CreateApiDeploymentRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest} message CreateApiDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateApiDeploymentRequest.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.apiDeployment != null && Object.hasOwnProperty.call(message, "apiDeployment")) + $root.google.cloud.apigeeregistry.v1.ApiDeployment.encode(message.apiDeployment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.apiDeploymentId != null && Object.hasOwnProperty.call(message, "apiDeploymentId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.apiDeploymentId); + return writer; + }; + + /** + * Encodes the specified CreateApiDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest} message CreateApiDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateApiDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateApiDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest} CreateApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateApiDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.apiDeployment = $root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32()); + break; + case 3: + message.apiDeploymentId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateApiDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest} CreateApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateApiDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateApiDeploymentRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateApiDeploymentRequest.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.apiDeployment != null && message.hasOwnProperty("apiDeployment")) { + var error = $root.google.cloud.apigeeregistry.v1.ApiDeployment.verify(message.apiDeployment); + if (error) + return "apiDeployment." + error; + } + if (message.apiDeploymentId != null && message.hasOwnProperty("apiDeploymentId")) + if (!$util.isString(message.apiDeploymentId)) + return "apiDeploymentId: string expected"; + return null; + }; + + /** + * Creates a CreateApiDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest} CreateApiDeploymentRequest + */ + CreateApiDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.apiDeployment != null) { + if (typeof object.apiDeployment !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest.apiDeployment: object expected"); + message.apiDeployment = $root.google.cloud.apigeeregistry.v1.ApiDeployment.fromObject(object.apiDeployment); + } + if (object.apiDeploymentId != null) + message.apiDeploymentId = String(object.apiDeploymentId); + return message; + }; + + /** + * Creates a plain object from a CreateApiDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest} message CreateApiDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateApiDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.apiDeployment = null; + object.apiDeploymentId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.apiDeployment != null && message.hasOwnProperty("apiDeployment")) + object.apiDeployment = $root.google.cloud.apigeeregistry.v1.ApiDeployment.toObject(message.apiDeployment, options); + if (message.apiDeploymentId != null && message.hasOwnProperty("apiDeploymentId")) + object.apiDeploymentId = message.apiDeploymentId; + return object; + }; + + /** + * Converts this CreateApiDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateApiDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateApiDeploymentRequest; + })(); + + v1.UpdateApiDeploymentRequest = (function() { + + /** + * Properties of an UpdateApiDeploymentRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IUpdateApiDeploymentRequest + * @property {google.cloud.apigeeregistry.v1.IApiDeployment|null} [apiDeployment] UpdateApiDeploymentRequest apiDeployment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateApiDeploymentRequest updateMask + * @property {boolean|null} [allowMissing] UpdateApiDeploymentRequest allowMissing + */ + + /** + * Constructs a new UpdateApiDeploymentRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents an UpdateApiDeploymentRequest. + * @implements IUpdateApiDeploymentRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest=} [properties] Properties to set + */ + function UpdateApiDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateApiDeploymentRequest apiDeployment. + * @member {google.cloud.apigeeregistry.v1.IApiDeployment|null|undefined} apiDeployment + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @instance + */ + UpdateApiDeploymentRequest.prototype.apiDeployment = null; + + /** + * UpdateApiDeploymentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @instance + */ + UpdateApiDeploymentRequest.prototype.updateMask = null; + + /** + * UpdateApiDeploymentRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @instance + */ + UpdateApiDeploymentRequest.prototype.allowMissing = false; + + /** + * Creates a new UpdateApiDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest} UpdateApiDeploymentRequest instance + */ + UpdateApiDeploymentRequest.create = function create(properties) { + return new UpdateApiDeploymentRequest(properties); + }; + + /** + * Encodes the specified UpdateApiDeploymentRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest} message UpdateApiDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateApiDeploymentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiDeployment != null && Object.hasOwnProperty.call(message, "apiDeployment")) + $root.google.cloud.apigeeregistry.v1.ApiDeployment.encode(message.apiDeployment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified UpdateApiDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest} message UpdateApiDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateApiDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateApiDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest} UpdateApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateApiDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.apiDeployment = $root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.allowMissing = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateApiDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest} UpdateApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateApiDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateApiDeploymentRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateApiDeploymentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiDeployment != null && message.hasOwnProperty("apiDeployment")) { + var error = $root.google.cloud.apigeeregistry.v1.ApiDeployment.verify(message.apiDeployment); + if (error) + return "apiDeployment." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates an UpdateApiDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest} UpdateApiDeploymentRequest + */ + UpdateApiDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest(); + if (object.apiDeployment != null) { + if (typeof object.apiDeployment !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.apiDeployment: object expected"); + message.apiDeployment = $root.google.cloud.apigeeregistry.v1.ApiDeployment.fromObject(object.apiDeployment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from an UpdateApiDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest} message UpdateApiDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateApiDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.apiDeployment = null; + object.updateMask = null; + object.allowMissing = false; + } + if (message.apiDeployment != null && message.hasOwnProperty("apiDeployment")) + object.apiDeployment = $root.google.cloud.apigeeregistry.v1.ApiDeployment.toObject(message.apiDeployment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this UpdateApiDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateApiDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateApiDeploymentRequest; + })(); + + v1.DeleteApiDeploymentRequest = (function() { + + /** + * Properties of a DeleteApiDeploymentRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IDeleteApiDeploymentRequest + * @property {string|null} [name] DeleteApiDeploymentRequest name + * @property {boolean|null} [force] DeleteApiDeploymentRequest force + */ + + /** + * Constructs a new DeleteApiDeploymentRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a DeleteApiDeploymentRequest. + * @implements IDeleteApiDeploymentRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest=} [properties] Properties to set + */ + function DeleteApiDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteApiDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @instance + */ + DeleteApiDeploymentRequest.prototype.name = ""; + + /** + * DeleteApiDeploymentRequest force. + * @member {boolean} force + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @instance + */ + DeleteApiDeploymentRequest.prototype.force = false; + + /** + * Creates a new DeleteApiDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest} DeleteApiDeploymentRequest instance + */ + DeleteApiDeploymentRequest.create = function create(properties) { + return new DeleteApiDeploymentRequest(properties); + }; + + /** + * Encodes the specified DeleteApiDeploymentRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest} message DeleteApiDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiDeploymentRequest.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.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteApiDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest} message DeleteApiDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteApiDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest} DeleteApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.force = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteApiDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest} DeleteApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteApiDeploymentRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteApiDeploymentRequest.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.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteApiDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest} DeleteApiDeploymentRequest + */ + DeleteApiDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteApiDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest} message DeleteApiDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteApiDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteApiDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteApiDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteApiDeploymentRequest; + })(); + + v1.TagApiDeploymentRevisionRequest = (function() { + + /** + * Properties of a TagApiDeploymentRevisionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface ITagApiDeploymentRevisionRequest + * @property {string|null} [name] TagApiDeploymentRevisionRequest name + * @property {string|null} [tag] TagApiDeploymentRevisionRequest tag + */ + + /** + * Constructs a new TagApiDeploymentRevisionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a TagApiDeploymentRevisionRequest. + * @implements ITagApiDeploymentRevisionRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest=} [properties] Properties to set + */ + function TagApiDeploymentRevisionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TagApiDeploymentRevisionRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @instance + */ + TagApiDeploymentRevisionRequest.prototype.name = ""; + + /** + * TagApiDeploymentRevisionRequest tag. + * @member {string} tag + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @instance + */ + TagApiDeploymentRevisionRequest.prototype.tag = ""; + + /** + * Creates a new TagApiDeploymentRevisionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest} TagApiDeploymentRevisionRequest instance + */ + TagApiDeploymentRevisionRequest.create = function create(properties) { + return new TagApiDeploymentRevisionRequest(properties); + }; + + /** + * Encodes the specified TagApiDeploymentRevisionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest} message TagApiDeploymentRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagApiDeploymentRevisionRequest.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.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tag); + return writer; + }; + + /** + * Encodes the specified TagApiDeploymentRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest} message TagApiDeploymentRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagApiDeploymentRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TagApiDeploymentRevisionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest} TagApiDeploymentRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagApiDeploymentRevisionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.tag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TagApiDeploymentRevisionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest} TagApiDeploymentRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagApiDeploymentRevisionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TagApiDeploymentRevisionRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TagApiDeploymentRevisionRequest.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.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + return null; + }; + + /** + * Creates a TagApiDeploymentRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest} TagApiDeploymentRevisionRequest + */ + TagApiDeploymentRevisionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.tag != null) + message.tag = String(object.tag); + return message; + }; + + /** + * Creates a plain object from a TagApiDeploymentRevisionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest} message TagApiDeploymentRevisionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TagApiDeploymentRevisionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.tag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + return object; + }; + + /** + * Converts this TagApiDeploymentRevisionRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @instance + * @returns {Object.} JSON object + */ + TagApiDeploymentRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TagApiDeploymentRevisionRequest; + })(); + + v1.ListApiDeploymentRevisionsRequest = (function() { + + /** + * Properties of a ListApiDeploymentRevisionsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApiDeploymentRevisionsRequest + * @property {string|null} [name] ListApiDeploymentRevisionsRequest name + * @property {number|null} [pageSize] ListApiDeploymentRevisionsRequest pageSize + * @property {string|null} [pageToken] ListApiDeploymentRevisionsRequest pageToken + */ + + /** + * Constructs a new ListApiDeploymentRevisionsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApiDeploymentRevisionsRequest. + * @implements IListApiDeploymentRevisionsRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest=} [properties] Properties to set + */ + function ListApiDeploymentRevisionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApiDeploymentRevisionsRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @instance + */ + ListApiDeploymentRevisionsRequest.prototype.name = ""; + + /** + * ListApiDeploymentRevisionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @instance + */ + ListApiDeploymentRevisionsRequest.prototype.pageSize = 0; + + /** + * ListApiDeploymentRevisionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @instance + */ + ListApiDeploymentRevisionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListApiDeploymentRevisionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest} ListApiDeploymentRevisionsRequest instance + */ + ListApiDeploymentRevisionsRequest.create = function create(properties) { + return new ListApiDeploymentRevisionsRequest(properties); + }; + + /** + * Encodes the specified ListApiDeploymentRevisionsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest} message ListApiDeploymentRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiDeploymentRevisionsRequest.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.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 ListApiDeploymentRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest} message ListApiDeploymentRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiDeploymentRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApiDeploymentRevisionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest} ListApiDeploymentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiDeploymentRevisionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = 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 ListApiDeploymentRevisionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest} ListApiDeploymentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiDeploymentRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApiDeploymentRevisionsRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApiDeploymentRevisionsRequest.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.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 ListApiDeploymentRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest} ListApiDeploymentRevisionsRequest + */ + ListApiDeploymentRevisionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest(); + if (object.name != null) + message.name = String(object.name); + 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 ListApiDeploymentRevisionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest} message ListApiDeploymentRevisionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApiDeploymentRevisionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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 ListApiDeploymentRevisionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListApiDeploymentRevisionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApiDeploymentRevisionsRequest; + })(); + + v1.ListApiDeploymentRevisionsResponse = (function() { + + /** + * Properties of a ListApiDeploymentRevisionsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListApiDeploymentRevisionsResponse + * @property {Array.|null} [apiDeployments] ListApiDeploymentRevisionsResponse apiDeployments + * @property {string|null} [nextPageToken] ListApiDeploymentRevisionsResponse nextPageToken + */ + + /** + * Constructs a new ListApiDeploymentRevisionsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListApiDeploymentRevisionsResponse. + * @implements IListApiDeploymentRevisionsResponse + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse=} [properties] Properties to set + */ + function ListApiDeploymentRevisionsResponse(properties) { + this.apiDeployments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListApiDeploymentRevisionsResponse apiDeployments. + * @member {Array.} apiDeployments + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @instance + */ + ListApiDeploymentRevisionsResponse.prototype.apiDeployments = $util.emptyArray; + + /** + * ListApiDeploymentRevisionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @instance + */ + ListApiDeploymentRevisionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListApiDeploymentRevisionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse} ListApiDeploymentRevisionsResponse instance + */ + ListApiDeploymentRevisionsResponse.create = function create(properties) { + return new ListApiDeploymentRevisionsResponse(properties); + }; + + /** + * Encodes the specified ListApiDeploymentRevisionsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse} message ListApiDeploymentRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiDeploymentRevisionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiDeployments != null && message.apiDeployments.length) + for (var i = 0; i < message.apiDeployments.length; ++i) + $root.google.cloud.apigeeregistry.v1.ApiDeployment.encode(message.apiDeployments[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 ListApiDeploymentRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse} message ListApiDeploymentRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListApiDeploymentRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListApiDeploymentRevisionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse} ListApiDeploymentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiDeploymentRevisionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.apiDeployments && message.apiDeployments.length)) + message.apiDeployments = []; + message.apiDeployments.push($root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListApiDeploymentRevisionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse} ListApiDeploymentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListApiDeploymentRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListApiDeploymentRevisionsResponse message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListApiDeploymentRevisionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.apiDeployments != null && message.hasOwnProperty("apiDeployments")) { + if (!Array.isArray(message.apiDeployments)) + return "apiDeployments: array expected"; + for (var i = 0; i < message.apiDeployments.length; ++i) { + var error = $root.google.cloud.apigeeregistry.v1.ApiDeployment.verify(message.apiDeployments[i]); + if (error) + return "apiDeployments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListApiDeploymentRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse} ListApiDeploymentRevisionsResponse + */ + ListApiDeploymentRevisionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse(); + if (object.apiDeployments) { + if (!Array.isArray(object.apiDeployments)) + throw TypeError(".google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.apiDeployments: array expected"); + message.apiDeployments = []; + for (var i = 0; i < object.apiDeployments.length; ++i) { + if (typeof object.apiDeployments[i] !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse.apiDeployments: object expected"); + message.apiDeployments[i] = $root.google.cloud.apigeeregistry.v1.ApiDeployment.fromObject(object.apiDeployments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListApiDeploymentRevisionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse} message ListApiDeploymentRevisionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListApiDeploymentRevisionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.apiDeployments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.apiDeployments && message.apiDeployments.length) { + object.apiDeployments = []; + for (var j = 0; j < message.apiDeployments.length; ++j) + object.apiDeployments[j] = $root.google.cloud.apigeeregistry.v1.ApiDeployment.toObject(message.apiDeployments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListApiDeploymentRevisionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListApiDeploymentRevisionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListApiDeploymentRevisionsResponse; + })(); + + v1.RollbackApiDeploymentRequest = (function() { + + /** + * Properties of a RollbackApiDeploymentRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IRollbackApiDeploymentRequest + * @property {string|null} [name] RollbackApiDeploymentRequest name + * @property {string|null} [revisionId] RollbackApiDeploymentRequest revisionId + */ + + /** + * Constructs a new RollbackApiDeploymentRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a RollbackApiDeploymentRequest. + * @implements IRollbackApiDeploymentRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest=} [properties] Properties to set + */ + function RollbackApiDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RollbackApiDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @instance + */ + RollbackApiDeploymentRequest.prototype.name = ""; + + /** + * RollbackApiDeploymentRequest revisionId. + * @member {string} revisionId + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @instance + */ + RollbackApiDeploymentRequest.prototype.revisionId = ""; + + /** + * Creates a new RollbackApiDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest} RollbackApiDeploymentRequest instance + */ + RollbackApiDeploymentRequest.create = function create(properties) { + return new RollbackApiDeploymentRequest(properties); + }; + + /** + * Encodes the specified RollbackApiDeploymentRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest} message RollbackApiDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RollbackApiDeploymentRequest.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.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); + return writer; + }; + + /** + * Encodes the specified RollbackApiDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest} message RollbackApiDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RollbackApiDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RollbackApiDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest} RollbackApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RollbackApiDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.revisionId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RollbackApiDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest} RollbackApiDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RollbackApiDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RollbackApiDeploymentRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RollbackApiDeploymentRequest.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.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + return null; + }; + + /** + * Creates a RollbackApiDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest} RollbackApiDeploymentRequest + */ + RollbackApiDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + return message; + }; + + /** + * Creates a plain object from a RollbackApiDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @static + * @param {google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest} message RollbackApiDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RollbackApiDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.revisionId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + return object; + }; + + /** + * Converts this RollbackApiDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + RollbackApiDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RollbackApiDeploymentRequest; + })(); + + v1.DeleteApiDeploymentRevisionRequest = (function() { + + /** + * Properties of a DeleteApiDeploymentRevisionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IDeleteApiDeploymentRevisionRequest + * @property {string|null} [name] DeleteApiDeploymentRevisionRequest name + */ + + /** + * Constructs a new DeleteApiDeploymentRevisionRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a DeleteApiDeploymentRevisionRequest. + * @implements IDeleteApiDeploymentRevisionRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest=} [properties] Properties to set + */ + function DeleteApiDeploymentRevisionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteApiDeploymentRevisionRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest + * @instance + */ + DeleteApiDeploymentRevisionRequest.prototype.name = ""; + + /** + * Creates a new DeleteApiDeploymentRevisionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest} DeleteApiDeploymentRevisionRequest instance + */ + DeleteApiDeploymentRevisionRequest.create = function create(properties) { + return new DeleteApiDeploymentRevisionRequest(properties); + }; + + /** + * Encodes the specified DeleteApiDeploymentRevisionRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest} message DeleteApiDeploymentRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiDeploymentRevisionRequest.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 DeleteApiDeploymentRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest} message DeleteApiDeploymentRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteApiDeploymentRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteApiDeploymentRevisionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest} DeleteApiDeploymentRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiDeploymentRevisionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest(); + 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 DeleteApiDeploymentRevisionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest} DeleteApiDeploymentRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteApiDeploymentRevisionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteApiDeploymentRevisionRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteApiDeploymentRevisionRequest.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 DeleteApiDeploymentRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest} DeleteApiDeploymentRevisionRequest + */ + DeleteApiDeploymentRevisionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteApiDeploymentRevisionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest + * @static + * @param {google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest} message DeleteApiDeploymentRevisionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteApiDeploymentRevisionRequest.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 DeleteApiDeploymentRevisionRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteApiDeploymentRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteApiDeploymentRevisionRequest; + })(); + + v1.ListArtifactsRequest = (function() { + + /** + * Properties of a ListArtifactsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListArtifactsRequest + * @property {string|null} [parent] ListArtifactsRequest parent + * @property {number|null} [pageSize] ListArtifactsRequest pageSize + * @property {string|null} [pageToken] ListArtifactsRequest pageToken + * @property {string|null} [filter] ListArtifactsRequest filter + */ + + /** + * Constructs a new ListArtifactsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListArtifactsRequest. + * @implements IListArtifactsRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListArtifactsRequest=} [properties] Properties to set + */ + function ListArtifactsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListArtifactsRequest parent. + * @member {string} parent + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @instance + */ + ListArtifactsRequest.prototype.parent = ""; + + /** + * ListArtifactsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @instance + */ + ListArtifactsRequest.prototype.pageSize = 0; + + /** + * ListArtifactsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @instance + */ + ListArtifactsRequest.prototype.pageToken = ""; + + /** + * ListArtifactsRequest filter. + * @member {string} filter + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @instance + */ + ListArtifactsRequest.prototype.filter = ""; + + /** + * Creates a new ListArtifactsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListArtifactsRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListArtifactsRequest} ListArtifactsRequest instance + */ + ListArtifactsRequest.create = function create(properties) { + return new ListArtifactsRequest(properties); + }; + + /** + * Encodes the specified ListArtifactsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListArtifactsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListArtifactsRequest} message ListArtifactsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListArtifactsRequest.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 ListArtifactsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListArtifactsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IListArtifactsRequest} message ListArtifactsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListArtifactsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListArtifactsRequest} ListArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListArtifactsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListArtifactsRequest(); + 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 ListArtifactsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListArtifactsRequest} ListArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListArtifactsRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListArtifactsRequest.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 ListArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListArtifactsRequest} ListArtifactsRequest + */ + ListArtifactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListArtifactsRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListArtifactsRequest(); + 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 ListArtifactsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ListArtifactsRequest} message ListArtifactsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListArtifactsRequest.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 ListArtifactsRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @instance + * @returns {Object.} JSON object + */ + ListArtifactsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListArtifactsRequest; + })(); + + v1.ListArtifactsResponse = (function() { + + /** + * Properties of a ListArtifactsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IListArtifactsResponse + * @property {Array.|null} [artifacts] ListArtifactsResponse artifacts + * @property {string|null} [nextPageToken] ListArtifactsResponse nextPageToken + */ + + /** + * Constructs a new ListArtifactsResponse. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ListArtifactsResponse. + * @implements IListArtifactsResponse + * @constructor + * @param {google.cloud.apigeeregistry.v1.IListArtifactsResponse=} [properties] Properties to set + */ + function ListArtifactsResponse(properties) { + this.artifacts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListArtifactsResponse artifacts. + * @member {Array.} artifacts + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @instance + */ + ListArtifactsResponse.prototype.artifacts = $util.emptyArray; + + /** + * ListArtifactsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @instance + */ + ListArtifactsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListArtifactsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListArtifactsResponse=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ListArtifactsResponse} ListArtifactsResponse instance + */ + ListArtifactsResponse.create = function create(properties) { + return new ListArtifactsResponse(properties); + }; + + /** + * Encodes the specified ListArtifactsResponse message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListArtifactsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListArtifactsResponse} message ListArtifactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListArtifactsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.artifacts != null && message.artifacts.length) + for (var i = 0; i < message.artifacts.length; ++i) + $root.google.cloud.apigeeregistry.v1.Artifact.encode(message.artifacts[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 ListArtifactsResponse message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ListArtifactsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.IListArtifactsResponse} message ListArtifactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListArtifactsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ListArtifactsResponse} ListArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListArtifactsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ListArtifactsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.artifacts && message.artifacts.length)) + message.artifacts = []; + message.artifacts.push($root.google.cloud.apigeeregistry.v1.Artifact.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListArtifactsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ListArtifactsResponse} ListArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListArtifactsResponse message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListArtifactsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.artifacts != null && message.hasOwnProperty("artifacts")) { + if (!Array.isArray(message.artifacts)) + return "artifacts: array expected"; + for (var i = 0; i < message.artifacts.length; ++i) { + var error = $root.google.cloud.apigeeregistry.v1.Artifact.verify(message.artifacts[i]); + if (error) + return "artifacts." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ListArtifactsResponse} ListArtifactsResponse + */ + ListArtifactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ListArtifactsResponse) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ListArtifactsResponse(); + if (object.artifacts) { + if (!Array.isArray(object.artifacts)) + throw TypeError(".google.cloud.apigeeregistry.v1.ListArtifactsResponse.artifacts: array expected"); + message.artifacts = []; + for (var i = 0; i < object.artifacts.length; ++i) { + if (typeof object.artifacts[i] !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ListArtifactsResponse.artifacts: object expected"); + message.artifacts[i] = $root.google.cloud.apigeeregistry.v1.Artifact.fromObject(object.artifacts[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListArtifactsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @static + * @param {google.cloud.apigeeregistry.v1.ListArtifactsResponse} message ListArtifactsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListArtifactsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.artifacts = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.artifacts && message.artifacts.length) { + object.artifacts = []; + for (var j = 0; j < message.artifacts.length; ++j) + object.artifacts[j] = $root.google.cloud.apigeeregistry.v1.Artifact.toObject(message.artifacts[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListArtifactsResponse to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @instance + * @returns {Object.} JSON object + */ + ListArtifactsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListArtifactsResponse; + })(); + + v1.GetArtifactRequest = (function() { + + /** + * Properties of a GetArtifactRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IGetArtifactRequest + * @property {string|null} [name] GetArtifactRequest name + */ + + /** + * Constructs a new GetArtifactRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a GetArtifactRequest. + * @implements IGetArtifactRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IGetArtifactRequest=} [properties] Properties to set + */ + function GetArtifactRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetArtifactRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.GetArtifactRequest + * @instance + */ + GetArtifactRequest.prototype.name = ""; + + /** + * Creates a new GetArtifactRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.GetArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetArtifactRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.GetArtifactRequest} GetArtifactRequest instance + */ + GetArtifactRequest.create = function create(properties) { + return new GetArtifactRequest(properties); + }; + + /** + * Encodes the specified GetArtifactRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetArtifactRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.GetArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetArtifactRequest} message GetArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetArtifactRequest.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 GetArtifactRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetArtifactRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetArtifactRequest} message GetArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetArtifactRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetArtifactRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.GetArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.GetArtifactRequest} GetArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetArtifactRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.GetArtifactRequest(); + 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 GetArtifactRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.GetArtifactRequest} GetArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetArtifactRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetArtifactRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.GetArtifactRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetArtifactRequest.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 GetArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.GetArtifactRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.GetArtifactRequest} GetArtifactRequest + */ + GetArtifactRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.GetArtifactRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.GetArtifactRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetArtifactRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.GetArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.GetArtifactRequest} message GetArtifactRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetArtifactRequest.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 GetArtifactRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.GetArtifactRequest + * @instance + * @returns {Object.} JSON object + */ + GetArtifactRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetArtifactRequest; + })(); + + v1.GetArtifactContentsRequest = (function() { + + /** + * Properties of a GetArtifactContentsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IGetArtifactContentsRequest + * @property {string|null} [name] GetArtifactContentsRequest name + */ + + /** + * Constructs a new GetArtifactContentsRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a GetArtifactContentsRequest. + * @implements IGetArtifactContentsRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest=} [properties] Properties to set + */ + function GetArtifactContentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetArtifactContentsRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.GetArtifactContentsRequest + * @instance + */ + GetArtifactContentsRequest.prototype.name = ""; + + /** + * Creates a new GetArtifactContentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.GetArtifactContentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.GetArtifactContentsRequest} GetArtifactContentsRequest instance + */ + GetArtifactContentsRequest.create = function create(properties) { + return new GetArtifactContentsRequest(properties); + }; + + /** + * Encodes the specified GetArtifactContentsRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.GetArtifactContentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest} message GetArtifactContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetArtifactContentsRequest.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 GetArtifactContentsRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.GetArtifactContentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetArtifactContentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest} message GetArtifactContentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetArtifactContentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetArtifactContentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.GetArtifactContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.GetArtifactContentsRequest} GetArtifactContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetArtifactContentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest(); + 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 GetArtifactContentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.GetArtifactContentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.GetArtifactContentsRequest} GetArtifactContentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetArtifactContentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetArtifactContentsRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.GetArtifactContentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetArtifactContentsRequest.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 GetArtifactContentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.GetArtifactContentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.GetArtifactContentsRequest} GetArtifactContentsRequest + */ + GetArtifactContentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetArtifactContentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.GetArtifactContentsRequest + * @static + * @param {google.cloud.apigeeregistry.v1.GetArtifactContentsRequest} message GetArtifactContentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetArtifactContentsRequest.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 GetArtifactContentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.GetArtifactContentsRequest + * @instance + * @returns {Object.} JSON object + */ + GetArtifactContentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetArtifactContentsRequest; + })(); + + v1.CreateArtifactRequest = (function() { + + /** + * Properties of a CreateArtifactRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface ICreateArtifactRequest + * @property {string|null} [parent] CreateArtifactRequest parent + * @property {google.cloud.apigeeregistry.v1.IArtifact|null} [artifact] CreateArtifactRequest artifact + * @property {string|null} [artifactId] CreateArtifactRequest artifactId + */ + + /** + * Constructs a new CreateArtifactRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a CreateArtifactRequest. + * @implements ICreateArtifactRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.ICreateArtifactRequest=} [properties] Properties to set + */ + function CreateArtifactRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateArtifactRequest parent. + * @member {string} parent + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @instance + */ + CreateArtifactRequest.prototype.parent = ""; + + /** + * CreateArtifactRequest artifact. + * @member {google.cloud.apigeeregistry.v1.IArtifact|null|undefined} artifact + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @instance + */ + CreateArtifactRequest.prototype.artifact = null; + + /** + * CreateArtifactRequest artifactId. + * @member {string} artifactId + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @instance + */ + CreateArtifactRequest.prototype.artifactId = ""; + + /** + * Creates a new CreateArtifactRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateArtifactRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.CreateArtifactRequest} CreateArtifactRequest instance + */ + CreateArtifactRequest.create = function create(properties) { + return new CreateArtifactRequest(properties); + }; + + /** + * Encodes the specified CreateArtifactRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateArtifactRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateArtifactRequest} message CreateArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateArtifactRequest.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.artifact != null && Object.hasOwnProperty.call(message, "artifact")) + $root.google.cloud.apigeeregistry.v1.Artifact.encode(message.artifact, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.artifactId != null && Object.hasOwnProperty.call(message, "artifactId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.artifactId); + return writer; + }; + + /** + * Encodes the specified CreateArtifactRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.CreateArtifactRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ICreateArtifactRequest} message CreateArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateArtifactRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateArtifactRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.CreateArtifactRequest} CreateArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateArtifactRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.CreateArtifactRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.artifact = $root.google.cloud.apigeeregistry.v1.Artifact.decode(reader, reader.uint32()); + break; + case 3: + message.artifactId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateArtifactRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.CreateArtifactRequest} CreateArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateArtifactRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateArtifactRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateArtifactRequest.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.artifact != null && message.hasOwnProperty("artifact")) { + var error = $root.google.cloud.apigeeregistry.v1.Artifact.verify(message.artifact); + if (error) + return "artifact." + error; + } + if (message.artifactId != null && message.hasOwnProperty("artifactId")) + if (!$util.isString(message.artifactId)) + return "artifactId: string expected"; + return null; + }; + + /** + * Creates a CreateArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.CreateArtifactRequest} CreateArtifactRequest + */ + CreateArtifactRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.CreateArtifactRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.CreateArtifactRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.artifact != null) { + if (typeof object.artifact !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.CreateArtifactRequest.artifact: object expected"); + message.artifact = $root.google.cloud.apigeeregistry.v1.Artifact.fromObject(object.artifact); + } + if (object.artifactId != null) + message.artifactId = String(object.artifactId); + return message; + }; + + /** + * Creates a plain object from a CreateArtifactRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.CreateArtifactRequest} message CreateArtifactRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateArtifactRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.artifact = null; + object.artifactId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.artifact != null && message.hasOwnProperty("artifact")) + object.artifact = $root.google.cloud.apigeeregistry.v1.Artifact.toObject(message.artifact, options); + if (message.artifactId != null && message.hasOwnProperty("artifactId")) + object.artifactId = message.artifactId; + return object; + }; + + /** + * Converts this CreateArtifactRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @instance + * @returns {Object.} JSON object + */ + CreateArtifactRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateArtifactRequest; + })(); + + v1.ReplaceArtifactRequest = (function() { + + /** + * Properties of a ReplaceArtifactRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IReplaceArtifactRequest + * @property {google.cloud.apigeeregistry.v1.IArtifact|null} [artifact] ReplaceArtifactRequest artifact + */ + + /** + * Constructs a new ReplaceArtifactRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a ReplaceArtifactRequest. + * @implements IReplaceArtifactRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IReplaceArtifactRequest=} [properties] Properties to set + */ + function ReplaceArtifactRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReplaceArtifactRequest artifact. + * @member {google.cloud.apigeeregistry.v1.IArtifact|null|undefined} artifact + * @memberof google.cloud.apigeeregistry.v1.ReplaceArtifactRequest + * @instance + */ + ReplaceArtifactRequest.prototype.artifact = null; + + /** + * Creates a new ReplaceArtifactRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.ReplaceArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IReplaceArtifactRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.ReplaceArtifactRequest} ReplaceArtifactRequest instance + */ + ReplaceArtifactRequest.create = function create(properties) { + return new ReplaceArtifactRequest(properties); + }; + + /** + * Encodes the specified ReplaceArtifactRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.ReplaceArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IReplaceArtifactRequest} message ReplaceArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplaceArtifactRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.artifact != null && Object.hasOwnProperty.call(message, "artifact")) + $root.google.cloud.apigeeregistry.v1.Artifact.encode(message.artifact, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReplaceArtifactRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ReplaceArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IReplaceArtifactRequest} message ReplaceArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplaceArtifactRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReplaceArtifactRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.ReplaceArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.ReplaceArtifactRequest} ReplaceArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplaceArtifactRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.artifact = $root.google.cloud.apigeeregistry.v1.Artifact.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReplaceArtifactRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.ReplaceArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.ReplaceArtifactRequest} ReplaceArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplaceArtifactRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReplaceArtifactRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.ReplaceArtifactRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReplaceArtifactRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.artifact != null && message.hasOwnProperty("artifact")) { + var error = $root.google.cloud.apigeeregistry.v1.Artifact.verify(message.artifact); + if (error) + return "artifact." + error; + } + return null; + }; + + /** + * Creates a ReplaceArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.ReplaceArtifactRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.ReplaceArtifactRequest} ReplaceArtifactRequest + */ + ReplaceArtifactRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest(); + if (object.artifact != null) { + if (typeof object.artifact !== "object") + throw TypeError(".google.cloud.apigeeregistry.v1.ReplaceArtifactRequest.artifact: object expected"); + message.artifact = $root.google.cloud.apigeeregistry.v1.Artifact.fromObject(object.artifact); + } + return message; + }; + + /** + * Creates a plain object from a ReplaceArtifactRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.ReplaceArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.ReplaceArtifactRequest} message ReplaceArtifactRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReplaceArtifactRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.artifact = null; + if (message.artifact != null && message.hasOwnProperty("artifact")) + object.artifact = $root.google.cloud.apigeeregistry.v1.Artifact.toObject(message.artifact, options); + return object; + }; + + /** + * Converts this ReplaceArtifactRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.ReplaceArtifactRequest + * @instance + * @returns {Object.} JSON object + */ + ReplaceArtifactRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReplaceArtifactRequest; + })(); + + v1.DeleteArtifactRequest = (function() { + + /** + * Properties of a DeleteArtifactRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @interface IDeleteArtifactRequest + * @property {string|null} [name] DeleteArtifactRequest name + */ + + /** + * Constructs a new DeleteArtifactRequest. + * @memberof google.cloud.apigeeregistry.v1 + * @classdesc Represents a DeleteArtifactRequest. + * @implements IDeleteArtifactRequest + * @constructor + * @param {google.cloud.apigeeregistry.v1.IDeleteArtifactRequest=} [properties] Properties to set + */ + function DeleteArtifactRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteArtifactRequest name. + * @member {string} name + * @memberof google.cloud.apigeeregistry.v1.DeleteArtifactRequest + * @instance + */ + DeleteArtifactRequest.prototype.name = ""; + + /** + * Creates a new DeleteArtifactRequest instance using the specified properties. + * @function create + * @memberof google.cloud.apigeeregistry.v1.DeleteArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteArtifactRequest=} [properties] Properties to set + * @returns {google.cloud.apigeeregistry.v1.DeleteArtifactRequest} DeleteArtifactRequest instance + */ + DeleteArtifactRequest.create = function create(properties) { + return new DeleteArtifactRequest(properties); + }; + + /** + * Encodes the specified DeleteArtifactRequest message. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteArtifactRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.apigeeregistry.v1.DeleteArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteArtifactRequest} message DeleteArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteArtifactRequest.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 DeleteArtifactRequest message, length delimited. Does not implicitly {@link google.cloud.apigeeregistry.v1.DeleteArtifactRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.IDeleteArtifactRequest} message DeleteArtifactRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteArtifactRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteArtifactRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.apigeeregistry.v1.DeleteArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.apigeeregistry.v1.DeleteArtifactRequest} DeleteArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteArtifactRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.apigeeregistry.v1.DeleteArtifactRequest(); + 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 DeleteArtifactRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.apigeeregistry.v1.DeleteArtifactRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.apigeeregistry.v1.DeleteArtifactRequest} DeleteArtifactRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteArtifactRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteArtifactRequest message. + * @function verify + * @memberof google.cloud.apigeeregistry.v1.DeleteArtifactRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteArtifactRequest.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 DeleteArtifactRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.apigeeregistry.v1.DeleteArtifactRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.apigeeregistry.v1.DeleteArtifactRequest} DeleteArtifactRequest + */ + DeleteArtifactRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.apigeeregistry.v1.DeleteArtifactRequest) + return object; + var message = new $root.google.cloud.apigeeregistry.v1.DeleteArtifactRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteArtifactRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.apigeeregistry.v1.DeleteArtifactRequest + * @static + * @param {google.cloud.apigeeregistry.v1.DeleteArtifactRequest} message DeleteArtifactRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteArtifactRequest.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 DeleteArtifactRequest to JSON. + * @function toJSON + * @memberof google.cloud.apigeeregistry.v1.DeleteArtifactRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteArtifactRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteArtifactRequest; + })(); + + return v1; + })(); + + return apigeeregistry; + })(); + + 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; + })(); + + 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 + * @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.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.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.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; + })(); + + 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-apigeeregistry/protos/protos.json b/packages/google-cloud-apigeeregistry/protos/protos.json new file mode 100644 index 00000000000..5e1bc2b97cd --- /dev/null +++ b/packages/google-cloud-apigeeregistry/protos/protos.json @@ -0,0 +1,3489 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "apigeeregistry": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.ApigeeRegistry.V1", + "go_package": "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry", + "java_multiple_files": true, + "java_outer_classname": "RegistryServiceProto", + "java_package": "com.google.cloud.apigeeregistry.v1", + "php_namespace": "Google\\Cloud\\ApigeeRegistry\\V1", + "ruby_package": "Google::Cloud::ApigeeRegistry::V1" + }, + "nested": { + "Provisioning": { + "options": { + "(google.api.default_host)": "apigeeregistry.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateInstance": { + "requestType": "CreateInstanceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/instances", + "(google.api.http).body": "instance", + "(google.api.method_signature)": "parent,instance,instance_id", + "(google.longrunning.operation_info).response_type": "Instance", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/instances", + "body": "instance" + } + }, + { + "(google.api.method_signature)": "parent,instance,instance_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Instance", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteInstance": { + "requestType": "DeleteInstanceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/instances/*}", + "(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/*/instances/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetInstance": { + "requestType": "GetInstanceRequest", + "responseType": "Instance", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/instances/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/instances/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "CreateInstanceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "instanceId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "Instance", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteInstanceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/Instance" + } + } + } + }, + "GetInstanceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/Instance" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "target": { + "type": "string", + "id": 3 + }, + "verb": { + "type": "string", + "id": 4 + }, + "statusMessage": { + "type": "string", + "id": 5 + }, + "cancellationRequested": { + "type": "bool", + "id": 6 + }, + "apiVersion": { + "type": "string", + "id": 7 + } + } + }, + "Instance": { + "options": { + "(google.api.resource).type": "apigeeregistry.googleapis.com/Instance", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "config": { + "type": "Config", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "INACTIVE": 1, + "CREATING": 2, + "ACTIVE": 3, + "UPDATING": 4, + "DELETING": 5, + "FAILED": 6 + } + }, + "Config": { + "fields": { + "location": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cmekKeyName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "Api": { + "options": { + "(google.api.resource).type": "apigeeregistry.googleapis.com/Api", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/apis/{api}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "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" + } + }, + "availability": { + "type": "string", + "id": 6 + }, + "recommendedVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiVersion" + } + }, + "recommendedDeployment": { + "type": "string", + "id": 8, + "options": { + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiDeployment" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 9 + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 10 + } + } + }, + "ApiVersion": { + "options": { + "(google.api.resource).type": "apigeeregistry.googleapis.com/ApiVersion", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/apis/{api}/versions/{version}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "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" + } + }, + "state": { + "type": "string", + "id": 6 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7 + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 8 + } + } + }, + "ApiSpec": { + "options": { + "(google.api.resource).type": "apigeeregistry.googleapis.com/ApiSpec", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "filename": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "revisionId": { + "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" + } + }, + "revisionCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revisionUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "mimeType": { + "type": "string", + "id": 8 + }, + "sizeBytes": { + "type": "int32", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "hash": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sourceUri": { + "type": "string", + "id": 11 + }, + "contents": { + "type": "bytes", + "id": 12, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 14 + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 15 + } + } + }, + "ApiDeployment": { + "options": { + "(google.api.resource).type": "apigeeregistry.googleapis.com/ApiDeployment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "revisionId": { + "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" + } + }, + "revisionCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revisionUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiSpecRevision": { + "type": "string", + "id": 8, + "options": { + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiSpec" + } + }, + "endpointUri": { + "type": "string", + "id": 9 + }, + "externalChannelUri": { + "type": "string", + "id": 10 + }, + "intendedAudience": { + "type": "string", + "id": 11 + }, + "accessGuidance": { + "type": "string", + "id": 12 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 14 + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 15 + } + } + }, + "Artifact": { + "options": { + "(google.api.resource).type": "apigeeregistry.googleapis.com/Artifact", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "mimeType": { + "type": "string", + "id": 4 + }, + "sizeBytes": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "hash": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "contents": { + "type": "bytes", + "id": 7, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + } + } + }, + "Registry": { + "options": { + "(google.api.default_host)": "apigeeregistry.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListApis": { + "requestType": "ListApisRequest", + "responseType": "ListApisResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/apis", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/apis" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetApi": { + "requestType": "GetApiRequest", + "responseType": "Api", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/apis/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/apis/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateApi": { + "requestType": "CreateApiRequest", + "responseType": "Api", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/apis", + "(google.api.http).body": "api", + "(google.api.method_signature)": "parent,api,api_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/apis", + "body": "api" + } + }, + { + "(google.api.method_signature)": "parent,api,api_id" + } + ] + }, + "UpdateApi": { + "requestType": "UpdateApiRequest", + "responseType": "Api", + "options": { + "(google.api.http).patch": "/v1/{api.name=projects/*/locations/*/apis/*}", + "(google.api.http).body": "api", + "(google.api.method_signature)": "api,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{api.name=projects/*/locations/*/apis/*}", + "body": "api" + } + }, + { + "(google.api.method_signature)": "api,update_mask" + } + ] + }, + "DeleteApi": { + "requestType": "DeleteApiRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/apis/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/apis/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListApiVersions": { + "requestType": "ListApiVersionsRequest", + "responseType": "ListApiVersionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/apis/*}/versions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/apis/*}/versions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetApiVersion": { + "requestType": "GetApiVersionRequest", + "responseType": "ApiVersion", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/apis/*/versions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/apis/*/versions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateApiVersion": { + "requestType": "CreateApiVersionRequest", + "responseType": "ApiVersion", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/apis/*}/versions", + "(google.api.http).body": "api_version", + "(google.api.method_signature)": "parent,api_version,api_version_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/apis/*}/versions", + "body": "api_version" + } + }, + { + "(google.api.method_signature)": "parent,api_version,api_version_id" + } + ] + }, + "UpdateApiVersion": { + "requestType": "UpdateApiVersionRequest", + "responseType": "ApiVersion", + "options": { + "(google.api.http).patch": "/v1/{api_version.name=projects/*/locations/*/apis/*/versions/*}", + "(google.api.http).body": "api_version", + "(google.api.method_signature)": "api_version,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{api_version.name=projects/*/locations/*/apis/*/versions/*}", + "body": "api_version" + } + }, + { + "(google.api.method_signature)": "api_version,update_mask" + } + ] + }, + "DeleteApiVersion": { + "requestType": "DeleteApiVersionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/apis/*/versions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/apis/*/versions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListApiSpecs": { + "requestType": "ListApiSpecsRequest", + "responseType": "ListApiSpecsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetApiSpec": { + "requestType": "GetApiSpecRequest", + "responseType": "ApiSpec", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetApiSpecContents": { + "requestType": "GetApiSpecContentsRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:getContents", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:getContents" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateApiSpec": { + "requestType": "CreateApiSpecRequest", + "responseType": "ApiSpec", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs", + "(google.api.http).body": "api_spec", + "(google.api.method_signature)": "parent,api_spec,api_spec_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs", + "body": "api_spec" + } + }, + { + "(google.api.method_signature)": "parent,api_spec,api_spec_id" + } + ] + }, + "UpdateApiSpec": { + "requestType": "UpdateApiSpecRequest", + "responseType": "ApiSpec", + "options": { + "(google.api.http).patch": "/v1/{api_spec.name=projects/*/locations/*/apis/*/versions/*/specs/*}", + "(google.api.http).body": "api_spec", + "(google.api.method_signature)": "api_spec,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{api_spec.name=projects/*/locations/*/apis/*/versions/*/specs/*}", + "body": "api_spec" + } + }, + { + "(google.api.method_signature)": "api_spec,update_mask" + } + ] + }, + "DeleteApiSpec": { + "requestType": "DeleteApiSpecRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "TagApiSpecRevision": { + "requestType": "TagApiSpecRevisionRequest", + "responseType": "ApiSpec", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision", + "body": "*" + } + } + ] + }, + "ListApiSpecRevisions": { + "requestType": "ListApiSpecRevisionsRequest", + "responseType": "ListApiSpecRevisionsResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:listRevisions" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:listRevisions" + } + } + ] + }, + "RollbackApiSpec": { + "requestType": "RollbackApiSpecRequest", + "responseType": "ApiSpec", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:rollback", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:rollback", + "body": "*" + } + } + ] + }, + "DeleteApiSpecRevision": { + "requestType": "DeleteApiSpecRevisionRequest", + "responseType": "ApiSpec", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListApiDeployments": { + "requestType": "ListApiDeploymentsRequest", + "responseType": "ListApiDeploymentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/apis/*}/deployments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/apis/*}/deployments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetApiDeployment": { + "requestType": "GetApiDeploymentRequest", + "responseType": "ApiDeployment", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateApiDeployment": { + "requestType": "CreateApiDeploymentRequest", + "responseType": "ApiDeployment", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/apis/*}/deployments", + "(google.api.http).body": "api_deployment", + "(google.api.method_signature)": "parent,api_deployment,api_deployment_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/apis/*}/deployments", + "body": "api_deployment" + } + }, + { + "(google.api.method_signature)": "parent,api_deployment,api_deployment_id" + } + ] + }, + "UpdateApiDeployment": { + "requestType": "UpdateApiDeploymentRequest", + "responseType": "ApiDeployment", + "options": { + "(google.api.http).patch": "/v1/{api_deployment.name=projects/*/locations/*/apis/*/deployments/*}", + "(google.api.http).body": "api_deployment", + "(google.api.method_signature)": "api_deployment,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{api_deployment.name=projects/*/locations/*/apis/*/deployments/*}", + "body": "api_deployment" + } + }, + { + "(google.api.method_signature)": "api_deployment,update_mask" + } + ] + }, + "DeleteApiDeployment": { + "requestType": "DeleteApiDeploymentRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "TagApiDeploymentRevision": { + "requestType": "TagApiDeploymentRevisionRequest", + "responseType": "ApiDeployment", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:tagRevision", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:tagRevision", + "body": "*" + } + } + ] + }, + "ListApiDeploymentRevisions": { + "requestType": "ListApiDeploymentRevisionsRequest", + "responseType": "ListApiDeploymentRevisionsResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:listRevisions" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:listRevisions" + } + } + ] + }, + "RollbackApiDeployment": { + "requestType": "RollbackApiDeploymentRequest", + "responseType": "ApiDeployment", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:rollback", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:rollback", + "body": "*" + } + } + ] + }, + "DeleteApiDeploymentRevision": { + "requestType": "DeleteApiDeploymentRevisionRequest", + "responseType": "ApiDeployment", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListArtifacts": { + "requestType": "ListArtifactsRequest", + "responseType": "ListArtifactsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/artifacts", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/artifacts", + "additional_bindings": [ + { + "get": "/v1/{parent=projects/*/locations/*/apis/*}/artifacts" + }, + { + "get": "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts" + }, + { + "get": "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts" + }, + { + "get": "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetArtifact": { + "requestType": "GetArtifactRequest", + "responseType": "Artifact", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/artifacts/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/artifacts/*}", + "additional_bindings": [ + { + "get": "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}" + }, + { + "get": "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}" + }, + { + "get": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}" + }, + { + "get": "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetArtifactContents": { + "requestType": "GetArtifactContentsRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/artifacts/*}:getContents", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:getContents", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/artifacts/*}:getContents", + "additional_bindings": [ + { + "get": "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}:getContents" + }, + { + "get": "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getContents" + }, + { + "get": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getContents" + }, + { + "get": "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:getContents" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateArtifact": { + "requestType": "CreateArtifactRequest", + "responseType": "Artifact", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/artifacts", + "(google.api.http).body": "artifact", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts", + "(google.api.http).additional_bindings.body": "artifact", + "(google.api.method_signature)": "parent,artifact,artifact_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/artifacts", + "body": "artifact", + "additional_bindings": [ + { + "post": "/v1/{parent=projects/*/locations/*/apis/*}/artifacts", + "body": "artifact" + }, + { + "post": "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts", + "body": "artifact" + }, + { + "post": "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts", + "body": "artifact" + }, + { + "post": "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts", + "body": "artifact" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,artifact,artifact_id" + } + ] + }, + "ReplaceArtifact": { + "requestType": "ReplaceArtifactRequest", + "responseType": "Artifact", + "options": { + "(google.api.http).put": "/v1/{artifact.name=projects/*/locations/*/artifacts/*}", + "(google.api.http).body": "artifact", + "(google.api.http).additional_bindings.put": "/v1/{artifact.name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}", + "(google.api.http).additional_bindings.body": "artifact", + "(google.api.method_signature)": "artifact" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1/{artifact.name=projects/*/locations/*/artifacts/*}", + "body": "artifact", + "additional_bindings": [ + { + "put": "/v1/{artifact.name=projects/*/locations/*/apis/*/artifacts/*}", + "body": "artifact" + }, + { + "put": "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/artifacts/*}", + "body": "artifact" + }, + { + "put": "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}", + "body": "artifact" + }, + { + "put": "/v1/{artifact.name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}", + "body": "artifact" + } + ] + } + }, + { + "(google.api.method_signature)": "artifact" + } + ] + }, + "DeleteArtifact": { + "requestType": "DeleteArtifactRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/artifacts/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/artifacts/*}", + "additional_bindings": [ + { + "delete": "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}" + }, + { + "delete": "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}" + }, + { + "delete": "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}" + }, + { + "delete": "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "ListApisRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "apigeeregistry.googleapis.com/Api" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListApisResponse": { + "fields": { + "apis": { + "rule": "repeated", + "type": "Api", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetApiRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/Api" + } + } + } + }, + "CreateApiRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "apigeeregistry.googleapis.com/Api" + } + }, + "api": { + "type": "Api", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "apiId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateApiRequest": { + "fields": { + "api": { + "type": "Api", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "allowMissing": { + "type": "bool", + "id": 3 + } + } + }, + "DeleteApiRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/Api" + } + } + } + }, + "ListApiVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "apigeeregistry.googleapis.com/ApiVersion" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListApiVersionsResponse": { + "fields": { + "apiVersions": { + "rule": "repeated", + "type": "ApiVersion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetApiVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiVersion" + } + } + } + }, + "CreateApiVersionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "apigeeregistry.googleapis.com/ApiVersion" + } + }, + "apiVersion": { + "type": "ApiVersion", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "apiVersionId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateApiVersionRequest": { + "fields": { + "apiVersion": { + "type": "ApiVersion", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "allowMissing": { + "type": "bool", + "id": 3 + } + } + }, + "DeleteApiVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiVersion" + } + } + } + }, + "ListApiSpecsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "apigeeregistry.googleapis.com/ApiSpec" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListApiSpecsResponse": { + "fields": { + "apiSpecs": { + "rule": "repeated", + "type": "ApiSpec", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetApiSpecRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiSpec" + } + } + } + }, + "GetApiSpecContentsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiSpec" + } + } + } + }, + "CreateApiSpecRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "apigeeregistry.googleapis.com/ApiSpec" + } + }, + "apiSpec": { + "type": "ApiSpec", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "apiSpecId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateApiSpecRequest": { + "fields": { + "apiSpec": { + "type": "ApiSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "allowMissing": { + "type": "bool", + "id": 3 + } + } + }, + "DeleteApiSpecRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiSpec" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "TagApiSpecRevisionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiSpec" + } + }, + "tag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListApiSpecRevisionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiSpec" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListApiSpecRevisionsResponse": { + "fields": { + "apiSpecs": { + "rule": "repeated", + "type": "ApiSpec", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "RollbackApiSpecRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiSpec" + } + }, + "revisionId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteApiSpecRevisionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiSpec" + } + } + } + }, + "ListApiDeploymentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "apigeeregistry.googleapis.com/ApiDeployment" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListApiDeploymentsResponse": { + "fields": { + "apiDeployments": { + "rule": "repeated", + "type": "ApiDeployment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetApiDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiDeployment" + } + } + } + }, + "CreateApiDeploymentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "apigeeregistry.googleapis.com/ApiDeployment" + } + }, + "apiDeployment": { + "type": "ApiDeployment", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "apiDeploymentId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateApiDeploymentRequest": { + "fields": { + "apiDeployment": { + "type": "ApiDeployment", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "allowMissing": { + "type": "bool", + "id": 3 + } + } + }, + "DeleteApiDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiDeployment" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "TagApiDeploymentRevisionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiDeployment" + } + }, + "tag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListApiDeploymentRevisionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiDeployment" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListApiDeploymentRevisionsResponse": { + "fields": { + "apiDeployments": { + "rule": "repeated", + "type": "ApiDeployment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "RollbackApiDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiDeployment" + } + }, + "revisionId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteApiDeploymentRevisionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiDeployment" + } + } + } + }, + "ListArtifactsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "apigeeregistry.googleapis.com/Artifact" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListArtifactsResponse": { + "fields": { + "artifacts": { + "rule": "repeated", + "type": "Artifact", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetArtifactRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/Artifact" + } + } + } + }, + "GetArtifactContentsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/Artifact" + } + } + } + }, + "CreateArtifactRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "apigeeregistry.googleapis.com/Artifact" + } + }, + "artifact": { + "type": "Artifact", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "artifactId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ReplaceArtifactRequest": { + "fields": { + "artifact": { + "type": "Artifact", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteArtifactRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/Artifact" + } + } + } + } + } + } + } + } + } + }, + "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" + }, + "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 + } + } + }, + "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": [ + [ + 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 + } + } + } + } + }, + "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": {} + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "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-apigeeregistry/samples/generated/v1/provisioning.create_instance.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.js new file mode 100644 index 00000000000..7b57b4b4971 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.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(parent, instanceId, instance) { + // [START apigeeregistry_v1_generated_Provisioning_CreateInstance_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource of the Instance, of the form: `projects/* /locations/*` + */ + // const parent = 'abc123' + /** + * Required. Identifier to assign to the Instance. Must be unique within scope of the + * parent resource. + */ + // const instanceId = 'abc123' + /** + * Required. The Instance. + */ + // const instance = {} + + // Imports the Apigeeregistry library + const {ProvisioningClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new ProvisioningClient(); + + async function callCreateInstance() { + // Construct request + const request = { + parent, + instanceId, + instance, + }; + + // Run request + const [operation] = await apigeeregistryClient.createInstance(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateInstance(); + // [END apigeeregistry_v1_generated_Provisioning_CreateInstance_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js new file mode 100644 index 00000000000..772406e5ecb --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js @@ -0,0 +1,60 @@ +// 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 apigeeregistry_v1_generated_Provisioning_DeleteInstance_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Instance to delete. + * Format: `projects/* /locations/* /instances/*`. + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {ProvisioningClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new ProvisioningClient(); + + async function callDeleteInstance() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await apigeeregistryClient.deleteInstance(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteInstance(); + // [END apigeeregistry_v1_generated_Provisioning_DeleteInstance_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js new file mode 100644 index 00000000000..c091293b088 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js @@ -0,0 +1,59 @@ +// 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 apigeeregistry_v1_generated_Provisioning_GetInstance_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Instance to retrieve. + * Format: `projects/* /locations/* /instances/*`. + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {ProvisioningClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new ProvisioningClient(); + + async function callGetInstance() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.getInstance(request); + console.log(response); + } + + callGetInstance(); + // [END apigeeregistry_v1_generated_Provisioning_GetInstance_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.js new file mode 100644 index 00000000000..1ee1773b339 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.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(parent, api, apiId) { + // [START apigeeregistry_v1_generated_Registry_CreateApi_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of APIs. + * Format: projects/* /locations/* + */ + // const parent = 'abc123' + /** + * Required. The API to create. + */ + // const api = {} + /** + * Required. The ID to use for the api, which will become the final component of + * the api's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * Following AIP-162, IDs must not have the form of a UUID. + */ + // const apiId = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callCreateApi() { + // Construct request + const request = { + parent, + api, + apiId, + }; + + // Run request + const response = await apigeeregistryClient.createApi(request); + console.log(response); + } + + callCreateApi(); + // [END apigeeregistry_v1_generated_Registry_CreateApi_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js new file mode 100644 index 00000000000..e60fcfa553a --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.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(parent, apiDeployment, apiDeploymentId) { + // [START apigeeregistry_v1_generated_Registry_CreateApiDeployment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of deployments. + * Format: projects/* /locations/* /apis/* + */ + // const parent = 'abc123' + /** + * Required. The deployment to create. + */ + // const apiDeployment = {} + /** + * Required. The ID to use for the deployment, which will become the final component of + * the deployment's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * Following AIP-162, IDs must not have the form of a UUID. + */ + // const apiDeploymentId = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callCreateApiDeployment() { + // Construct request + const request = { + parent, + apiDeployment, + apiDeploymentId, + }; + + // Run request + const response = await apigeeregistryClient.createApiDeployment(request); + console.log(response); + } + + callCreateApiDeployment(); + // [END apigeeregistry_v1_generated_Registry_CreateApiDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.js new file mode 100644 index 00000000000..5e11372ee87 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.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(parent, apiSpec, apiSpecId) { + // [START apigeeregistry_v1_generated_Registry_CreateApiSpec_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of specs. + * Format: projects/* /locations/* /apis/* /versions/* + */ + // const parent = 'abc123' + /** + * Required. The spec to create. + */ + // const apiSpec = {} + /** + * Required. The ID to use for the spec, which will become the final component of + * the spec's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * Following AIP-162, IDs must not have the form of a UUID. + */ + // const apiSpecId = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callCreateApiSpec() { + // Construct request + const request = { + parent, + apiSpec, + apiSpecId, + }; + + // Run request + const response = await apigeeregistryClient.createApiSpec(request); + console.log(response); + } + + callCreateApiSpec(); + // [END apigeeregistry_v1_generated_Registry_CreateApiSpec_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.js new file mode 100644 index 00000000000..df5fa6c7339 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.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(parent, apiVersion, apiVersionId) { + // [START apigeeregistry_v1_generated_Registry_CreateApiVersion_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of versions. + * Format: projects/* /locations/* /apis/* + */ + // const parent = 'abc123' + /** + * Required. The version to create. + */ + // const apiVersion = {} + /** + * Required. The ID to use for the version, which will become the final component of + * the version's resource name. + * This value should be 1-63 characters, and valid characters + * are /[a-z][0-9]-/. + * Following AIP-162, IDs must not have the form of a UUID. + */ + // const apiVersionId = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callCreateApiVersion() { + // Construct request + const request = { + parent, + apiVersion, + apiVersionId, + }; + + // Run request + const response = await apigeeregistryClient.createApiVersion(request); + console.log(response); + } + + callCreateApiVersion(); + // [END apigeeregistry_v1_generated_Registry_CreateApiVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.js new file mode 100644 index 00000000000..9c13c5c37b0 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.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(parent, artifact, artifactId) { + // [START apigeeregistry_v1_generated_Registry_CreateArtifact_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of artifacts. + * Format: {parent} + */ + // const parent = 'abc123' + /** + * Required. The artifact to create. + */ + // const artifact = {} + /** + * Required. The ID to use for the artifact, which will become the final component of + * the artifact's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * Following AIP-162, IDs must not have the form of a UUID. + */ + // const artifactId = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callCreateArtifact() { + // Construct request + const request = { + parent, + artifact, + artifactId, + }; + + // Run request + const response = await apigeeregistryClient.createArtifact(request); + console.log(response); + } + + callCreateArtifact(); + // [END apigeeregistry_v1_generated_Registry_CreateArtifact_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js new file mode 100644 index 00000000000..ceb657e72b5 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js @@ -0,0 +1,59 @@ +// 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 apigeeregistry_v1_generated_Registry_DeleteApi_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the API to delete. + * Format: projects/* /locations/* /apis/* + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callDeleteApi() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.deleteApi(request); + console.log(response); + } + + callDeleteApi(); + // [END apigeeregistry_v1_generated_Registry_DeleteApi_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js new file mode 100644 index 00000000000..9dcf52efda0 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js @@ -0,0 +1,64 @@ +// 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 apigeeregistry_v1_generated_Registry_DeleteApiDeployment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the deployment to delete. + * Format: projects/* /locations/* /apis/* /deployments/* + */ + // const name = 'abc123' + /** + * If set to true, any child resources will also be deleted. + * (Otherwise, the request will only work if there are no child resources.) + */ + // const force = true + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callDeleteApiDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.deleteApiDeployment(request); + console.log(response); + } + + callDeleteApiDeployment(); + // [END apigeeregistry_v1_generated_Registry_DeleteApiDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js new file mode 100644 index 00000000000..4c0ddabef79 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js @@ -0,0 +1,61 @@ +// 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 apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the deployment revision to be deleted, + * with a revision ID explicitly included. + * Example: + * projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8 + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callDeleteApiDeploymentRevision() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.deleteApiDeploymentRevision(request); + console.log(response); + } + + callDeleteApiDeploymentRevision(); + // [END apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js new file mode 100644 index 00000000000..1275c623f64 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js @@ -0,0 +1,64 @@ +// 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 apigeeregistry_v1_generated_Registry_DeleteApiSpec_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the spec to delete. + * Format: projects/* /locations/* /apis/* /versions/* /specs/* + */ + // const name = 'abc123' + /** + * If set to true, any child resources will also be deleted. + * (Otherwise, the request will only work if there are no child resources.) + */ + // const force = true + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callDeleteApiSpec() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.deleteApiSpec(request); + console.log(response); + } + + callDeleteApiSpec(); + // [END apigeeregistry_v1_generated_Registry_DeleteApiSpec_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js new file mode 100644 index 00000000000..a9852641b18 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js @@ -0,0 +1,61 @@ +// 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 apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the spec revision to be deleted, + * with a revision ID explicitly included. + * Example: + * projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8 + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callDeleteApiSpecRevision() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.deleteApiSpecRevision(request); + console.log(response); + } + + callDeleteApiSpecRevision(); + // [END apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js new file mode 100644 index 00000000000..104daec73b3 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js @@ -0,0 +1,59 @@ +// 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 apigeeregistry_v1_generated_Registry_DeleteApiVersion_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the version to delete. + * Format: projects/* /locations/* /apis/* /versions/* + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callDeleteApiVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.deleteApiVersion(request); + console.log(response); + } + + callDeleteApiVersion(); + // [END apigeeregistry_v1_generated_Registry_DeleteApiVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js new file mode 100644 index 00000000000..bb06c41b1dd --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js @@ -0,0 +1,59 @@ +// 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 apigeeregistry_v1_generated_Registry_DeleteArtifact_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the artifact to delete. + * Format: {parent}/artifacts/* + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callDeleteArtifact() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.deleteArtifact(request); + console.log(response); + } + + callDeleteArtifact(); + // [END apigeeregistry_v1_generated_Registry_DeleteArtifact_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js new file mode 100644 index 00000000000..bad83b5d1eb --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js @@ -0,0 +1,59 @@ +// 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 apigeeregistry_v1_generated_Registry_GetApi_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the API to retrieve. + * Format: projects/* /locations/* /apis/* + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callGetApi() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.getApi(request); + console.log(response); + } + + callGetApi(); + // [END apigeeregistry_v1_generated_Registry_GetApi_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js new file mode 100644 index 00000000000..7516ef71923 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js @@ -0,0 +1,59 @@ +// 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 apigeeregistry_v1_generated_Registry_GetApiDeployment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the deployment to retrieve. + * Format: projects/* /locations/* /apis/* /deployments/* + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callGetApiDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.getApiDeployment(request); + console.log(response); + } + + callGetApiDeployment(); + // [END apigeeregistry_v1_generated_Registry_GetApiDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js new file mode 100644 index 00000000000..be8f42acc4f --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js @@ -0,0 +1,59 @@ +// 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 apigeeregistry_v1_generated_Registry_GetApiSpec_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the spec to retrieve. + * Format: projects/* /locations/* /apis/* /versions/* /specs/* + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callGetApiSpec() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.getApiSpec(request); + console.log(response); + } + + callGetApiSpec(); + // [END apigeeregistry_v1_generated_Registry_GetApiSpec_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js new file mode 100644 index 00000000000..d20e06d6e7e --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js @@ -0,0 +1,59 @@ +// 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 apigeeregistry_v1_generated_Registry_GetApiSpecContents_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the spec whose contents should be retrieved. + * Format: projects/* /locations/* /apis/* /versions/* /specs/* + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callGetApiSpecContents() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.getApiSpecContents(request); + console.log(response); + } + + callGetApiSpecContents(); + // [END apigeeregistry_v1_generated_Registry_GetApiSpecContents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js new file mode 100644 index 00000000000..60f933b4910 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js @@ -0,0 +1,59 @@ +// 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 apigeeregistry_v1_generated_Registry_GetApiVersion_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the version to retrieve. + * Format: projects/* /locations/* /apis/* /versions/* + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callGetApiVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.getApiVersion(request); + console.log(response); + } + + callGetApiVersion(); + // [END apigeeregistry_v1_generated_Registry_GetApiVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js new file mode 100644 index 00000000000..ba6fb79c949 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js @@ -0,0 +1,59 @@ +// 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 apigeeregistry_v1_generated_Registry_GetArtifact_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the artifact to retrieve. + * Format: {parent}/artifacts/* + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callGetArtifact() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.getArtifact(request); + console.log(response); + } + + callGetArtifact(); + // [END apigeeregistry_v1_generated_Registry_GetArtifact_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js new file mode 100644 index 00000000000..34599910730 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js @@ -0,0 +1,59 @@ +// 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 apigeeregistry_v1_generated_Registry_GetArtifactContents_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the artifact whose contents should be retrieved. + * Format: {parent}/artifacts/* + */ + // const name = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callGetArtifactContents() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await apigeeregistryClient.getArtifactContents(request); + console.log(response); + } + + callGetArtifactContents(); + // [END apigeeregistry_v1_generated_Registry_GetArtifactContents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js new file mode 100644 index 00000000000..6c424719c3a --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js @@ -0,0 +1,69 @@ +// 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 apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the deployment to list revisions for. + */ + // const name = 'abc123' + /** + * The maximum number of revisions to return per page. + */ + // const pageSize = 1234 + /** + * The page token, received from a previous ListApiDeploymentRevisions call. + * Provide this to retrieve the subsequent page. + */ + // const pageToken = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callListApiDeploymentRevisions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await apigeeregistryClient.listApiDeploymentRevisionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListApiDeploymentRevisions(); + // [END apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js new file mode 100644 index 00000000000..d0965126c71 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js @@ -0,0 +1,80 @@ +// 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 apigeeregistry_v1_generated_Registry_ListApiDeployments_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of deployments. + * Format: projects/* /locations/* /apis/* + */ + // const parent = 'abc123' + /** + * The maximum number of deployments to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListApiDeployments` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListApiDeployments` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + */ + // const filter = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callListApiDeployments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await apigeeregistryClient.listApiDeploymentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListApiDeployments(); + // [END apigeeregistry_v1_generated_Registry_ListApiDeployments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js new file mode 100644 index 00000000000..dd1aed4a644 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js @@ -0,0 +1,69 @@ +// 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 apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the spec to list revisions for. + */ + // const name = 'abc123' + /** + * The maximum number of revisions to return per page. + */ + // const pageSize = 1234 + /** + * The page token, received from a previous ListApiSpecRevisions call. + * Provide this to retrieve the subsequent page. + */ + // const pageToken = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callListApiSpecRevisions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await apigeeregistryClient.listApiSpecRevisionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListApiSpecRevisions(); + // [END apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js new file mode 100644 index 00000000000..9963e1e747a --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js @@ -0,0 +1,80 @@ +// 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 apigeeregistry_v1_generated_Registry_ListApiSpecs_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of specs. + * Format: projects/* /locations/* /apis/* /versions/* + */ + // const parent = 'abc123' + /** + * The maximum number of specs to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListApiSpecs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListApiSpecs` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields except contents. + */ + // const filter = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callListApiSpecs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await apigeeregistryClient.listApiSpecsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListApiSpecs(); + // [END apigeeregistry_v1_generated_Registry_ListApiSpecs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js new file mode 100644 index 00000000000..680d6fed135 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js @@ -0,0 +1,80 @@ +// 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 apigeeregistry_v1_generated_Registry_ListApiVersions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of versions. + * Format: projects/* /locations/* /apis/* + */ + // const parent = 'abc123' + /** + * The maximum number of versions to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListApiVersions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListApiVersions` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + */ + // const filter = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callListApiVersions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await apigeeregistryClient.listApiVersionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListApiVersions(); + // [END apigeeregistry_v1_generated_Registry_ListApiVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js new file mode 100644 index 00000000000..f21659924fc --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js @@ -0,0 +1,80 @@ +// 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 apigeeregistry_v1_generated_Registry_ListApis_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of APIs. + * Format: projects/* /locations/* + */ + // const parent = 'abc123' + /** + * The maximum number of APIs to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListApis` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListApis` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + */ + // const filter = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callListApis() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await apigeeregistryClient.listApisAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListApis(); + // [END apigeeregistry_v1_generated_Registry_ListApis_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js new file mode 100644 index 00000000000..b23c895432b --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js @@ -0,0 +1,80 @@ +// 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 apigeeregistry_v1_generated_Registry_ListArtifacts_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of artifacts. + * Format: {parent} + */ + // const parent = 'abc123' + /** + * The maximum number of artifacts to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListArtifacts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListArtifacts` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields except contents. + */ + // const filter = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callListArtifacts() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await apigeeregistryClient.listArtifactsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListArtifacts(); + // [END apigeeregistry_v1_generated_Registry_ListArtifacts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js new file mode 100644 index 00000000000..0ea6d96fdf2 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js @@ -0,0 +1,60 @@ +// 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(artifact) { + // [START apigeeregistry_v1_generated_Registry_ReplaceArtifact_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The artifact to replace. + * The `name` field is used to identify the artifact to replace. + * Format: {parent}/artifacts/* + */ + // const artifact = {} + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callReplaceArtifact() { + // Construct request + const request = { + artifact, + }; + + // Run request + const response = await apigeeregistryClient.replaceArtifact(request); + console.log(response); + } + + callReplaceArtifact(); + // [END apigeeregistry_v1_generated_Registry_ReplaceArtifact_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js new file mode 100644 index 00000000000..adb8d2df6d9 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js @@ -0,0 +1,65 @@ +// 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, revisionId) { + // [START apigeeregistry_v1_generated_Registry_RollbackApiDeployment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The deployment being rolled back. + */ + // const name = 'abc123' + /** + * Required. The revision ID to roll back to. + * It must be a revision of the same deployment. + * Example: c7cfa2a8 + */ + // const revisionId = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callRollbackApiDeployment() { + // Construct request + const request = { + name, + revisionId, + }; + + // Run request + const response = await apigeeregistryClient.rollbackApiDeployment(request); + console.log(response); + } + + callRollbackApiDeployment(); + // [END apigeeregistry_v1_generated_Registry_RollbackApiDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js new file mode 100644 index 00000000000..3df461dc2b4 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js @@ -0,0 +1,65 @@ +// 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, revisionId) { + // [START apigeeregistry_v1_generated_Registry_RollbackApiSpec_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The spec being rolled back. + */ + // const name = 'abc123' + /** + * Required. The revision ID to roll back to. + * It must be a revision of the same spec. + * Example: c7cfa2a8 + */ + // const revisionId = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callRollbackApiSpec() { + // Construct request + const request = { + name, + revisionId, + }; + + // Run request + const response = await apigeeregistryClient.rollbackApiSpec(request); + console.log(response); + } + + callRollbackApiSpec(); + // [END apigeeregistry_v1_generated_Registry_RollbackApiSpec_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js new file mode 100644 index 00000000000..71147d2ac3c --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js @@ -0,0 +1,64 @@ +// 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, tag) { + // [START apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the deployment to be tagged, including the revision ID. + */ + // const name = 'abc123' + /** + * Required. The tag to apply. + * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + */ + // const tag = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callTagApiDeploymentRevision() { + // Construct request + const request = { + name, + tag, + }; + + // Run request + const response = await apigeeregistryClient.tagApiDeploymentRevision(request); + console.log(response); + } + + callTagApiDeploymentRevision(); + // [END apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js new file mode 100644 index 00000000000..da9a6d324a0 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js @@ -0,0 +1,64 @@ +// 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, tag) { + // [START apigeeregistry_v1_generated_Registry_TagApiSpecRevision_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the spec to be tagged, including the revision ID. + */ + // const name = 'abc123' + /** + * Required. The tag to apply. + * The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. + */ + // const tag = 'abc123' + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callTagApiSpecRevision() { + // Construct request + const request = { + name, + tag, + }; + + // Run request + const response = await apigeeregistryClient.tagApiSpecRevision(request); + console.log(response); + } + + callTagApiSpecRevision(); + // [END apigeeregistry_v1_generated_Registry_TagApiSpecRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js new file mode 100644 index 00000000000..7579e099787 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js @@ -0,0 +1,72 @@ +// 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(api) { + // [START apigeeregistry_v1_generated_Registry_UpdateApi_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The API to update. + * The `name` field is used to identify the API to update. + * Format: projects/* /locations/* /apis/* + */ + // const api = {} + /** + * The list of fields to be updated. If omitted, all fields are updated that + * are set in the request message (fields set to default values are ignored). + * If a "*" is specified, all fields are updated, including fields that are + * unspecified/default in the request. + */ + // const updateMask = {} + /** + * If set to true, and the api is not found, a new api will be created. + * In this situation, `update_mask` is ignored. + */ + // const allowMissing = true + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callUpdateApi() { + // Construct request + const request = { + api, + }; + + // Run request + const response = await apigeeregistryClient.updateApi(request); + console.log(response); + } + + callUpdateApi(); + // [END apigeeregistry_v1_generated_Registry_UpdateApi_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js new file mode 100644 index 00000000000..647685f7d10 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js @@ -0,0 +1,72 @@ +// 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(apiDeployment) { + // [START apigeeregistry_v1_generated_Registry_UpdateApiDeployment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The deployment to update. + * The `name` field is used to identify the deployment to update. + * Format: projects/* /locations/* /apis/* /deployments/* + */ + // const apiDeployment = {} + /** + * The list of fields to be updated. If omitted, all fields are updated that + * are set in the request message (fields set to default values are ignored). + * If a "*" is specified, all fields are updated, including fields that are + * unspecified/default in the request. + */ + // const updateMask = {} + /** + * If set to true, and the deployment is not found, a new deployment will be + * created. In this situation, `update_mask` is ignored. + */ + // const allowMissing = true + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callUpdateApiDeployment() { + // Construct request + const request = { + apiDeployment, + }; + + // Run request + const response = await apigeeregistryClient.updateApiDeployment(request); + console.log(response); + } + + callUpdateApiDeployment(); + // [END apigeeregistry_v1_generated_Registry_UpdateApiDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js new file mode 100644 index 00000000000..aebc5264de9 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js @@ -0,0 +1,72 @@ +// 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(apiSpec) { + // [START apigeeregistry_v1_generated_Registry_UpdateApiSpec_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The spec to update. + * The `name` field is used to identify the spec to update. + * Format: projects/* /locations/* /apis/* /versions/* /specs/* + */ + // const apiSpec = {} + /** + * The list of fields to be updated. If omitted, all fields are updated that + * are set in the request message (fields set to default values are ignored). + * If a "*" is specified, all fields are updated, including fields that are + * unspecified/default in the request. + */ + // const updateMask = {} + /** + * If set to true, and the spec is not found, a new spec will be created. + * In this situation, `update_mask` is ignored. + */ + // const allowMissing = true + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callUpdateApiSpec() { + // Construct request + const request = { + apiSpec, + }; + + // Run request + const response = await apigeeregistryClient.updateApiSpec(request); + console.log(response); + } + + callUpdateApiSpec(); + // [END apigeeregistry_v1_generated_Registry_UpdateApiSpec_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js new file mode 100644 index 00000000000..07d2c3938f0 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js @@ -0,0 +1,72 @@ +// 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(apiVersion) { + // [START apigeeregistry_v1_generated_Registry_UpdateApiVersion_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The version to update. + * The `name` field is used to identify the version to update. + * Format: projects/* /locations/* /apis/* /versions/* + */ + // const apiVersion = {} + /** + * The list of fields to be updated. If omitted, all fields are updated that + * are set in the request message (fields set to default values are ignored). + * If a "*" is specified, all fields are updated, including fields that are + * unspecified/default in the request. + */ + // const updateMask = {} + /** + * If set to true, and the version is not found, a new version will be + * created. In this situation, `update_mask` is ignored. + */ + // const allowMissing = true + + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); + + async function callUpdateApiVersion() { + // Construct request + const request = { + apiVersion, + }; + + // Run request + const response = await apigeeregistryClient.updateApiVersion(request); + console.log(response); + } + + callUpdateApiVersion(); + // [END apigeeregistry_v1_generated_Registry_UpdateApiVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json new file mode 100644 index 00000000000..c053b6596e2 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json @@ -0,0 +1,1715 @@ +{ + "clientLibrary": { + "name": "nodejs-apigeeregistry", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.apigeeregistry.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "apigeeregistry_v1_generated_Provisioning_CreateInstance_async", + "title": "Provisioning createInstance Sample", + "origin": "API_DEFINITION", + "description": " Provisions instance resources for the Registry.", + "canonical": true, + "file": "provisioning.create_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.CreateInstance", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "instance_id", + "type": "TYPE_STRING" + }, + { + "name": "instance", + "type": ".google.cloud.apigeeregistry.v1.Instance" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ProvisioningClient", + "fullName": "google.cloud.apigeeregistry.v1.ProvisioningClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.CreateInstance", + "service": { + "shortName": "Provisioning", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Provisioning_DeleteInstance_async", + "title": "Provisioning deleteInstance Sample", + "origin": "API_DEFINITION", + "description": " Deletes the Registry instance.", + "canonical": true, + "file": "provisioning.delete_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.DeleteInstance", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ProvisioningClient", + "fullName": "google.cloud.apigeeregistry.v1.ProvisioningClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.DeleteInstance", + "service": { + "shortName": "Provisioning", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Provisioning_GetInstance_async", + "title": "Provisioning getInstance Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Instance.", + "canonical": true, + "file": "provisioning.get_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.GetInstance", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Instance", + "client": { + "shortName": "ProvisioningClient", + "fullName": "google.cloud.apigeeregistry.v1.ProvisioningClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.GetInstance", + "service": { + "shortName": "Provisioning", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApis_async", + "title": "Provisioning listApis Sample", + "origin": "API_DEFINITION", + "description": " ListApis returns matching APIs.", + "canonical": true, + "file": "registry.list_apis.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApis", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApis", + "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.apigeeregistry.v1.ListApisResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApis", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApis", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetApi_async", + "title": "Provisioning getApi Sample", + "origin": "API_DEFINITION", + "description": " GetApi returns a specified API.", + "canonical": true, + "file": "registry.get_api.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApi", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Api", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApi", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApi_async", + "title": "Provisioning createApi Sample", + "origin": "API_DEFINITION", + "description": " CreateApi creates a specified API.", + "canonical": true, + "file": "registry.create_api.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApi", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "api", + "type": ".google.cloud.apigeeregistry.v1.Api" + }, + { + "name": "api_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Api", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "CreateApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApi", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApi_async", + "title": "Provisioning updateApi Sample", + "origin": "API_DEFINITION", + "description": " UpdateApi can be used to modify a specified API.", + "canonical": true, + "file": "registry.update_api.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApi", + "async": true, + "parameters": [ + { + "name": "api", + "type": ".google.cloud.apigeeregistry.v1.Api" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Api", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "UpdateApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApi", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApi_async", + "title": "Provisioning deleteApi Sample", + "origin": "API_DEFINITION", + "description": " DeleteApi removes a specified API and all of the resources that it owns.", + "canonical": true, + "file": "registry.delete_api.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApi", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApi", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiVersions_async", + "title": "Provisioning listApiVersions Sample", + "origin": "API_DEFINITION", + "description": " ListApiVersions returns matching versions.", + "canonical": true, + "file": "registry.list_api_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApiVersions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiVersions", + "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.apigeeregistry.v1.ListApiVersionsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApiVersions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiVersions", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiVersion_async", + "title": "Provisioning getApiVersion Sample", + "origin": "API_DEFINITION", + "description": " GetApiVersion returns a specified version.", + "canonical": true, + "file": "registry.get_api_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiVersion", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiVersion", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiVersion_async", + "title": "Provisioning createApiVersion Sample", + "origin": "API_DEFINITION", + "description": " CreateApiVersion creates a specified version.", + "canonical": true, + "file": "registry.create_api_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiVersion", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "api_version", + "type": ".google.cloud.apigeeregistry.v1.ApiVersion" + }, + { + "name": "api_version_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiVersion", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "CreateApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiVersion", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiVersion_async", + "title": "Provisioning updateApiVersion Sample", + "origin": "API_DEFINITION", + "description": " UpdateApiVersion can be used to modify a specified version.", + "canonical": true, + "file": "registry.update_api_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiVersion", + "async": true, + "parameters": [ + { + "name": "api_version", + "type": ".google.cloud.apigeeregistry.v1.ApiVersion" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiVersion", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "UpdateApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiVersion", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiVersion_async", + "title": "Provisioning deleteApiVersion Sample", + "origin": "API_DEFINITION", + "description": " DeleteApiVersion removes a specified version and all of the resources that it owns.", + "canonical": true, + "file": "registry.delete_api_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiVersion", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiSpecs_async", + "title": "Provisioning listApiSpecs Sample", + "origin": "API_DEFINITION", + "description": " ListApiSpecs returns matching specs.", + "canonical": true, + "file": "registry.list_api_specs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApiSpecs", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecs", + "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.apigeeregistry.v1.ListApiSpecsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApiSpecs", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecs", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiSpec_async", + "title": "Provisioning getApiSpec Sample", + "origin": "API_DEFINITION", + "description": " GetApiSpec returns a specified spec.", + "canonical": true, + "file": "registry.get_api_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpec", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpec", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiSpecContents_async", + "title": "Provisioning getApiSpecContents Sample", + "origin": "API_DEFINITION", + "description": " GetApiSpecContents returns the contents of a specified spec. If specs are stored with GZip compression, the default behavior is to return the spec uncompressed (the mime_type response field indicates the exact format returned).", + "canonical": true, + "file": "registry.get_api_spec_contents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetApiSpecContents", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpecContents", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetApiSpecContents", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpecContents", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiSpec_async", + "title": "Provisioning createApiSpec Sample", + "origin": "API_DEFINITION", + "description": " CreateApiSpec creates a specified spec.", + "canonical": true, + "file": "registry.create_api_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiSpec", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "api_spec", + "type": ".google.cloud.apigeeregistry.v1.ApiSpec" + }, + { + "name": "api_spec_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "CreateApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiSpec", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiSpec_async", + "title": "Provisioning updateApiSpec Sample", + "origin": "API_DEFINITION", + "description": " UpdateApiSpec can be used to modify a specified spec.", + "canonical": true, + "file": "registry.update_api_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiSpec", + "async": true, + "parameters": [ + { + "name": "api_spec", + "type": ".google.cloud.apigeeregistry.v1.ApiSpec" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "UpdateApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiSpec", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiSpec_async", + "title": "Provisioning deleteApiSpec Sample", + "origin": "API_DEFINITION", + "description": " DeleteApiSpec removes a specified spec, all revisions, and all child resources (e.g. artifacts).", + "canonical": true, + "file": "registry.delete_api_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpec", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpec", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_TagApiSpecRevision_async", + "title": "Provisioning tagApiSpecRevision Sample", + "origin": "API_DEFINITION", + "description": " TagApiSpecRevision adds a tag to a specified revision of a spec.", + "canonical": true, + "file": "registry.tag_api_spec_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TagApiSpecRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiSpecRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "tag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "TagApiSpecRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiSpecRevision", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_async", + "title": "Provisioning listApiSpecRevisions Sample", + "origin": "API_DEFINITION", + "description": " ListApiSpecRevisions lists all revisions of a spec. Revisions are returned in descending order of revision creation time.", + "canonical": true, + "file": "registry.list_api_spec_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApiSpecRevisions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecRevisions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApiSpecRevisions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecRevisions", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_RollbackApiSpec_async", + "title": "Provisioning rollbackApiSpec Sample", + "origin": "API_DEFINITION", + "description": " RollbackApiSpec sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.", + "canonical": true, + "file": "registry.rollback_api_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RollbackApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiSpec", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "revision_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "RollbackApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiSpec", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_async", + "title": "Provisioning deleteApiSpecRevision Sample", + "origin": "API_DEFINITION", + "description": " DeleteApiSpecRevision deletes a revision of a spec.", + "canonical": true, + "file": "registry.delete_api_spec_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApiSpecRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApiSpecRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecRevision", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiDeployments_async", + "title": "Provisioning listApiDeployments Sample", + "origin": "API_DEFINITION", + "description": " ListApiDeployments returns matching deployments.", + "canonical": true, + "file": "registry.list_api_deployments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApiDeployments", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeployments", + "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.apigeeregistry.v1.ListApiDeploymentsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApiDeployments", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeployments", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiDeployment_async", + "title": "Provisioning getApiDeployment Sample", + "origin": "API_DEFINITION", + "description": " GetApiDeployment returns a specified deployment.", + "canonical": true, + "file": "registry.get_api_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiDeployment", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiDeployment_async", + "title": "Provisioning createApiDeployment Sample", + "origin": "API_DEFINITION", + "description": " CreateApiDeployment creates a specified deployment.", + "canonical": true, + "file": "registry.create_api_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiDeployment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "api_deployment", + "type": ".google.cloud.apigeeregistry.v1.ApiDeployment" + }, + { + "name": "api_deployment_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "CreateApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiDeployment", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiDeployment_async", + "title": "Provisioning updateApiDeployment Sample", + "origin": "API_DEFINITION", + "description": " UpdateApiDeployment can be used to modify a specified deployment.", + "canonical": true, + "file": "registry.update_api_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiDeployment", + "async": true, + "parameters": [ + { + "name": "api_deployment", + "type": ".google.cloud.apigeeregistry.v1.ApiDeployment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "UpdateApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiDeployment", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiDeployment_async", + "title": "Provisioning deleteApiDeployment Sample", + "origin": "API_DEFINITION", + "description": " DeleteApiDeployment removes a specified deployment, all revisions, and all child resources (e.g. artifacts).", + "canonical": true, + "file": "registry.delete_api_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeployment", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_async", + "title": "Provisioning tagApiDeploymentRevision Sample", + "origin": "API_DEFINITION", + "description": " TagApiDeploymentRevision adds a tag to a specified revision of a deployment.", + "canonical": true, + "file": "registry.tag_api_deployment_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TagApiDeploymentRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiDeploymentRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "tag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "TagApiDeploymentRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiDeploymentRevision", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_async", + "title": "Provisioning listApiDeploymentRevisions Sample", + "origin": "API_DEFINITION", + "description": " ListApiDeploymentRevisions lists all revisions of a deployment. Revisions are returned in descending order of revision creation time.", + "canonical": true, + "file": "registry.list_api_deployment_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApiDeploymentRevisions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentRevisions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApiDeploymentRevisions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentRevisions", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_RollbackApiDeployment_async", + "title": "Provisioning rollbackApiDeployment Sample", + "origin": "API_DEFINITION", + "description": " RollbackApiDeployment sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.", + "canonical": true, + "file": "registry.rollback_api_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RollbackApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "revision_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "RollbackApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiDeployment", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_async", + "title": "Provisioning deleteApiDeploymentRevision Sample", + "origin": "API_DEFINITION", + "description": " DeleteApiDeploymentRevision deletes a revision of a deployment.", + "canonical": true, + "file": "registry.delete_api_deployment_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApiDeploymentRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApiDeploymentRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentRevision", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListArtifacts_async", + "title": "Provisioning listArtifacts Sample", + "origin": "API_DEFINITION", + "description": " ListArtifacts returns matching artifacts.", + "canonical": true, + "file": "registry.list_artifacts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListArtifacts", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListArtifacts", + "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.apigeeregistry.v1.ListArtifactsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListArtifacts", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListArtifacts", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetArtifact_async", + "title": "Provisioning getArtifact Sample", + "origin": "API_DEFINITION", + "description": " GetArtifact returns a specified artifact.", + "canonical": true, + "file": "registry.get_artifact.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifact", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Artifact", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifact", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetArtifactContents_async", + "title": "Provisioning getArtifactContents Sample", + "origin": "API_DEFINITION", + "description": " GetArtifactContents returns the contents of a specified artifact. If artifacts are stored with GZip compression, the default behavior is to return the artifact uncompressed (the mime_type response field indicates the exact format returned).", + "canonical": true, + "file": "registry.get_artifact_contents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetArtifactContents", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifactContents", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetArtifactContents", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifactContents", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_CreateArtifact_async", + "title": "Provisioning createArtifact Sample", + "origin": "API_DEFINITION", + "description": " CreateArtifact creates a specified artifact.", + "canonical": true, + "file": "registry.create_artifact.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateArtifact", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "artifact", + "type": ".google.cloud.apigeeregistry.v1.Artifact" + }, + { + "name": "artifact_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Artifact", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "CreateArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateArtifact", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ReplaceArtifact_async", + "title": "Provisioning replaceArtifact Sample", + "origin": "API_DEFINITION", + "description": " ReplaceArtifact can be used to replace a specified artifact.", + "canonical": true, + "file": "registry.replace_artifact.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReplaceArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ReplaceArtifact", + "async": true, + "parameters": [ + { + "name": "artifact", + "type": ".google.cloud.apigeeregistry.v1.Artifact" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Artifact", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ReplaceArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ReplaceArtifact", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteArtifact_async", + "title": "Provisioning deleteArtifact Sample", + "origin": "API_DEFINITION", + "description": " DeleteArtifact removes a specified artifact.", + "canonical": true, + "file": "registry.delete_artifact.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteArtifact", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteArtifact", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-apigeeregistry/samples/package.json b/packages/google-cloud-apigeeregistry/samples/package.json new file mode 100644 index 00000000000..56371599739 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-apigee-registry", + "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/apigee-registry": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-apigeeregistry/samples/quickstart.js b/packages/google-cloud-apigeeregistry/samples/quickstart.js new file mode 100644 index 00000000000..705276d6910 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/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_apigee_registry_quickstart] + // Imports the Google Cloud client library + + // remove this line after package is released + // eslint-disable-next-line node/no-missing-require + const {RegistryClient} = require('@google-cloud/apigee-registry'); + + // 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 {RegistryClient}(); + + //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_apigee_registry_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-apigeeregistry/samples/test/quickstart.js b/packages/google-cloud-apigeeregistry/samples/test/quickstart.js new file mode 100644 index 00000000000..40c125cd433 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/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 {RegistryClient} = require('@google-cloud/apigee-registry'); +// 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 {RegistryClient}(); + +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-apigeeregistry/src/index.ts b/packages/google-cloud-apigeeregistry/src/index.ts new file mode 100644 index 00000000000..bfce90b009e --- /dev/null +++ b/packages/google-cloud-apigeeregistry/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 ProvisioningClient = v1.ProvisioningClient; +type ProvisioningClient = v1.ProvisioningClient; +const RegistryClient = v1.RegistryClient; +type RegistryClient = v1.RegistryClient; + +export {v1, ProvisioningClient, RegistryClient}; +export default {v1, ProvisioningClient, RegistryClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-apigeeregistry/src/v1/gapic_metadata.json b/packages/google-cloud-apigeeregistry/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..2a54281498a --- /dev/null +++ b/packages/google-cloud-apigeeregistry/src/v1/gapic_metadata.json @@ -0,0 +1,445 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.apigeeregistry.v1", + "libraryPackage": "@google-cloud/apigeeregistry", + "services": { + "Provisioning": { + "clients": { + "grpc": { + "libraryClient": "ProvisioningClient", + "rpcs": { + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ProvisioningClient", + "rpcs": { + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + } + } + } + } + }, + "Registry": { + "clients": { + "grpc": { + "libraryClient": "RegistryClient", + "rpcs": { + "GetApi": { + "methods": [ + "getApi" + ] + }, + "CreateApi": { + "methods": [ + "createApi" + ] + }, + "UpdateApi": { + "methods": [ + "updateApi" + ] + }, + "DeleteApi": { + "methods": [ + "deleteApi" + ] + }, + "GetApiVersion": { + "methods": [ + "getApiVersion" + ] + }, + "CreateApiVersion": { + "methods": [ + "createApiVersion" + ] + }, + "UpdateApiVersion": { + "methods": [ + "updateApiVersion" + ] + }, + "DeleteApiVersion": { + "methods": [ + "deleteApiVersion" + ] + }, + "GetApiSpec": { + "methods": [ + "getApiSpec" + ] + }, + "GetApiSpecContents": { + "methods": [ + "getApiSpecContents" + ] + }, + "CreateApiSpec": { + "methods": [ + "createApiSpec" + ] + }, + "UpdateApiSpec": { + "methods": [ + "updateApiSpec" + ] + }, + "DeleteApiSpec": { + "methods": [ + "deleteApiSpec" + ] + }, + "TagApiSpecRevision": { + "methods": [ + "tagApiSpecRevision" + ] + }, + "RollbackApiSpec": { + "methods": [ + "rollbackApiSpec" + ] + }, + "DeleteApiSpecRevision": { + "methods": [ + "deleteApiSpecRevision" + ] + }, + "GetApiDeployment": { + "methods": [ + "getApiDeployment" + ] + }, + "CreateApiDeployment": { + "methods": [ + "createApiDeployment" + ] + }, + "UpdateApiDeployment": { + "methods": [ + "updateApiDeployment" + ] + }, + "DeleteApiDeployment": { + "methods": [ + "deleteApiDeployment" + ] + }, + "TagApiDeploymentRevision": { + "methods": [ + "tagApiDeploymentRevision" + ] + }, + "RollbackApiDeployment": { + "methods": [ + "rollbackApiDeployment" + ] + }, + "DeleteApiDeploymentRevision": { + "methods": [ + "deleteApiDeploymentRevision" + ] + }, + "GetArtifact": { + "methods": [ + "getArtifact" + ] + }, + "GetArtifactContents": { + "methods": [ + "getArtifactContents" + ] + }, + "CreateArtifact": { + "methods": [ + "createArtifact" + ] + }, + "ReplaceArtifact": { + "methods": [ + "replaceArtifact" + ] + }, + "DeleteArtifact": { + "methods": [ + "deleteArtifact" + ] + }, + "ListApis": { + "methods": [ + "listApis", + "listApisStream", + "listApisAsync" + ] + }, + "ListApiVersions": { + "methods": [ + "listApiVersions", + "listApiVersionsStream", + "listApiVersionsAsync" + ] + }, + "ListApiSpecs": { + "methods": [ + "listApiSpecs", + "listApiSpecsStream", + "listApiSpecsAsync" + ] + }, + "ListApiSpecRevisions": { + "methods": [ + "listApiSpecRevisions", + "listApiSpecRevisionsStream", + "listApiSpecRevisionsAsync" + ] + }, + "ListApiDeployments": { + "methods": [ + "listApiDeployments", + "listApiDeploymentsStream", + "listApiDeploymentsAsync" + ] + }, + "ListApiDeploymentRevisions": { + "methods": [ + "listApiDeploymentRevisions", + "listApiDeploymentRevisionsStream", + "listApiDeploymentRevisionsAsync" + ] + }, + "ListArtifacts": { + "methods": [ + "listArtifacts", + "listArtifactsStream", + "listArtifactsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "RegistryClient", + "rpcs": { + "GetApi": { + "methods": [ + "getApi" + ] + }, + "CreateApi": { + "methods": [ + "createApi" + ] + }, + "UpdateApi": { + "methods": [ + "updateApi" + ] + }, + "DeleteApi": { + "methods": [ + "deleteApi" + ] + }, + "GetApiVersion": { + "methods": [ + "getApiVersion" + ] + }, + "CreateApiVersion": { + "methods": [ + "createApiVersion" + ] + }, + "UpdateApiVersion": { + "methods": [ + "updateApiVersion" + ] + }, + "DeleteApiVersion": { + "methods": [ + "deleteApiVersion" + ] + }, + "GetApiSpec": { + "methods": [ + "getApiSpec" + ] + }, + "GetApiSpecContents": { + "methods": [ + "getApiSpecContents" + ] + }, + "CreateApiSpec": { + "methods": [ + "createApiSpec" + ] + }, + "UpdateApiSpec": { + "methods": [ + "updateApiSpec" + ] + }, + "DeleteApiSpec": { + "methods": [ + "deleteApiSpec" + ] + }, + "TagApiSpecRevision": { + "methods": [ + "tagApiSpecRevision" + ] + }, + "RollbackApiSpec": { + "methods": [ + "rollbackApiSpec" + ] + }, + "DeleteApiSpecRevision": { + "methods": [ + "deleteApiSpecRevision" + ] + }, + "GetApiDeployment": { + "methods": [ + "getApiDeployment" + ] + }, + "CreateApiDeployment": { + "methods": [ + "createApiDeployment" + ] + }, + "UpdateApiDeployment": { + "methods": [ + "updateApiDeployment" + ] + }, + "DeleteApiDeployment": { + "methods": [ + "deleteApiDeployment" + ] + }, + "TagApiDeploymentRevision": { + "methods": [ + "tagApiDeploymentRevision" + ] + }, + "RollbackApiDeployment": { + "methods": [ + "rollbackApiDeployment" + ] + }, + "DeleteApiDeploymentRevision": { + "methods": [ + "deleteApiDeploymentRevision" + ] + }, + "GetArtifact": { + "methods": [ + "getArtifact" + ] + }, + "GetArtifactContents": { + "methods": [ + "getArtifactContents" + ] + }, + "CreateArtifact": { + "methods": [ + "createArtifact" + ] + }, + "ReplaceArtifact": { + "methods": [ + "replaceArtifact" + ] + }, + "DeleteArtifact": { + "methods": [ + "deleteArtifact" + ] + }, + "ListApis": { + "methods": [ + "listApis", + "listApisStream", + "listApisAsync" + ] + }, + "ListApiVersions": { + "methods": [ + "listApiVersions", + "listApiVersionsStream", + "listApiVersionsAsync" + ] + }, + "ListApiSpecs": { + "methods": [ + "listApiSpecs", + "listApiSpecsStream", + "listApiSpecsAsync" + ] + }, + "ListApiSpecRevisions": { + "methods": [ + "listApiSpecRevisions", + "listApiSpecRevisionsStream", + "listApiSpecRevisionsAsync" + ] + }, + "ListApiDeployments": { + "methods": [ + "listApiDeployments", + "listApiDeploymentsStream", + "listApiDeploymentsAsync" + ] + }, + "ListApiDeploymentRevisions": { + "methods": [ + "listApiDeploymentRevisions", + "listApiDeploymentRevisionsStream", + "listApiDeploymentRevisionsAsync" + ] + }, + "ListArtifacts": { + "methods": [ + "listArtifacts", + "listArtifactsStream", + "listArtifactsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-apigeeregistry/src/v1/index.ts b/packages/google-cloud-apigeeregistry/src/v1/index.ts new file mode 100644 index 00000000000..03a07e1f982 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/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 {ProvisioningClient} from './provisioning_client'; +export {RegistryClient} from './registry_client'; diff --git a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts new file mode 100644 index 00000000000..67eaa907620 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts @@ -0,0 +1,2155 @@ +// 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, + GrpcClientOptions, + LROperation, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/provisioning_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './provisioning_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * The service that is used for managing the data plane provisioning of the + * Registry. + * @class + * @memberof v1 + */ +export class ProvisioningClient { + 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}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + provisioningStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ProvisioningClient. + * + * @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/main/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 | "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. + const staticMembers = this.constructor as typeof ProvisioningClient; + 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; + } + this.iamClient = new IamClient(this._gaxGrpc, opts); + + this.locationsClient = new LocationsClient(this._gaxGrpc, opts); + + // 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 = { + apiPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}' + ), + apiDeploymentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}' + ), + apiSpecPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}' + ), + apiVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/versions/{version}' + ), + instancePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectLocationApiArtifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}' + ), + projectLocationApiDeploymentArtifactPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}' + ), + projectLocationApiVersionArtifactPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}' + ), + projectLocationApiVersionSpecArtifactPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}' + ), + projectLocationArtifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/artifacts/{artifact}' + ), + }; + + 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/*/apis/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/artifacts/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy', + }, + {get: '/v1/{resource=projects/*/locations/*/runtime}:getIamPolicy'}, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1/{resource=projects/*/locations/*/apis/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/artifacts/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/runtime}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1/{resource=projects/*/locations/*/apis/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/artifacts/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/runtime}: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); + const createInstanceResponse = protoFilesRoot.lookup( + '.google.cloud.apigeeregistry.v1.Instance' + ) as gax.protobuf.Type; + const createInstanceMetadata = protoFilesRoot.lookup( + '.google.cloud.apigeeregistry.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteInstanceResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteInstanceMetadata = protoFilesRoot.lookup( + '.google.cloud.apigeeregistry.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createInstance: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createInstanceResponse.decode.bind(createInstanceResponse), + createInstanceMetadata.decode.bind(createInstanceMetadata) + ), + deleteInstance: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteInstanceResponse.decode.bind(deleteInstanceResponse), + deleteInstanceMetadata.decode.bind(deleteInstanceMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.apigeeregistry.v1.Provisioning', + 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.provisioningStub) { + return this.provisioningStub; + } + + // Put together the "service stub" for + // google.cloud.apigeeregistry.v1.Provisioning. + this.provisioningStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.apigeeregistry.v1.Provisioning' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.apigeeregistry.v1.Provisioning, + 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 provisioningStubMethods = [ + 'createInstance', + 'deleteInstance', + 'getInstance', + ]; + for (const methodName of provisioningStubMethods) { + const callPromise = this.provisioningStub.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.provisioningStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'apigeeregistry.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 'apigeeregistry.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 -- + // ------------------- + /** + * Gets details of a single Instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Instance to retrieve. + * Format: `projects/* /locations/* /instances/*`. + * @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 [Instance]{@link google.cloud.apigeeregistry.v1.Instance}. + * 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/provisioning.get_instance.js + * region_tag:apigeeregistry_v1_generated_Provisioning_GetInstance_async + */ + getInstance( + request?: protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IInstance, + protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest | undefined, + {} | undefined + ] + >; + getInstance( + request: protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IInstance, + | protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getInstance( + request: protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IInstance, + | protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getInstance( + request?: protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IInstance, + | protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IInstance, + | protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IInstance, + protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest | 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.getInstance(request, options, callback); + } + + /** + * Provisions instance resources for the Registry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource of the Instance, of the form: `projects/* /locations/*` + * @param {string} request.instanceId + * Required. Identifier to assign to the Instance. Must be unique within scope of the + * parent resource. + * @param {google.cloud.apigeeregistry.v1.Instance} request.instance + * Required. The Instance. + * @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/provisioning.create_instance.js + * region_tag:apigeeregistry_v1_generated_Provisioning_CreateInstance_async + */ + createInstance( + request?: protos.google.cloud.apigeeregistry.v1.ICreateInstanceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.apigeeregistry.v1.IInstance, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createInstance( + request: protos.google.cloud.apigeeregistry.v1.ICreateInstanceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.apigeeregistry.v1.IInstance, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createInstance( + request: protos.google.cloud.apigeeregistry.v1.ICreateInstanceRequest, + callback: Callback< + LROperation< + protos.google.cloud.apigeeregistry.v1.IInstance, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createInstance( + request?: protos.google.cloud.apigeeregistry.v1.ICreateInstanceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.apigeeregistry.v1.IInstance, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.apigeeregistry.v1.IInstance, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.apigeeregistry.v1.IInstance, + protos.google.cloud.apigeeregistry.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.createInstance(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createInstance()`. + * @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/provisioning.create_instance.js + * region_tag:apigeeregistry_v1_generated_Provisioning_CreateInstance_async + */ + async checkCreateInstanceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.apigeeregistry.v1.Instance, + protos.google.cloud.apigeeregistry.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.createInstance, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.apigeeregistry.v1.Instance, + protos.google.cloud.apigeeregistry.v1.OperationMetadata + >; + } + /** + * Deletes the Registry instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Instance to delete. + * Format: `projects/* /locations/* /instances/*`. + * @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/provisioning.delete_instance.js + * region_tag:apigeeregistry_v1_generated_Provisioning_DeleteInstance_async + */ + deleteInstance( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteInstanceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteInstance( + request: protos.google.cloud.apigeeregistry.v1.IDeleteInstanceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteInstance( + request: protos.google.cloud.apigeeregistry.v1.IDeleteInstanceRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteInstance( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteInstanceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.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.deleteInstance(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteInstance()`. + * @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/provisioning.delete_instance.js + * region_tag:apigeeregistry_v1_generated_Provisioning_DeleteInstance_async + */ + async checkDeleteInstanceProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.apigeeregistry.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.deleteInstance, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.apigeeregistry.v1.OperationMetadata + >; + } + /** + * 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 api resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @returns {string} Resource name string. + */ + apiPath(project: string, location: string, api: string) { + return this.pathTemplates.apiPathTemplate.render({ + project: project, + location: location, + api: api, + }); + } + + /** + * Parse the project from Api resource. + * + * @param {string} apiName + * A fully-qualified path representing Api resource. + * @returns {string} A string representing the project. + */ + matchProjectFromApiName(apiName: string) { + return this.pathTemplates.apiPathTemplate.match(apiName).project; + } + + /** + * Parse the location from Api resource. + * + * @param {string} apiName + * A fully-qualified path representing Api resource. + * @returns {string} A string representing the location. + */ + matchLocationFromApiName(apiName: string) { + return this.pathTemplates.apiPathTemplate.match(apiName).location; + } + + /** + * Parse the api from Api resource. + * + * @param {string} apiName + * A fully-qualified path representing Api resource. + * @returns {string} A string representing the api. + */ + matchApiFromApiName(apiName: string) { + return this.pathTemplates.apiPathTemplate.match(apiName).api; + } + + /** + * Return a fully-qualified apiDeployment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} deployment + * @returns {string} Resource name string. + */ + apiDeploymentPath( + project: string, + location: string, + api: string, + deployment: string + ) { + return this.pathTemplates.apiDeploymentPathTemplate.render({ + project: project, + location: location, + api: api, + deployment: deployment, + }); + } + + /** + * Parse the project from ApiDeployment resource. + * + * @param {string} apiDeploymentName + * A fully-qualified path representing ApiDeployment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromApiDeploymentName(apiDeploymentName: string) { + return this.pathTemplates.apiDeploymentPathTemplate.match(apiDeploymentName) + .project; + } + + /** + * Parse the location from ApiDeployment resource. + * + * @param {string} apiDeploymentName + * A fully-qualified path representing ApiDeployment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromApiDeploymentName(apiDeploymentName: string) { + return this.pathTemplates.apiDeploymentPathTemplate.match(apiDeploymentName) + .location; + } + + /** + * Parse the api from ApiDeployment resource. + * + * @param {string} apiDeploymentName + * A fully-qualified path representing ApiDeployment resource. + * @returns {string} A string representing the api. + */ + matchApiFromApiDeploymentName(apiDeploymentName: string) { + return this.pathTemplates.apiDeploymentPathTemplate.match(apiDeploymentName) + .api; + } + + /** + * Parse the deployment from ApiDeployment resource. + * + * @param {string} apiDeploymentName + * A fully-qualified path representing ApiDeployment resource. + * @returns {string} A string representing the deployment. + */ + matchDeploymentFromApiDeploymentName(apiDeploymentName: string) { + return this.pathTemplates.apiDeploymentPathTemplate.match(apiDeploymentName) + .deployment; + } + + /** + * Return a fully-qualified apiSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} version + * @param {string} spec + * @returns {string} Resource name string. + */ + apiSpecPath( + project: string, + location: string, + api: string, + version: string, + spec: string + ) { + return this.pathTemplates.apiSpecPathTemplate.render({ + project: project, + location: location, + api: api, + version: version, + spec: spec, + }); + } + + /** + * Parse the project from ApiSpec resource. + * + * @param {string} apiSpecName + * A fully-qualified path representing ApiSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromApiSpecName(apiSpecName: string) { + return this.pathTemplates.apiSpecPathTemplate.match(apiSpecName).project; + } + + /** + * Parse the location from ApiSpec resource. + * + * @param {string} apiSpecName + * A fully-qualified path representing ApiSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromApiSpecName(apiSpecName: string) { + return this.pathTemplates.apiSpecPathTemplate.match(apiSpecName).location; + } + + /** + * Parse the api from ApiSpec resource. + * + * @param {string} apiSpecName + * A fully-qualified path representing ApiSpec resource. + * @returns {string} A string representing the api. + */ + matchApiFromApiSpecName(apiSpecName: string) { + return this.pathTemplates.apiSpecPathTemplate.match(apiSpecName).api; + } + + /** + * Parse the version from ApiSpec resource. + * + * @param {string} apiSpecName + * A fully-qualified path representing ApiSpec resource. + * @returns {string} A string representing the version. + */ + matchVersionFromApiSpecName(apiSpecName: string) { + return this.pathTemplates.apiSpecPathTemplate.match(apiSpecName).version; + } + + /** + * Parse the spec from ApiSpec resource. + * + * @param {string} apiSpecName + * A fully-qualified path representing ApiSpec resource. + * @returns {string} A string representing the spec. + */ + matchSpecFromApiSpecName(apiSpecName: string) { + return this.pathTemplates.apiSpecPathTemplate.match(apiSpecName).spec; + } + + /** + * Return a fully-qualified apiVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} version + * @returns {string} Resource name string. + */ + apiVersionPath( + project: string, + location: string, + api: string, + version: string + ) { + return this.pathTemplates.apiVersionPathTemplate.render({ + project: project, + location: location, + api: api, + version: version, + }); + } + + /** + * Parse the project from ApiVersion resource. + * + * @param {string} apiVersionName + * A fully-qualified path representing ApiVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromApiVersionName(apiVersionName: string) { + return this.pathTemplates.apiVersionPathTemplate.match(apiVersionName) + .project; + } + + /** + * Parse the location from ApiVersion resource. + * + * @param {string} apiVersionName + * A fully-qualified path representing ApiVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromApiVersionName(apiVersionName: string) { + return this.pathTemplates.apiVersionPathTemplate.match(apiVersionName) + .location; + } + + /** + * Parse the api from ApiVersion resource. + * + * @param {string} apiVersionName + * A fully-qualified path representing ApiVersion resource. + * @returns {string} A string representing the api. + */ + matchApiFromApiVersionName(apiVersionName: string) { + return this.pathTemplates.apiVersionPathTemplate.match(apiVersionName).api; + } + + /** + * Parse the version from ApiVersion resource. + * + * @param {string} apiVersionName + * A fully-qualified path representing ApiVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromApiVersionName(apiVersionName: string) { + return this.pathTemplates.apiVersionPathTemplate.match(apiVersionName) + .version; + } + + /** + * Return a fully-qualified instance resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @returns {string} Resource name string. + */ + instancePath(project: string, location: string, instance: string) { + return this.pathTemplates.instancePathTemplate.render({ + project: project, + location: location, + instance: instance, + }); + } + + /** + * Parse the project from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).project; + } + + /** + * Parse the location from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the location. + */ + matchLocationFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).location; + } + + /** + * Parse the instance from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).instance; + } + + /** + * 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 projectLocationApiArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} artifact + * @returns {string} Resource name string. + */ + projectLocationApiArtifactPath( + project: string, + location: string, + api: string, + artifact: string + ) { + return this.pathTemplates.projectLocationApiArtifactPathTemplate.render({ + project: project, + location: location, + api: api, + artifact: artifact, + }); + } + + /** + * Parse the project from ProjectLocationApiArtifact resource. + * + * @param {string} projectLocationApiArtifactName + * A fully-qualified path representing project_location_api_artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationApiArtifactName( + projectLocationApiArtifactName: string + ) { + return this.pathTemplates.projectLocationApiArtifactPathTemplate.match( + projectLocationApiArtifactName + ).project; + } + + /** + * Parse the location from ProjectLocationApiArtifact resource. + * + * @param {string} projectLocationApiArtifactName + * A fully-qualified path representing project_location_api_artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationApiArtifactName( + projectLocationApiArtifactName: string + ) { + return this.pathTemplates.projectLocationApiArtifactPathTemplate.match( + projectLocationApiArtifactName + ).location; + } + + /** + * Parse the api from ProjectLocationApiArtifact resource. + * + * @param {string} projectLocationApiArtifactName + * A fully-qualified path representing project_location_api_artifact resource. + * @returns {string} A string representing the api. + */ + matchApiFromProjectLocationApiArtifactName( + projectLocationApiArtifactName: string + ) { + return this.pathTemplates.projectLocationApiArtifactPathTemplate.match( + projectLocationApiArtifactName + ).api; + } + + /** + * Parse the artifact from ProjectLocationApiArtifact resource. + * + * @param {string} projectLocationApiArtifactName + * A fully-qualified path representing project_location_api_artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromProjectLocationApiArtifactName( + projectLocationApiArtifactName: string + ) { + return this.pathTemplates.projectLocationApiArtifactPathTemplate.match( + projectLocationApiArtifactName + ).artifact; + } + + /** + * Return a fully-qualified projectLocationApiDeploymentArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} deployment + * @param {string} artifact + * @returns {string} Resource name string. + */ + projectLocationApiDeploymentArtifactPath( + project: string, + location: string, + api: string, + deployment: string, + artifact: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.render( + { + project: project, + location: location, + api: api, + deployment: deployment, + artifact: artifact, + } + ); + } + + /** + * Parse the project from ProjectLocationApiDeploymentArtifact resource. + * + * @param {string} projectLocationApiDeploymentArtifactName + * A fully-qualified path representing project_location_api_deployment_artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationApiDeploymentArtifactName( + projectLocationApiDeploymentArtifactName: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match( + projectLocationApiDeploymentArtifactName + ).project; + } + + /** + * Parse the location from ProjectLocationApiDeploymentArtifact resource. + * + * @param {string} projectLocationApiDeploymentArtifactName + * A fully-qualified path representing project_location_api_deployment_artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationApiDeploymentArtifactName( + projectLocationApiDeploymentArtifactName: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match( + projectLocationApiDeploymentArtifactName + ).location; + } + + /** + * Parse the api from ProjectLocationApiDeploymentArtifact resource. + * + * @param {string} projectLocationApiDeploymentArtifactName + * A fully-qualified path representing project_location_api_deployment_artifact resource. + * @returns {string} A string representing the api. + */ + matchApiFromProjectLocationApiDeploymentArtifactName( + projectLocationApiDeploymentArtifactName: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match( + projectLocationApiDeploymentArtifactName + ).api; + } + + /** + * Parse the deployment from ProjectLocationApiDeploymentArtifact resource. + * + * @param {string} projectLocationApiDeploymentArtifactName + * A fully-qualified path representing project_location_api_deployment_artifact resource. + * @returns {string} A string representing the deployment. + */ + matchDeploymentFromProjectLocationApiDeploymentArtifactName( + projectLocationApiDeploymentArtifactName: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match( + projectLocationApiDeploymentArtifactName + ).deployment; + } + + /** + * Parse the artifact from ProjectLocationApiDeploymentArtifact resource. + * + * @param {string} projectLocationApiDeploymentArtifactName + * A fully-qualified path representing project_location_api_deployment_artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromProjectLocationApiDeploymentArtifactName( + projectLocationApiDeploymentArtifactName: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match( + projectLocationApiDeploymentArtifactName + ).artifact; + } + + /** + * Return a fully-qualified projectLocationApiVersionArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} version + * @param {string} artifact + * @returns {string} Resource name string. + */ + projectLocationApiVersionArtifactPath( + project: string, + location: string, + api: string, + version: string, + artifact: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.render( + { + project: project, + location: location, + api: api, + version: version, + artifact: artifact, + } + ); + } + + /** + * Parse the project from ProjectLocationApiVersionArtifact resource. + * + * @param {string} projectLocationApiVersionArtifactName + * A fully-qualified path representing project_location_api_version_artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationApiVersionArtifactName( + projectLocationApiVersionArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match( + projectLocationApiVersionArtifactName + ).project; + } + + /** + * Parse the location from ProjectLocationApiVersionArtifact resource. + * + * @param {string} projectLocationApiVersionArtifactName + * A fully-qualified path representing project_location_api_version_artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationApiVersionArtifactName( + projectLocationApiVersionArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match( + projectLocationApiVersionArtifactName + ).location; + } + + /** + * Parse the api from ProjectLocationApiVersionArtifact resource. + * + * @param {string} projectLocationApiVersionArtifactName + * A fully-qualified path representing project_location_api_version_artifact resource. + * @returns {string} A string representing the api. + */ + matchApiFromProjectLocationApiVersionArtifactName( + projectLocationApiVersionArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match( + projectLocationApiVersionArtifactName + ).api; + } + + /** + * Parse the version from ProjectLocationApiVersionArtifact resource. + * + * @param {string} projectLocationApiVersionArtifactName + * A fully-qualified path representing project_location_api_version_artifact resource. + * @returns {string} A string representing the version. + */ + matchVersionFromProjectLocationApiVersionArtifactName( + projectLocationApiVersionArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match( + projectLocationApiVersionArtifactName + ).version; + } + + /** + * Parse the artifact from ProjectLocationApiVersionArtifact resource. + * + * @param {string} projectLocationApiVersionArtifactName + * A fully-qualified path representing project_location_api_version_artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromProjectLocationApiVersionArtifactName( + projectLocationApiVersionArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match( + projectLocationApiVersionArtifactName + ).artifact; + } + + /** + * Return a fully-qualified projectLocationApiVersionSpecArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} version + * @param {string} spec + * @param {string} artifact + * @returns {string} Resource name string. + */ + projectLocationApiVersionSpecArtifactPath( + project: string, + location: string, + api: string, + version: string, + spec: string, + artifact: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.render( + { + project: project, + location: location, + api: api, + version: version, + spec: spec, + artifact: artifact, + } + ); + } + + /** + * Parse the project from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).project; + } + + /** + * Parse the location from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).location; + } + + /** + * Parse the api from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the api. + */ + matchApiFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).api; + } + + /** + * Parse the version from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the version. + */ + matchVersionFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).version; + } + + /** + * Parse the spec from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the spec. + */ + matchSpecFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).spec; + } + + /** + * Parse the artifact from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).artifact; + } + + /** + * Return a fully-qualified projectLocationArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} artifact + * @returns {string} Resource name string. + */ + projectLocationArtifactPath( + project: string, + location: string, + artifact: string + ) { + return this.pathTemplates.projectLocationArtifactPathTemplate.render({ + project: project, + location: location, + artifact: artifact, + }); + } + + /** + * Parse the project from ProjectLocationArtifact resource. + * + * @param {string} projectLocationArtifactName + * A fully-qualified path representing project_location_artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationArtifactName( + projectLocationArtifactName: string + ) { + return this.pathTemplates.projectLocationArtifactPathTemplate.match( + projectLocationArtifactName + ).project; + } + + /** + * Parse the location from ProjectLocationArtifact resource. + * + * @param {string} projectLocationArtifactName + * A fully-qualified path representing project_location_artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationArtifactName( + projectLocationArtifactName: string + ) { + return this.pathTemplates.projectLocationArtifactPathTemplate.match( + projectLocationArtifactName + ).location; + } + + /** + * Parse the artifact from ProjectLocationArtifact resource. + * + * @param {string} projectLocationArtifactName + * A fully-qualified path representing project_location_artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromProjectLocationArtifactName( + projectLocationArtifactName: string + ) { + return this.pathTemplates.projectLocationArtifactPathTemplate.match( + projectLocationArtifactName + ).artifact; + } + + /** + * 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 { + if (this.provisioningStub && !this._terminated) { + return this.provisioningStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client_config.json b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client_config.json new file mode 100644 index 00000000000..2e37ea87f55 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client_config.json @@ -0,0 +1,38 @@ +{ + "interfaces": { + "google.cloud.apigeeregistry.v1.Provisioning": { + "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": { + "CreateInstance": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteInstance": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetInstance": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-apigeeregistry/src/v1/provisioning_proto_list.json b/packages/google-cloud-apigeeregistry/src/v1/provisioning_proto_list.json new file mode 100644 index 00000000000..4fdc846ee2b --- /dev/null +++ b/packages/google-cloud-apigeeregistry/src/v1/provisioning_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/apigeeregistry/v1/provisioning_service.proto", + "../../protos/google/cloud/apigeeregistry/v1/registry_models.proto", + "../../protos/google/cloud/apigeeregistry/v1/registry_service.proto" +] diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts new file mode 100644 index 00000000000..c181390ef40 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts @@ -0,0 +1,6152 @@ +// 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, + GrpcClientOptions, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + 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'); +/** + * Client JSON configuration object, loaded from + * `src/v1/registry_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './registry_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * The Registry service allows teams to manage descriptions of APIs. + * @class + * @memberof v1 + */ +export class RegistryClient { + 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}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + registryStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of RegistryClient. + * + * @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/main/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 | "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. + const staticMembers = this.constructor as typeof RegistryClient; + 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; + } + this.iamClient = new IamClient(this._gaxGrpc, opts); + + this.locationsClient = new LocationsClient(this._gaxGrpc, opts); + + // 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 = { + apiPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}' + ), + apiDeploymentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}' + ), + apiSpecPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}' + ), + apiVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/versions/{version}' + ), + instancePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectLocationApiArtifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}' + ), + projectLocationApiDeploymentArtifactPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}' + ), + projectLocationApiVersionArtifactPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}' + ), + projectLocationApiVersionSpecArtifactPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}' + ), + projectLocationArtifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/artifacts/{artifact}' + ), + }; + + // 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 = { + listApis: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'apis' + ), + listApiVersions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'apiVersions' + ), + listApiSpecs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'apiSpecs' + ), + listApiSpecRevisions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'apiSpecs' + ), + listApiDeployments: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'apiDeployments' + ), + listApiDeploymentRevisions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'apiDeployments' + ), + listArtifacts: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'artifacts' + ), + }; + + 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/*/apis/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/artifacts/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy', + }, + {get: '/v1/{resource=projects/*/locations/*/runtime}:getIamPolicy'}, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1/{resource=projects/*/locations/*/apis/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/artifacts/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/runtime}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1/{resource=projects/*/locations/*/apis/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/artifacts/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/runtime}: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.apigeeregistry.v1.Registry', + 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.registryStub) { + return this.registryStub; + } + + // Put together the "service stub" for + // google.cloud.apigeeregistry.v1.Registry. + this.registryStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.apigeeregistry.v1.Registry' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.apigeeregistry.v1.Registry, + 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 registryStubMethods = [ + 'listApis', + 'getApi', + 'createApi', + 'updateApi', + 'deleteApi', + 'listApiVersions', + 'getApiVersion', + 'createApiVersion', + 'updateApiVersion', + 'deleteApiVersion', + 'listApiSpecs', + 'getApiSpec', + 'getApiSpecContents', + 'createApiSpec', + 'updateApiSpec', + 'deleteApiSpec', + 'tagApiSpecRevision', + 'listApiSpecRevisions', + 'rollbackApiSpec', + 'deleteApiSpecRevision', + 'listApiDeployments', + 'getApiDeployment', + 'createApiDeployment', + 'updateApiDeployment', + 'deleteApiDeployment', + 'tagApiDeploymentRevision', + 'listApiDeploymentRevisions', + 'rollbackApiDeployment', + 'deleteApiDeploymentRevision', + 'listArtifacts', + 'getArtifact', + 'getArtifactContents', + 'createArtifact', + 'replaceArtifact', + 'deleteArtifact', + ]; + for (const methodName of registryStubMethods) { + const callPromise = this.registryStub.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.registryStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'apigeeregistry.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 'apigeeregistry.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 -- + // ------------------- + /** + * GetApi returns a specified API. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the API to retrieve. + * Format: projects/* /locations/* /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 [Api]{@link google.cloud.apigeeregistry.v1.Api}. + * 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/registry.get_api.js + * region_tag:apigeeregistry_v1_generated_Registry_GetApi_async + */ + getApi( + request?: protos.google.cloud.apigeeregistry.v1.IGetApiRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApi, + protos.google.cloud.apigeeregistry.v1.IGetApiRequest | undefined, + {} | undefined + ] + >; + getApi( + request: protos.google.cloud.apigeeregistry.v1.IGetApiRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + protos.google.cloud.apigeeregistry.v1.IGetApiRequest | null | undefined, + {} | null | undefined + > + ): void; + getApi( + request: protos.google.cloud.apigeeregistry.v1.IGetApiRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + protos.google.cloud.apigeeregistry.v1.IGetApiRequest | null | undefined, + {} | null | undefined + > + ): void; + getApi( + request?: protos.google.cloud.apigeeregistry.v1.IGetApiRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + | protos.google.cloud.apigeeregistry.v1.IGetApiRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + protos.google.cloud.apigeeregistry.v1.IGetApiRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApi, + protos.google.cloud.apigeeregistry.v1.IGetApiRequest | 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.getApi(request, options, callback); + } + /** + * CreateApi creates a specified API. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of APIs. + * Format: projects/* /locations/* + * @param {google.cloud.apigeeregistry.v1.Api} request.api + * Required. The API to create. + * @param {string} request.apiId + * Required. The ID to use for the api, which will become the final component of + * the api's resource name. + * + * This value should be 4-63 characters, and valid characters + * are /{@link 0-9|a-z}-/. + * + * Following AIP-162, IDs must not have the form of a UUID. + * @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 [Api]{@link google.cloud.apigeeregistry.v1.Api}. + * 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/registry.create_api.js + * region_tag:apigeeregistry_v1_generated_Registry_CreateApi_async + */ + createApi( + request?: protos.google.cloud.apigeeregistry.v1.ICreateApiRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApi, + protos.google.cloud.apigeeregistry.v1.ICreateApiRequest | undefined, + {} | undefined + ] + >; + createApi( + request: protos.google.cloud.apigeeregistry.v1.ICreateApiRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + | protos.google.cloud.apigeeregistry.v1.ICreateApiRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createApi( + request: protos.google.cloud.apigeeregistry.v1.ICreateApiRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + | protos.google.cloud.apigeeregistry.v1.ICreateApiRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createApi( + request?: protos.google.cloud.apigeeregistry.v1.ICreateApiRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + | protos.google.cloud.apigeeregistry.v1.ICreateApiRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + | protos.google.cloud.apigeeregistry.v1.ICreateApiRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApi, + protos.google.cloud.apigeeregistry.v1.ICreateApiRequest | 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.createApi(request, options, callback); + } + /** + * UpdateApi can be used to modify a specified API. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.apigeeregistry.v1.Api} request.api + * Required. The API to update. + * + * The `name` field is used to identify the API to update. + * Format: projects/* /locations/* /apis/* + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be updated. If omitted, all fields are updated that + * are set in the request message (fields set to default values are ignored). + * If a "*" is specified, all fields are updated, including fields that are + * unspecified/default in the request. + * @param {boolean} request.allowMissing + * If set to true, and the api is not found, a new api will be created. + * In this situation, `update_mask` is ignored. + * @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 [Api]{@link google.cloud.apigeeregistry.v1.Api}. + * 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/registry.update_api.js + * region_tag:apigeeregistry_v1_generated_Registry_UpdateApi_async + */ + updateApi( + request?: protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApi, + protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest | undefined, + {} | undefined + ] + >; + updateApi( + request: protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateApi( + request: protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateApi( + request?: protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApi, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApi, + protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest | 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({ + 'api.name': request.api!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateApi(request, options, callback); + } + /** + * DeleteApi removes a specified API and all of the resources that it + * owns. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the API to delete. + * Format: projects/* /locations/* /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 [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/registry.delete_api.js + * region_tag:apigeeregistry_v1_generated_Registry_DeleteApi_async + */ + deleteApi( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest | undefined, + {} | undefined + ] + >; + deleteApi( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApi( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApi( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest | 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.deleteApi(request, options, callback); + } + /** + * GetApiVersion returns a specified version. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the version to retrieve. + * Format: projects/* /locations/* /apis/* /versions/* + * @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 [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion}. + * 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/registry.get_api_version.js + * region_tag:apigeeregistry_v1_generated_Registry_GetApiVersion_async + */ + getApiVersion( + request?: protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiVersion, + protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest | undefined, + {} | undefined + ] + >; + getApiVersion( + request: protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getApiVersion( + request: protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getApiVersion( + request?: protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiVersion, + protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest | 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.getApiVersion(request, options, callback); + } + /** + * CreateApiVersion creates a specified version. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of versions. + * Format: projects/* /locations/* /apis/* + * @param {google.cloud.apigeeregistry.v1.ApiVersion} request.apiVersion + * Required. The version to create. + * @param {string} request.apiVersionId + * Required. The ID to use for the version, which will become the final component of + * the version's resource name. + * + * This value should be 1-63 characters, and valid characters + * are /{@link 0-9|a-z}-/. + * + * Following AIP-162, IDs must not have the form of a UUID. + * @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 [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion}. + * 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/registry.create_api_version.js + * region_tag:apigeeregistry_v1_generated_Registry_CreateApiVersion_async + */ + createApiVersion( + request?: protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiVersion, + ( + | protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest + | undefined + ), + {} | undefined + ] + >; + createApiVersion( + request: protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createApiVersion( + request: protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createApiVersion( + request?: protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiVersion, + ( + | protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest + | 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.createApiVersion(request, options, callback); + } + /** + * UpdateApiVersion can be used to modify a specified version. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.apigeeregistry.v1.ApiVersion} request.apiVersion + * Required. The version to update. + * + * The `name` field is used to identify the version to update. + * Format: projects/* /locations/* /apis/* /versions/* + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be updated. If omitted, all fields are updated that + * are set in the request message (fields set to default values are ignored). + * If a "*" is specified, all fields are updated, including fields that are + * unspecified/default in the request. + * @param {boolean} request.allowMissing + * If set to true, and the version is not found, a new version will be + * created. In this situation, `update_mask` is ignored. + * @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 [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion}. + * 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/registry.update_api_version.js + * region_tag:apigeeregistry_v1_generated_Registry_UpdateApiVersion_async + */ + updateApiVersion( + request?: protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiVersion, + ( + | protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest + | undefined + ), + {} | undefined + ] + >; + updateApiVersion( + request: protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateApiVersion( + request: protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateApiVersion( + request?: protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiVersion, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiVersion, + ( + | protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest + | 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({ + 'api_version.name': request.apiVersion!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateApiVersion(request, options, callback); + } + /** + * DeleteApiVersion removes a specified version and all of the resources that + * it owns. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the version to delete. + * Format: projects/* /locations/* /apis/* /versions/* + * @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/registry.delete_api_version.js + * region_tag:apigeeregistry_v1_generated_Registry_DeleteApiVersion_async + */ + deleteApiVersion( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest + | undefined + ), + {} | undefined + ] + >; + deleteApiVersion( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApiVersion( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApiVersion( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest + | 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.deleteApiVersion(request, options, callback); + } + /** + * GetApiSpec returns a specified spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the spec to retrieve. + * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * 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/registry.get_api_spec.js + * region_tag:apigeeregistry_v1_generated_Registry_GetApiSpec_async + */ + getApiSpec( + request?: protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest | undefined, + {} | undefined + ] + >; + getApiSpec( + request: protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getApiSpec( + request: protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getApiSpec( + request?: protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest | 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.getApiSpec(request, options, callback); + } + /** + * GetApiSpecContents returns the contents of a specified spec. + * If specs are stored with GZip compression, the default behavior + * is to return the spec uncompressed (the mime_type response field + * indicates the exact format returned). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the spec whose contents should be retrieved. + * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * @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/v1/registry.get_api_spec_contents.js + * region_tag:apigeeregistry_v1_generated_Registry_GetApiSpecContents_async + */ + getApiSpecContents( + request?: protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.IHttpBody, + ( + | protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest + | undefined + ), + {} | undefined + ] + >; + getApiSpecContents( + request: protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + | protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getApiSpecContents( + request: protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest, + callback: Callback< + protos.google.api.IHttpBody, + | protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getApiSpecContents( + request?: protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.IHttpBody, + | protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.IHttpBody, + | protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.IHttpBody, + ( + | protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest + | 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.getApiSpecContents(request, options, callback); + } + /** + * CreateApiSpec creates a specified spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of specs. + * Format: projects/* /locations/* /apis/* /versions/* + * @param {google.cloud.apigeeregistry.v1.ApiSpec} request.apiSpec + * Required. The spec to create. + * @param {string} request.apiSpecId + * Required. The ID to use for the spec, which will become the final component of + * the spec's resource name. + * + * This value should be 4-63 characters, and valid characters + * are /{@link 0-9|a-z}-/. + * + * Following AIP-162, IDs must not have the form of a UUID. + * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * 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/registry.create_api_spec.js + * region_tag:apigeeregistry_v1_generated_Registry_CreateApiSpec_async + */ + createApiSpec( + request?: protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest | undefined, + {} | undefined + ] + >; + createApiSpec( + request: protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createApiSpec( + request: protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createApiSpec( + request?: protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest | 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.createApiSpec(request, options, callback); + } + /** + * UpdateApiSpec can be used to modify a specified spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.apigeeregistry.v1.ApiSpec} request.apiSpec + * Required. The spec to update. + * + * The `name` field is used to identify the spec to update. + * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be updated. If omitted, all fields are updated that + * are set in the request message (fields set to default values are ignored). + * If a "*" is specified, all fields are updated, including fields that are + * unspecified/default in the request. + * @param {boolean} request.allowMissing + * If set to true, and the spec is not found, a new spec will be created. + * In this situation, `update_mask` is ignored. + * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * 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/registry.update_api_spec.js + * region_tag:apigeeregistry_v1_generated_Registry_UpdateApiSpec_async + */ + updateApiSpec( + request?: protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest | undefined, + {} | undefined + ] + >; + updateApiSpec( + request: protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateApiSpec( + request: protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateApiSpec( + request?: protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest | 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({ + 'api_spec.name': request.apiSpec!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateApiSpec(request, options, callback); + } + /** + * DeleteApiSpec removes a specified spec, all revisions, and all child + * resources (e.g. artifacts). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the spec to delete. + * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * @param {boolean} request.force + * If set to true, any child resources will also be deleted. + * (Otherwise, the request will only work if there are no child resources.) + * @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/registry.delete_api_spec.js + * region_tag:apigeeregistry_v1_generated_Registry_DeleteApiSpec_async + */ + deleteApiSpec( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest | undefined, + {} | undefined + ] + >; + deleteApiSpec( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApiSpec( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApiSpec( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest | 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.deleteApiSpec(request, options, callback); + } + /** + * TagApiSpecRevision adds a tag to a specified revision of a spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the spec to be tagged, including the revision ID. + * @param {string} request.tag + * Required. The tag to apply. + * The tag should be at most 40 characters, and match `{@link a-z0-9-|a-z}{3,39}`. + * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * 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/registry.tag_api_spec_revision.js + * region_tag:apigeeregistry_v1_generated_Registry_TagApiSpecRevision_async + */ + tagApiSpecRevision( + request?: protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + ( + | protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest + | undefined + ), + {} | undefined + ] + >; + tagApiSpecRevision( + request: protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + tagApiSpecRevision( + request: protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + tagApiSpecRevision( + request?: protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + ( + | protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest + | 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.tagApiSpecRevision(request, options, callback); + } + /** + * RollbackApiSpec sets the current revision to a specified prior revision. + * Note that this creates a new revision with a new revision ID. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The spec being rolled back. + * @param {string} request.revisionId + * Required. The revision ID to roll back to. + * It must be a revision of the same spec. + * + * Example: c7cfa2a8 + * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * 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/registry.rollback_api_spec.js + * region_tag:apigeeregistry_v1_generated_Registry_RollbackApiSpec_async + */ + rollbackApiSpec( + request?: protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest | undefined, + {} | undefined + ] + >; + rollbackApiSpec( + request: protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + rollbackApiSpec( + request: protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + rollbackApiSpec( + request?: protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest | 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.rollbackApiSpec(request, options, callback); + } + /** + * DeleteApiSpecRevision deletes a revision of a spec. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the spec revision to be deleted, + * with a revision ID explicitly included. + * + * Example: + * projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8 + * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * 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/registry.delete_api_spec_revision.js + * region_tag:apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_async + */ + deleteApiSpecRevision( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + ( + | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest + | undefined + ), + {} | undefined + ] + >; + deleteApiSpecRevision( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApiSpecRevision( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApiSpecRevision( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiSpec, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec, + ( + | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest + | 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.deleteApiSpecRevision(request, options, callback); + } + /** + * GetApiDeployment returns a specified deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the deployment to retrieve. + * Format: projects/* /locations/* /apis/* /deployments/* + * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * 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/registry.get_api_deployment.js + * region_tag:apigeeregistry_v1_generated_Registry_GetApiDeployment_async + */ + getApiDeployment( + request?: protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest + | undefined + ), + {} | undefined + ] + >; + getApiDeployment( + request: protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getApiDeployment( + request: protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getApiDeployment( + request?: protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest + | 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.getApiDeployment(request, options, callback); + } + /** + * CreateApiDeployment creates a specified deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of deployments. + * Format: projects/* /locations/* /apis/* + * @param {google.cloud.apigeeregistry.v1.ApiDeployment} request.apiDeployment + * Required. The deployment to create. + * @param {string} request.apiDeploymentId + * Required. The ID to use for the deployment, which will become the final component of + * the deployment's resource name. + * + * This value should be 4-63 characters, and valid characters + * are /{@link 0-9|a-z}-/. + * + * Following AIP-162, IDs must not have the form of a UUID. + * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * 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/registry.create_api_deployment.js + * region_tag:apigeeregistry_v1_generated_Registry_CreateApiDeployment_async + */ + createApiDeployment( + request?: protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest + | undefined + ), + {} | undefined + ] + >; + createApiDeployment( + request: protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createApiDeployment( + request: protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createApiDeployment( + request?: protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest + | 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.createApiDeployment(request, options, callback); + } + /** + * UpdateApiDeployment can be used to modify a specified deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.apigeeregistry.v1.ApiDeployment} request.apiDeployment + * Required. The deployment to update. + * + * The `name` field is used to identify the deployment to update. + * Format: projects/* /locations/* /apis/* /deployments/* + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be updated. If omitted, all fields are updated that + * are set in the request message (fields set to default values are ignored). + * If a "*" is specified, all fields are updated, including fields that are + * unspecified/default in the request. + * @param {boolean} request.allowMissing + * If set to true, and the deployment is not found, a new deployment will be + * created. In this situation, `update_mask` is ignored. + * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * 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/registry.update_api_deployment.js + * region_tag:apigeeregistry_v1_generated_Registry_UpdateApiDeployment_async + */ + updateApiDeployment( + request?: protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest + | undefined + ), + {} | undefined + ] + >; + updateApiDeployment( + request: protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateApiDeployment( + request: protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateApiDeployment( + request?: protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest + | 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({ + 'api_deployment.name': request.apiDeployment!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateApiDeployment(request, options, callback); + } + /** + * DeleteApiDeployment removes a specified deployment, all revisions, and all + * child resources (e.g. artifacts). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the deployment to delete. + * Format: projects/* /locations/* /apis/* /deployments/* + * @param {boolean} request.force + * If set to true, any child resources will also be deleted. + * (Otherwise, the request will only work if there are no child resources.) + * @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/registry.delete_api_deployment.js + * region_tag:apigeeregistry_v1_generated_Registry_DeleteApiDeployment_async + */ + deleteApiDeployment( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest + | undefined + ), + {} | undefined + ] + >; + deleteApiDeployment( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApiDeployment( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApiDeployment( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest + | 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.deleteApiDeployment(request, options, callback); + } + /** + * TagApiDeploymentRevision adds a tag to a specified revision of a + * deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the deployment to be tagged, including the revision ID. + * @param {string} request.tag + * Required. The tag to apply. + * The tag should be at most 40 characters, and match `{@link a-z0-9-|a-z}{3,39}`. + * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * 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/registry.tag_api_deployment_revision.js + * region_tag:apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_async + */ + tagApiDeploymentRevision( + request?: protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest + | undefined + ), + {} | undefined + ] + >; + tagApiDeploymentRevision( + request: protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + tagApiDeploymentRevision( + request: protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + tagApiDeploymentRevision( + request?: protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest + | 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.tagApiDeploymentRevision( + request, + options, + callback + ); + } + /** + * RollbackApiDeployment sets the current revision to a specified prior + * revision. Note that this creates a new revision with a new revision ID. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The deployment being rolled back. + * @param {string} request.revisionId + * Required. The revision ID to roll back to. + * It must be a revision of the same deployment. + * + * Example: c7cfa2a8 + * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * 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/registry.rollback_api_deployment.js + * region_tag:apigeeregistry_v1_generated_Registry_RollbackApiDeployment_async + */ + rollbackApiDeployment( + request?: protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest + | undefined + ), + {} | undefined + ] + >; + rollbackApiDeployment( + request: protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + rollbackApiDeployment( + request: protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + rollbackApiDeployment( + request?: protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest + | 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.rollbackApiDeployment(request, options, callback); + } + /** + * DeleteApiDeploymentRevision deletes a revision of a deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the deployment revision to be deleted, + * with a revision ID explicitly included. + * + * Example: + * projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8 + * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * 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/registry.delete_api_deployment_revision.js + * region_tag:apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_async + */ + deleteApiDeploymentRevision( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest + | undefined + ), + {} | undefined + ] + >; + deleteApiDeploymentRevision( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApiDeploymentRevision( + request: protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteApiDeploymentRevision( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment, + ( + | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest + | 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.deleteApiDeploymentRevision( + request, + options, + callback + ); + } + /** + * GetArtifact returns a specified artifact. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the artifact to retrieve. + * Format: {parent}/artifacts/* + * @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 [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact}. + * 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/registry.get_artifact.js + * region_tag:apigeeregistry_v1_generated_Registry_GetArtifact_async + */ + getArtifact( + request?: protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IArtifact, + protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest | undefined, + {} | undefined + ] + >; + getArtifact( + request: protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getArtifact( + request: protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getArtifact( + request?: protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IArtifact, + protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest | 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.getArtifact(request, options, callback); + } + /** + * GetArtifactContents returns the contents of a specified artifact. + * If artifacts are stored with GZip compression, the default behavior + * is to return the artifact uncompressed (the mime_type response field + * indicates the exact format returned). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the artifact whose contents should be retrieved. + * Format: {parent}/artifacts/* + * @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/v1/registry.get_artifact_contents.js + * region_tag:apigeeregistry_v1_generated_Registry_GetArtifactContents_async + */ + getArtifactContents( + request?: protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.IHttpBody, + ( + | protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest + | undefined + ), + {} | undefined + ] + >; + getArtifactContents( + request: protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + | protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getArtifactContents( + request: protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest, + callback: Callback< + protos.google.api.IHttpBody, + | protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getArtifactContents( + request?: protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.IHttpBody, + | protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.IHttpBody, + | protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.IHttpBody, + ( + | protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest + | 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.getArtifactContents(request, options, callback); + } + /** + * CreateArtifact creates a specified artifact. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of artifacts. + * Format: {parent} + * @param {google.cloud.apigeeregistry.v1.Artifact} request.artifact + * Required. The artifact to create. + * @param {string} request.artifactId + * Required. The ID to use for the artifact, which will become the final component of + * the artifact's resource name. + * + * This value should be 4-63 characters, and valid characters + * are /{@link 0-9|a-z}-/. + * + * Following AIP-162, IDs must not have the form of a UUID. + * @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 [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact}. + * 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/registry.create_artifact.js + * region_tag:apigeeregistry_v1_generated_Registry_CreateArtifact_async + */ + createArtifact( + request?: protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IArtifact, + protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest | undefined, + {} | undefined + ] + >; + createArtifact( + request: protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createArtifact( + request: protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createArtifact( + request?: protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IArtifact, + protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest | 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.createArtifact(request, options, callback); + } + /** + * ReplaceArtifact can be used to replace a specified artifact. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.apigeeregistry.v1.Artifact} request.artifact + * Required. The artifact to replace. + * + * The `name` field is used to identify the artifact to replace. + * Format: {parent}/artifacts/* + * @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 [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact}. + * 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/registry.replace_artifact.js + * region_tag:apigeeregistry_v1_generated_Registry_ReplaceArtifact_async + */ + replaceArtifact( + request?: protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IArtifact, + protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest | undefined, + {} | undefined + ] + >; + replaceArtifact( + request: protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): void; + replaceArtifact( + request: protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest, + callback: Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): void; + replaceArtifact( + request?: protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.apigeeregistry.v1.IArtifact, + | protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IArtifact, + protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest | 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({ + 'artifact.name': request.artifact!.name || '', + }); + this.initialize(); + return this.innerApiCalls.replaceArtifact(request, options, callback); + } + /** + * DeleteArtifact removes a specified artifact. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the artifact to delete. + * Format: {parent}/artifacts/* + * @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/registry.delete_artifact.js + * region_tag:apigeeregistry_v1_generated_Registry_DeleteArtifact_async + */ + deleteArtifact( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest | undefined, + {} | undefined + ] + >; + deleteArtifact( + request: protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteArtifact( + request: protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteArtifact( + request?: protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest | 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.deleteArtifact(request, options, callback); + } + + /** + * ListApis returns matching APIs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of APIs. + * Format: projects/* /locations/* + * @param {number} request.pageSize + * The maximum number of APIs to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApis` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApis` must match + * the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + * @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 [Api]{@link google.cloud.apigeeregistry.v1.Api}. + * 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 `listApisAsync()` + * 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. + */ + listApis( + request?: protos.google.cloud.apigeeregistry.v1.IListApisRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApi[], + protos.google.cloud.apigeeregistry.v1.IListApisRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApisResponse + ] + >; + listApis( + request: protos.google.cloud.apigeeregistry.v1.IListApisRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApisRequest, + | protos.google.cloud.apigeeregistry.v1.IListApisResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApi + > + ): void; + listApis( + request: protos.google.cloud.apigeeregistry.v1.IListApisRequest, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApisRequest, + | protos.google.cloud.apigeeregistry.v1.IListApisResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApi + > + ): void; + listApis( + request?: protos.google.cloud.apigeeregistry.v1.IListApisRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApisRequest, + | protos.google.cloud.apigeeregistry.v1.IListApisResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApi + >, + callback?: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApisRequest, + | protos.google.cloud.apigeeregistry.v1.IListApisResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApi + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApi[], + protos.google.cloud.apigeeregistry.v1.IListApisRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApisResponse + ] + > | 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.listApis(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 APIs. + * Format: projects/* /locations/* + * @param {number} request.pageSize + * The maximum number of APIs to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApis` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApis` must match + * the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + * @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 [Api]{@link google.cloud.apigeeregistry.v1.Api} 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 `listApisAsync()` + * 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. + */ + listApisStream( + request?: protos.google.cloud.apigeeregistry.v1.IListApisRequest, + 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['listApis']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApis.createStream( + this.innerApiCalls.listApis as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listApis`, 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 APIs. + * Format: projects/* /locations/* + * @param {number} request.pageSize + * The maximum number of APIs to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApis` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApis` must match + * the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + * @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 + * [Api]{@link google.cloud.apigeeregistry.v1.Api}. 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/registry.list_apis.js + * region_tag:apigeeregistry_v1_generated_Registry_ListApis_async + */ + listApisAsync( + request?: protos.google.cloud.apigeeregistry.v1.IListApisRequest, + 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['listApis']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApis.asyncIterate( + this.innerApiCalls['listApis'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * ListApiVersions returns matching versions. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of versions. + * Format: projects/* /locations/* /apis/* + * @param {number} request.pageSize + * The maximum number of versions to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApiVersions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApiVersions` must + * match the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + * @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 [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion}. + * 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 `listApiVersionsAsync()` + * 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. + */ + listApiVersions( + request?: protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiVersion[], + protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApiVersionsResponse + ] + >; + listApiVersions( + request: protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiVersionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiVersion + > + ): void; + listApiVersions( + request: protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiVersionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiVersion + > + ): void; + listApiVersions( + request?: protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiVersionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiVersion + >, + callback?: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiVersionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiVersion + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiVersion[], + protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApiVersionsResponse + ] + > | 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.listApiVersions(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 versions. + * Format: projects/* /locations/* /apis/* + * @param {number} request.pageSize + * The maximum number of versions to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApiVersions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApiVersions` must + * match the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + * @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 [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion} 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 `listApiVersionsAsync()` + * 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. + */ + listApiVersionsStream( + request?: protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest, + 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['listApiVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApiVersions.createStream( + this.innerApiCalls.listApiVersions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listApiVersions`, 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 versions. + * Format: projects/* /locations/* /apis/* + * @param {number} request.pageSize + * The maximum number of versions to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApiVersions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApiVersions` must + * match the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + * @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 + * [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion}. 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/registry.list_api_versions.js + * region_tag:apigeeregistry_v1_generated_Registry_ListApiVersions_async + */ + listApiVersionsAsync( + request?: protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest, + 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['listApiVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApiVersions.asyncIterate( + this.innerApiCalls['listApiVersions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * ListApiSpecs returns matching specs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of specs. + * Format: projects/* /locations/* /apis/* /versions/* + * @param {number} request.pageSize + * The maximum number of specs to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApiSpecs` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApiSpecs` must match + * the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields except contents. + * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * 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 `listApiSpecsAsync()` + * 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. + */ + listApiSpecs( + request?: protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec[], + protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApiSpecsResponse + ] + >; + listApiSpecs( + request: protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiSpecsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiSpec + > + ): void; + listApiSpecs( + request: protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiSpecsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiSpec + > + ): void; + listApiSpecs( + request?: protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiSpecsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiSpec + >, + callback?: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiSpecsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiSpec + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec[], + protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApiSpecsResponse + ] + > | 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.listApiSpecs(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 specs. + * Format: projects/* /locations/* /apis/* /versions/* + * @param {number} request.pageSize + * The maximum number of specs to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApiSpecs` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApiSpecs` must match + * the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields except contents. + * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec} 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 `listApiSpecsAsync()` + * 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. + */ + listApiSpecsStream( + request?: protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest, + 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['listApiSpecs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApiSpecs.createStream( + this.innerApiCalls.listApiSpecs as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listApiSpecs`, 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 specs. + * Format: projects/* /locations/* /apis/* /versions/* + * @param {number} request.pageSize + * The maximum number of specs to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApiSpecs` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApiSpecs` must match + * the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields except contents. + * @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 + * [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. 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/registry.list_api_specs.js + * region_tag:apigeeregistry_v1_generated_Registry_ListApiSpecs_async + */ + listApiSpecsAsync( + request?: protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest, + 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['listApiSpecs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApiSpecs.asyncIterate( + this.innerApiCalls['listApiSpecs'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * ListApiSpecRevisions lists all revisions of a spec. + * Revisions are returned in descending order of revision creation time. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the spec to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return per page. + * @param {string} request.pageToken + * The page token, received from a previous ListApiSpecRevisions call. + * Provide this to retrieve the subsequent page. + * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * 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 `listApiSpecRevisionsAsync()` + * 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. + */ + listApiSpecRevisions( + request?: protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec[], + protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse + ] + >; + listApiSpecRevisions( + request: protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiSpec + > + ): void; + listApiSpecRevisions( + request: protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiSpec + > + ): void; + listApiSpecRevisions( + request?: protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiSpec + >, + callback?: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiSpec + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiSpec[], + protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse + ] + > | 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.listApiSpecRevisions(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.name + * Required. The name of the spec to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return per page. + * @param {string} request.pageToken + * The page token, received from a previous ListApiSpecRevisions call. + * Provide this to retrieve the subsequent page. + * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec} 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 `listApiSpecRevisionsAsync()` + * 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. + */ + listApiSpecRevisionsStream( + request?: protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, + 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({ + name: request.name || '', + }); + const defaultCallSettings = this._defaults['listApiSpecRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApiSpecRevisions.createStream( + this.innerApiCalls.listApiSpecRevisions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listApiSpecRevisions`, 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.name + * Required. The name of the spec to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return per page. + * @param {string} request.pageToken + * The page token, received from a previous ListApiSpecRevisions call. + * Provide this to retrieve the subsequent page. + * @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 + * [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. 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/registry.list_api_spec_revisions.js + * region_tag:apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_async + */ + listApiSpecRevisionsAsync( + request?: protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, + 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({ + name: request.name || '', + }); + const defaultCallSettings = this._defaults['listApiSpecRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApiSpecRevisions.asyncIterate( + this.innerApiCalls['listApiSpecRevisions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * ListApiDeployments returns matching deployments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of deployments. + * Format: projects/* /locations/* /apis/* + * @param {number} request.pageSize + * The maximum number of deployments to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApiDeployments` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApiDeployments` must + * match the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * 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 `listApiDeploymentsAsync()` + * 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. + */ + listApiDeployments( + request?: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment[], + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse + ] + >; + listApiDeployments( + request: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiDeployment + > + ): void; + listApiDeployments( + request: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiDeployment + > + ): void; + listApiDeployments( + request?: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiDeployment + >, + callback?: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiDeployment + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment[], + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse + ] + > | 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.listApiDeployments(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 deployments. + * Format: projects/* /locations/* /apis/* + * @param {number} request.pageSize + * The maximum number of deployments to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApiDeployments` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApiDeployments` must + * match the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment} 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 `listApiDeploymentsAsync()` + * 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. + */ + listApiDeploymentsStream( + request?: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, + 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['listApiDeployments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApiDeployments.createStream( + this.innerApiCalls.listApiDeployments as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listApiDeployments`, 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 deployments. + * Format: projects/* /locations/* /apis/* + * @param {number} request.pageSize + * The maximum number of deployments to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListApiDeployments` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListApiDeployments` must + * match the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + * @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 + * [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. 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/registry.list_api_deployments.js + * region_tag:apigeeregistry_v1_generated_Registry_ListApiDeployments_async + */ + listApiDeploymentsAsync( + request?: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, + 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['listApiDeployments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApiDeployments.asyncIterate( + this.innerApiCalls['listApiDeployments'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * ListApiDeploymentRevisions lists all revisions of a deployment. + * Revisions are returned in descending order of revision creation time. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the deployment to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return per page. + * @param {string} request.pageToken + * The page token, received from a previous ListApiDeploymentRevisions call. + * Provide this to retrieve the subsequent page. + * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * 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 `listApiDeploymentRevisionsAsync()` + * 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. + */ + listApiDeploymentRevisions( + request?: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment[], + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse + ] + >; + listApiDeploymentRevisions( + request: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiDeployment + > + ): void; + listApiDeploymentRevisions( + request: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiDeployment + > + ): void; + listApiDeploymentRevisions( + request?: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiDeployment + >, + callback?: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, + | protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IApiDeployment + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IApiDeployment[], + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse + ] + > | 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.listApiDeploymentRevisions( + 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.name + * Required. The name of the deployment to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return per page. + * @param {string} request.pageToken + * The page token, received from a previous ListApiDeploymentRevisions call. + * Provide this to retrieve the subsequent page. + * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment} 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 `listApiDeploymentRevisionsAsync()` + * 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. + */ + listApiDeploymentRevisionsStream( + request?: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, + 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({ + name: request.name || '', + }); + const defaultCallSettings = this._defaults['listApiDeploymentRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApiDeploymentRevisions.createStream( + this.innerApiCalls.listApiDeploymentRevisions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listApiDeploymentRevisions`, 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.name + * Required. The name of the deployment to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return per page. + * @param {string} request.pageToken + * The page token, received from a previous ListApiDeploymentRevisions call. + * Provide this to retrieve the subsequent page. + * @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 + * [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. 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/registry.list_api_deployment_revisions.js + * region_tag:apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_async + */ + listApiDeploymentRevisionsAsync( + request?: protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, + 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({ + name: request.name || '', + }); + const defaultCallSettings = this._defaults['listApiDeploymentRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listApiDeploymentRevisions.asyncIterate( + this.innerApiCalls['listApiDeploymentRevisions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * ListArtifacts returns matching artifacts. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of artifacts. + * Format: {parent} + * @param {number} request.pageSize + * The maximum number of artifacts to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListArtifacts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListArtifacts` must + * match the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields except contents. + * @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 [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact}. + * 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 `listArtifactsAsync()` + * 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. + */ + listArtifacts( + request?: protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IArtifact[], + protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListArtifactsResponse + ] + >; + listArtifacts( + request: protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest, + | protos.google.cloud.apigeeregistry.v1.IListArtifactsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IArtifact + > + ): void; + listArtifacts( + request: protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest, + callback: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest, + | protos.google.cloud.apigeeregistry.v1.IListArtifactsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IArtifact + > + ): void; + listArtifacts( + request?: protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest, + | protos.google.cloud.apigeeregistry.v1.IListArtifactsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IArtifact + >, + callback?: PaginationCallback< + protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest, + | protos.google.cloud.apigeeregistry.v1.IListArtifactsResponse + | null + | undefined, + protos.google.cloud.apigeeregistry.v1.IArtifact + > + ): Promise< + [ + protos.google.cloud.apigeeregistry.v1.IArtifact[], + protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest | null, + protos.google.cloud.apigeeregistry.v1.IListArtifactsResponse + ] + > | 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.listArtifacts(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 artifacts. + * Format: {parent} + * @param {number} request.pageSize + * The maximum number of artifacts to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListArtifacts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListArtifacts` must + * match the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields except contents. + * @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 [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact} 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 `listArtifactsAsync()` + * 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. + */ + listArtifactsStream( + request?: protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest, + 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['listArtifacts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listArtifacts.createStream( + this.innerApiCalls.listArtifacts as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listArtifacts`, 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 artifacts. + * Format: {parent} + * @param {number} request.pageSize + * The maximum number of artifacts to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListArtifacts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListArtifacts` must + * match the call that provided the page token. + * @param {string} request.filter + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields except contents. + * @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 + * [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact}. 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/registry.list_artifacts.js + * region_tag:apigeeregistry_v1_generated_Registry_ListArtifacts_async + */ + listArtifactsAsync( + request?: protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest, + 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['listArtifacts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listArtifacts.asyncIterate( + this.innerApiCalls['listArtifacts'] as GaxCall, + request as unknown as RequestType, + 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 api resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @returns {string} Resource name string. + */ + apiPath(project: string, location: string, api: string) { + return this.pathTemplates.apiPathTemplate.render({ + project: project, + location: location, + api: api, + }); + } + + /** + * Parse the project from Api resource. + * + * @param {string} apiName + * A fully-qualified path representing Api resource. + * @returns {string} A string representing the project. + */ + matchProjectFromApiName(apiName: string) { + return this.pathTemplates.apiPathTemplate.match(apiName).project; + } + + /** + * Parse the location from Api resource. + * + * @param {string} apiName + * A fully-qualified path representing Api resource. + * @returns {string} A string representing the location. + */ + matchLocationFromApiName(apiName: string) { + return this.pathTemplates.apiPathTemplate.match(apiName).location; + } + + /** + * Parse the api from Api resource. + * + * @param {string} apiName + * A fully-qualified path representing Api resource. + * @returns {string} A string representing the api. + */ + matchApiFromApiName(apiName: string) { + return this.pathTemplates.apiPathTemplate.match(apiName).api; + } + + /** + * Return a fully-qualified apiDeployment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} deployment + * @returns {string} Resource name string. + */ + apiDeploymentPath( + project: string, + location: string, + api: string, + deployment: string + ) { + return this.pathTemplates.apiDeploymentPathTemplate.render({ + project: project, + location: location, + api: api, + deployment: deployment, + }); + } + + /** + * Parse the project from ApiDeployment resource. + * + * @param {string} apiDeploymentName + * A fully-qualified path representing ApiDeployment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromApiDeploymentName(apiDeploymentName: string) { + return this.pathTemplates.apiDeploymentPathTemplate.match(apiDeploymentName) + .project; + } + + /** + * Parse the location from ApiDeployment resource. + * + * @param {string} apiDeploymentName + * A fully-qualified path representing ApiDeployment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromApiDeploymentName(apiDeploymentName: string) { + return this.pathTemplates.apiDeploymentPathTemplate.match(apiDeploymentName) + .location; + } + + /** + * Parse the api from ApiDeployment resource. + * + * @param {string} apiDeploymentName + * A fully-qualified path representing ApiDeployment resource. + * @returns {string} A string representing the api. + */ + matchApiFromApiDeploymentName(apiDeploymentName: string) { + return this.pathTemplates.apiDeploymentPathTemplate.match(apiDeploymentName) + .api; + } + + /** + * Parse the deployment from ApiDeployment resource. + * + * @param {string} apiDeploymentName + * A fully-qualified path representing ApiDeployment resource. + * @returns {string} A string representing the deployment. + */ + matchDeploymentFromApiDeploymentName(apiDeploymentName: string) { + return this.pathTemplates.apiDeploymentPathTemplate.match(apiDeploymentName) + .deployment; + } + + /** + * Return a fully-qualified apiSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} version + * @param {string} spec + * @returns {string} Resource name string. + */ + apiSpecPath( + project: string, + location: string, + api: string, + version: string, + spec: string + ) { + return this.pathTemplates.apiSpecPathTemplate.render({ + project: project, + location: location, + api: api, + version: version, + spec: spec, + }); + } + + /** + * Parse the project from ApiSpec resource. + * + * @param {string} apiSpecName + * A fully-qualified path representing ApiSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromApiSpecName(apiSpecName: string) { + return this.pathTemplates.apiSpecPathTemplate.match(apiSpecName).project; + } + + /** + * Parse the location from ApiSpec resource. + * + * @param {string} apiSpecName + * A fully-qualified path representing ApiSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromApiSpecName(apiSpecName: string) { + return this.pathTemplates.apiSpecPathTemplate.match(apiSpecName).location; + } + + /** + * Parse the api from ApiSpec resource. + * + * @param {string} apiSpecName + * A fully-qualified path representing ApiSpec resource. + * @returns {string} A string representing the api. + */ + matchApiFromApiSpecName(apiSpecName: string) { + return this.pathTemplates.apiSpecPathTemplate.match(apiSpecName).api; + } + + /** + * Parse the version from ApiSpec resource. + * + * @param {string} apiSpecName + * A fully-qualified path representing ApiSpec resource. + * @returns {string} A string representing the version. + */ + matchVersionFromApiSpecName(apiSpecName: string) { + return this.pathTemplates.apiSpecPathTemplate.match(apiSpecName).version; + } + + /** + * Parse the spec from ApiSpec resource. + * + * @param {string} apiSpecName + * A fully-qualified path representing ApiSpec resource. + * @returns {string} A string representing the spec. + */ + matchSpecFromApiSpecName(apiSpecName: string) { + return this.pathTemplates.apiSpecPathTemplate.match(apiSpecName).spec; + } + + /** + * Return a fully-qualified apiVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} version + * @returns {string} Resource name string. + */ + apiVersionPath( + project: string, + location: string, + api: string, + version: string + ) { + return this.pathTemplates.apiVersionPathTemplate.render({ + project: project, + location: location, + api: api, + version: version, + }); + } + + /** + * Parse the project from ApiVersion resource. + * + * @param {string} apiVersionName + * A fully-qualified path representing ApiVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromApiVersionName(apiVersionName: string) { + return this.pathTemplates.apiVersionPathTemplate.match(apiVersionName) + .project; + } + + /** + * Parse the location from ApiVersion resource. + * + * @param {string} apiVersionName + * A fully-qualified path representing ApiVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromApiVersionName(apiVersionName: string) { + return this.pathTemplates.apiVersionPathTemplate.match(apiVersionName) + .location; + } + + /** + * Parse the api from ApiVersion resource. + * + * @param {string} apiVersionName + * A fully-qualified path representing ApiVersion resource. + * @returns {string} A string representing the api. + */ + matchApiFromApiVersionName(apiVersionName: string) { + return this.pathTemplates.apiVersionPathTemplate.match(apiVersionName).api; + } + + /** + * Parse the version from ApiVersion resource. + * + * @param {string} apiVersionName + * A fully-qualified path representing ApiVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromApiVersionName(apiVersionName: string) { + return this.pathTemplates.apiVersionPathTemplate.match(apiVersionName) + .version; + } + + /** + * Return a fully-qualified instance resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @returns {string} Resource name string. + */ + instancePath(project: string, location: string, instance: string) { + return this.pathTemplates.instancePathTemplate.render({ + project: project, + location: location, + instance: instance, + }); + } + + /** + * Parse the project from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).project; + } + + /** + * Parse the location from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the location. + */ + matchLocationFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).location; + } + + /** + * Parse the instance from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).instance; + } + + /** + * 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 projectLocationApiArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} artifact + * @returns {string} Resource name string. + */ + projectLocationApiArtifactPath( + project: string, + location: string, + api: string, + artifact: string + ) { + return this.pathTemplates.projectLocationApiArtifactPathTemplate.render({ + project: project, + location: location, + api: api, + artifact: artifact, + }); + } + + /** + * Parse the project from ProjectLocationApiArtifact resource. + * + * @param {string} projectLocationApiArtifactName + * A fully-qualified path representing project_location_api_artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationApiArtifactName( + projectLocationApiArtifactName: string + ) { + return this.pathTemplates.projectLocationApiArtifactPathTemplate.match( + projectLocationApiArtifactName + ).project; + } + + /** + * Parse the location from ProjectLocationApiArtifact resource. + * + * @param {string} projectLocationApiArtifactName + * A fully-qualified path representing project_location_api_artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationApiArtifactName( + projectLocationApiArtifactName: string + ) { + return this.pathTemplates.projectLocationApiArtifactPathTemplate.match( + projectLocationApiArtifactName + ).location; + } + + /** + * Parse the api from ProjectLocationApiArtifact resource. + * + * @param {string} projectLocationApiArtifactName + * A fully-qualified path representing project_location_api_artifact resource. + * @returns {string} A string representing the api. + */ + matchApiFromProjectLocationApiArtifactName( + projectLocationApiArtifactName: string + ) { + return this.pathTemplates.projectLocationApiArtifactPathTemplate.match( + projectLocationApiArtifactName + ).api; + } + + /** + * Parse the artifact from ProjectLocationApiArtifact resource. + * + * @param {string} projectLocationApiArtifactName + * A fully-qualified path representing project_location_api_artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromProjectLocationApiArtifactName( + projectLocationApiArtifactName: string + ) { + return this.pathTemplates.projectLocationApiArtifactPathTemplate.match( + projectLocationApiArtifactName + ).artifact; + } + + /** + * Return a fully-qualified projectLocationApiDeploymentArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} deployment + * @param {string} artifact + * @returns {string} Resource name string. + */ + projectLocationApiDeploymentArtifactPath( + project: string, + location: string, + api: string, + deployment: string, + artifact: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.render( + { + project: project, + location: location, + api: api, + deployment: deployment, + artifact: artifact, + } + ); + } + + /** + * Parse the project from ProjectLocationApiDeploymentArtifact resource. + * + * @param {string} projectLocationApiDeploymentArtifactName + * A fully-qualified path representing project_location_api_deployment_artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationApiDeploymentArtifactName( + projectLocationApiDeploymentArtifactName: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match( + projectLocationApiDeploymentArtifactName + ).project; + } + + /** + * Parse the location from ProjectLocationApiDeploymentArtifact resource. + * + * @param {string} projectLocationApiDeploymentArtifactName + * A fully-qualified path representing project_location_api_deployment_artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationApiDeploymentArtifactName( + projectLocationApiDeploymentArtifactName: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match( + projectLocationApiDeploymentArtifactName + ).location; + } + + /** + * Parse the api from ProjectLocationApiDeploymentArtifact resource. + * + * @param {string} projectLocationApiDeploymentArtifactName + * A fully-qualified path representing project_location_api_deployment_artifact resource. + * @returns {string} A string representing the api. + */ + matchApiFromProjectLocationApiDeploymentArtifactName( + projectLocationApiDeploymentArtifactName: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match( + projectLocationApiDeploymentArtifactName + ).api; + } + + /** + * Parse the deployment from ProjectLocationApiDeploymentArtifact resource. + * + * @param {string} projectLocationApiDeploymentArtifactName + * A fully-qualified path representing project_location_api_deployment_artifact resource. + * @returns {string} A string representing the deployment. + */ + matchDeploymentFromProjectLocationApiDeploymentArtifactName( + projectLocationApiDeploymentArtifactName: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match( + projectLocationApiDeploymentArtifactName + ).deployment; + } + + /** + * Parse the artifact from ProjectLocationApiDeploymentArtifact resource. + * + * @param {string} projectLocationApiDeploymentArtifactName + * A fully-qualified path representing project_location_api_deployment_artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromProjectLocationApiDeploymentArtifactName( + projectLocationApiDeploymentArtifactName: string + ) { + return this.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match( + projectLocationApiDeploymentArtifactName + ).artifact; + } + + /** + * Return a fully-qualified projectLocationApiVersionArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} version + * @param {string} artifact + * @returns {string} Resource name string. + */ + projectLocationApiVersionArtifactPath( + project: string, + location: string, + api: string, + version: string, + artifact: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.render( + { + project: project, + location: location, + api: api, + version: version, + artifact: artifact, + } + ); + } + + /** + * Parse the project from ProjectLocationApiVersionArtifact resource. + * + * @param {string} projectLocationApiVersionArtifactName + * A fully-qualified path representing project_location_api_version_artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationApiVersionArtifactName( + projectLocationApiVersionArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match( + projectLocationApiVersionArtifactName + ).project; + } + + /** + * Parse the location from ProjectLocationApiVersionArtifact resource. + * + * @param {string} projectLocationApiVersionArtifactName + * A fully-qualified path representing project_location_api_version_artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationApiVersionArtifactName( + projectLocationApiVersionArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match( + projectLocationApiVersionArtifactName + ).location; + } + + /** + * Parse the api from ProjectLocationApiVersionArtifact resource. + * + * @param {string} projectLocationApiVersionArtifactName + * A fully-qualified path representing project_location_api_version_artifact resource. + * @returns {string} A string representing the api. + */ + matchApiFromProjectLocationApiVersionArtifactName( + projectLocationApiVersionArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match( + projectLocationApiVersionArtifactName + ).api; + } + + /** + * Parse the version from ProjectLocationApiVersionArtifact resource. + * + * @param {string} projectLocationApiVersionArtifactName + * A fully-qualified path representing project_location_api_version_artifact resource. + * @returns {string} A string representing the version. + */ + matchVersionFromProjectLocationApiVersionArtifactName( + projectLocationApiVersionArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match( + projectLocationApiVersionArtifactName + ).version; + } + + /** + * Parse the artifact from ProjectLocationApiVersionArtifact resource. + * + * @param {string} projectLocationApiVersionArtifactName + * A fully-qualified path representing project_location_api_version_artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromProjectLocationApiVersionArtifactName( + projectLocationApiVersionArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match( + projectLocationApiVersionArtifactName + ).artifact; + } + + /** + * Return a fully-qualified projectLocationApiVersionSpecArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} api + * @param {string} version + * @param {string} spec + * @param {string} artifact + * @returns {string} Resource name string. + */ + projectLocationApiVersionSpecArtifactPath( + project: string, + location: string, + api: string, + version: string, + spec: string, + artifact: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.render( + { + project: project, + location: location, + api: api, + version: version, + spec: spec, + artifact: artifact, + } + ); + } + + /** + * Parse the project from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).project; + } + + /** + * Parse the location from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).location; + } + + /** + * Parse the api from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the api. + */ + matchApiFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).api; + } + + /** + * Parse the version from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the version. + */ + matchVersionFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).version; + } + + /** + * Parse the spec from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the spec. + */ + matchSpecFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).spec; + } + + /** + * Parse the artifact from ProjectLocationApiVersionSpecArtifact resource. + * + * @param {string} projectLocationApiVersionSpecArtifactName + * A fully-qualified path representing project_location_api_version_spec_artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromProjectLocationApiVersionSpecArtifactName( + projectLocationApiVersionSpecArtifactName: string + ) { + return this.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match( + projectLocationApiVersionSpecArtifactName + ).artifact; + } + + /** + * Return a fully-qualified projectLocationArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} artifact + * @returns {string} Resource name string. + */ + projectLocationArtifactPath( + project: string, + location: string, + artifact: string + ) { + return this.pathTemplates.projectLocationArtifactPathTemplate.render({ + project: project, + location: location, + artifact: artifact, + }); + } + + /** + * Parse the project from ProjectLocationArtifact resource. + * + * @param {string} projectLocationArtifactName + * A fully-qualified path representing project_location_artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationArtifactName( + projectLocationArtifactName: string + ) { + return this.pathTemplates.projectLocationArtifactPathTemplate.match( + projectLocationArtifactName + ).project; + } + + /** + * Parse the location from ProjectLocationArtifact resource. + * + * @param {string} projectLocationArtifactName + * A fully-qualified path representing project_location_artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationArtifactName( + projectLocationArtifactName: string + ) { + return this.pathTemplates.projectLocationArtifactPathTemplate.match( + projectLocationArtifactName + ).location; + } + + /** + * Parse the artifact from ProjectLocationArtifact resource. + * + * @param {string} projectLocationArtifactName + * A fully-qualified path representing project_location_artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromProjectLocationArtifactName( + projectLocationArtifactName: string + ) { + return this.pathTemplates.projectLocationArtifactPathTemplate.match( + projectLocationArtifactName + ).artifact; + } + + /** + * 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 { + if (this.registryStub && !this._terminated) { + return this.registryStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_client_config.json b/packages/google-cloud-apigeeregistry/src/v1/registry_client_config.json new file mode 100644 index 00000000000..ac2098f7936 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_client_config.json @@ -0,0 +1,213 @@ +{ + "interfaces": { + "google.cloud.apigeeregistry.v1.Registry": { + "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": { + "ListApis": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetApi": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateApi": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateApi": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteApi": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListApiVersions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetApiVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateApiVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateApiVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteApiVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListApiSpecs": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetApiSpec": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetApiSpecContents": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateApiSpec": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateApiSpec": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteApiSpec": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "TagApiSpecRevision": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListApiSpecRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "RollbackApiSpec": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteApiSpecRevision": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListApiDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetApiDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateApiDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateApiDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteApiDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "TagApiDeploymentRevision": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListApiDeploymentRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "RollbackApiDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteApiDeploymentRevision": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListArtifacts": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetArtifact": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetArtifactContents": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateArtifact": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ReplaceArtifact": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteArtifact": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_proto_list.json b/packages/google-cloud-apigeeregistry/src/v1/registry_proto_list.json new file mode 100644 index 00000000000..4fdc846ee2b --- /dev/null +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/apigeeregistry/v1/provisioning_service.proto", + "../../protos/google/cloud/apigeeregistry/v1/registry_models.proto", + "../../protos/google/cloud/apigeeregistry/v1/registry_service.proto" +] diff --git a/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.js b/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..c118c1f62a2 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/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 apigeeregistry = require('@google-cloud/apigeeregistry'); + +function main() { + const provisioningClient = new apigeeregistry.ProvisioningClient(); + const registryClient = new apigeeregistry.RegistryClient(); +} + +main(); diff --git a/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..c80465abb99 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.ts @@ -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 +// +// 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 {ProvisioningClient, RegistryClient} from '@google-cloud/apigeeregistry'; + +// check that the client class type name can be used +function doStuffWithProvisioningClient(client: ProvisioningClient) { + client.close(); +} +function doStuffWithRegistryClient(client: RegistryClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const provisioningClient = new ProvisioningClient(); + doStuffWithProvisioningClient(provisioningClient); + // check that the client instance can be created + const registryClient = new RegistryClient(); + doStuffWithRegistryClient(registryClient); +} + +main(); diff --git a/packages/google-cloud-apigeeregistry/system-test/install.ts b/packages/google-cloud-apigeeregistry/system-test/install.ts new file mode 100644 index 00000000000..6dd1eaadafa --- /dev/null +++ b/packages/google-cloud-apigeeregistry/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-apigeeregistry/test/gapic_provisioning_v1.ts b/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts new file mode 100644 index 00000000000..060266212ae --- /dev/null +++ b/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts @@ -0,0 +1,2520 @@ +// 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 provisioningModule from '../src'; + +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} 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 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.ProvisioningClient', () => { + it('has servicePath', () => { + const servicePath = provisioningModule.v1.ProvisioningClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = provisioningModule.v1.ProvisioningClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = provisioningModule.v1.ProvisioningClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new provisioningModule.v1.ProvisioningClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new provisioningModule.v1.ProvisioningClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.provisioningStub, undefined); + await client.initialize(); + assert(client.provisioningStub); + }); + + it('has close method for the initialized client', done => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.provisioningStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.provisioningStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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('getInstance', () => { + it('invokes getInstance without error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Instance() + ); + client.innerApiCalls.getInstance = stubSimpleCall(expectedResponse); + const [response] = await client.getInstance(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getInstance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getInstance without error using callback', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Instance() + ); + client.innerApiCalls.getInstance = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getInstance( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IInstance | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getInstance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getInstance with error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getInstance = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getInstance(request), expectedError); + assert( + (client.innerApiCalls.getInstance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getInstance with closed client', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getInstance(request), expectedError); + }); + }); + + describe('createInstance', () => { + it('invokes createInstance without error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createInstance = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createInstance(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createInstance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createInstance without error using callback', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createInstance = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createInstance( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.apigeeregistry.v1.IInstance, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.apigeeregistry.v1.IInstance, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createInstance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createInstance with call error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createInstance = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createInstance(request), expectedError); + assert( + (client.innerApiCalls.createInstance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createInstance with LRO error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createInstance = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createInstance(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createInstance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateInstanceProgress without error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + 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.checkCreateInstanceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateInstanceProgress with error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + 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.checkCreateInstanceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteInstance', () => { + it('invokes deleteInstance without error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteInstance = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteInstance(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteInstance without error using callback', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteInstance = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteInstance( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.apigeeregistry.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteInstance with call error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteInstance = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteInstance(request), expectedError); + assert( + (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteInstance with LRO error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteInstance = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteInstance(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteInstanceProgress without error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + 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.checkDeleteInstanceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteInstanceProgress with error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + 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.checkDeleteInstanceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + 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.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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('api', () => { + const fakePath = '/rendered/path/api'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + }; + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.apiPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.apiPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('apiPath', () => { + const result = client.apiPath( + 'projectValue', + 'locationValue', + 'apiValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.apiPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromApiName', () => { + const result = client.matchProjectFromApiName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.apiPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromApiName', () => { + const result = client.matchLocationFromApiName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.apiPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromApiName', () => { + const result = client.matchApiFromApiName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + (client.pathTemplates.apiPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('apiDeployment', () => { + const fakePath = '/rendered/path/apiDeployment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + deployment: 'deploymentValue', + }; + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.apiDeploymentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.apiDeploymentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('apiDeploymentPath', () => { + const result = client.apiDeploymentPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'deploymentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.apiDeploymentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromApiDeploymentName', () => { + const result = client.matchProjectFromApiDeploymentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.apiDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromApiDeploymentName', () => { + const result = client.matchLocationFromApiDeploymentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.apiDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromApiDeploymentName', () => { + const result = client.matchApiFromApiDeploymentName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + (client.pathTemplates.apiDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeploymentFromApiDeploymentName', () => { + const result = client.matchDeploymentFromApiDeploymentName(fakePath); + assert.strictEqual(result, 'deploymentValue'); + assert( + (client.pathTemplates.apiDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('apiSpec', () => { + const fakePath = '/rendered/path/apiSpec'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + version: 'versionValue', + spec: 'specValue', + }; + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.apiSpecPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.apiSpecPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('apiSpecPath', () => { + const result = client.apiSpecPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'versionValue', + 'specValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.apiSpecPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromApiSpecName', () => { + const result = client.matchProjectFromApiSpecName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.apiSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromApiSpecName', () => { + const result = client.matchLocationFromApiSpecName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.apiSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromApiSpecName', () => { + const result = client.matchApiFromApiSpecName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + (client.pathTemplates.apiSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromApiSpecName', () => { + const result = client.matchVersionFromApiSpecName(fakePath); + assert.strictEqual(result, 'versionValue'); + assert( + (client.pathTemplates.apiSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSpecFromApiSpecName', () => { + const result = client.matchSpecFromApiSpecName(fakePath); + assert.strictEqual(result, 'specValue'); + assert( + (client.pathTemplates.apiSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('apiVersion', () => { + const fakePath = '/rendered/path/apiVersion'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + version: 'versionValue', + }; + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.apiVersionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.apiVersionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('apiVersionPath', () => { + const result = client.apiVersionPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'versionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.apiVersionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromApiVersionName', () => { + const result = client.matchProjectFromApiVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.apiVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromApiVersionName', () => { + const result = client.matchLocationFromApiVersionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.apiVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromApiVersionName', () => { + const result = client.matchApiFromApiVersionName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + (client.pathTemplates.apiVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromApiVersionName', () => { + const result = client.matchVersionFromApiVersionName(fakePath); + assert.strictEqual(result, 'versionValue'); + assert( + (client.pathTemplates.apiVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('instance', () => { + const fakePath = '/rendered/path/instance'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + }; + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.instancePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.instancePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('instancePath', () => { + const result = client.instancePath( + 'projectValue', + 'locationValue', + 'instanceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.instancePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromInstanceName', () => { + const result = client.matchProjectFromInstanceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromInstanceName', () => { + const result = client.matchLocationFromInstanceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromInstanceName', () => { + const result = client.matchInstanceFromInstanceName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new provisioningModule.v1.ProvisioningClient({ + 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('projectLocationApiArtifact', () => { + const fakePath = '/rendered/path/projectLocationApiArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + artifact: 'artifactValue', + }; + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationApiArtifactPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationApiArtifactPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationApiArtifactPath', () => { + const result = client.projectLocationApiArtifactPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationApiArtifactPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationApiArtifactName', () => { + const result = + client.matchProjectFromProjectLocationApiArtifactName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationApiArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationApiArtifactName', () => { + const result = + client.matchLocationFromProjectLocationApiArtifactName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationApiArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromProjectLocationApiArtifactName', () => { + const result = + client.matchApiFromProjectLocationApiArtifactName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + ( + client.pathTemplates.projectLocationApiArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromProjectLocationApiArtifactName', () => { + const result = + client.matchArtifactFromProjectLocationApiArtifactName(fakePath); + assert.strictEqual(result, 'artifactValue'); + assert( + ( + client.pathTemplates.projectLocationApiArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationApiDeploymentArtifact', () => { + const fakePath = '/rendered/path/projectLocationApiDeploymentArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + deployment: 'deploymentValue', + artifact: 'artifactValue', + }; + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationApiDeploymentArtifactPath', () => { + const result = client.projectLocationApiDeploymentArtifactPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'deploymentValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationApiDeploymentArtifactName', () => { + const result = + client.matchProjectFromProjectLocationApiDeploymentArtifactName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationApiDeploymentArtifactName', () => { + const result = + client.matchLocationFromProjectLocationApiDeploymentArtifactName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromProjectLocationApiDeploymentArtifactName', () => { + const result = + client.matchApiFromProjectLocationApiDeploymentArtifactName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeploymentFromProjectLocationApiDeploymentArtifactName', () => { + const result = + client.matchDeploymentFromProjectLocationApiDeploymentArtifactName( + fakePath + ); + assert.strictEqual(result, 'deploymentValue'); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromProjectLocationApiDeploymentArtifactName', () => { + const result = + client.matchArtifactFromProjectLocationApiDeploymentArtifactName( + fakePath + ); + assert.strictEqual(result, 'artifactValue'); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationApiVersionArtifact', () => { + const fakePath = '/rendered/path/projectLocationApiVersionArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + version: 'versionValue', + artifact: 'artifactValue', + }; + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationApiVersionArtifactPath', () => { + const result = client.projectLocationApiVersionArtifactPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'versionValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationApiVersionArtifactName', () => { + const result = + client.matchProjectFromProjectLocationApiVersionArtifactName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationApiVersionArtifactName', () => { + const result = + client.matchLocationFromProjectLocationApiVersionArtifactName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromProjectLocationApiVersionArtifactName', () => { + const result = + client.matchApiFromProjectLocationApiVersionArtifactName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromProjectLocationApiVersionArtifactName', () => { + const result = + client.matchVersionFromProjectLocationApiVersionArtifactName( + fakePath + ); + assert.strictEqual(result, 'versionValue'); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromProjectLocationApiVersionArtifactName', () => { + const result = + client.matchArtifactFromProjectLocationApiVersionArtifactName( + fakePath + ); + assert.strictEqual(result, 'artifactValue'); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationApiVersionSpecArtifact', () => { + const fakePath = '/rendered/path/projectLocationApiVersionSpecArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + version: 'versionValue', + spec: 'specValue', + artifact: 'artifactValue', + }; + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationApiVersionSpecArtifactPath', () => { + const result = client.projectLocationApiVersionSpecArtifactPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'versionValue', + 'specValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchProjectFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchLocationFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchApiFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'apiValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchVersionFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'versionValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSpecFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchSpecFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'specValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchArtifactFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'artifactValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationArtifact', () => { + const fakePath = '/rendered/path/projectLocationArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + artifact: 'artifactValue', + }; + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationArtifactPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationArtifactPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationArtifactPath', () => { + const result = client.projectLocationArtifactPath( + 'projectValue', + 'locationValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationArtifactPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationArtifactName', () => { + const result = + client.matchProjectFromProjectLocationArtifactName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationArtifactName', () => { + const result = + client.matchLocationFromProjectLocationArtifactName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromProjectLocationArtifactName', () => { + const result = + client.matchArtifactFromProjectLocationArtifactName(fakePath); + assert.strictEqual(result, 'artifactValue'); + assert( + ( + client.pathTemplates.projectLocationArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts b/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts new file mode 100644 index 00000000000..db39c09f115 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts @@ -0,0 +1,7757 @@ +// 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 registryModule from '../src'; + +import {PassThrough} from 'stream'; + +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} 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.RegistryClient', () => { + it('has servicePath', () => { + const servicePath = registryModule.v1.RegistryClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = registryModule.v1.RegistryClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = registryModule.v1.RegistryClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new registryModule.v1.RegistryClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new registryModule.v1.RegistryClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.registryStub, undefined); + await client.initialize(); + assert(client.registryStub); + }); + + it('has close method for the initialized client', done => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.registryStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.registryStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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('getApi', () => { + it('invokes getApi without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Api() + ); + client.innerApiCalls.getApi = stubSimpleCall(expectedResponse); + const [response] = await client.getApi(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getApi without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Api() + ); + client.innerApiCalls.getApi = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getApi( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApi | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getApi with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getApi = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getApi(request), expectedError); + assert( + (client.innerApiCalls.getApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getApi with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getApi(request), expectedError); + }); + }); + + describe('createApi', () => { + it('invokes createApi without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Api() + ); + client.innerApiCalls.createApi = stubSimpleCall(expectedResponse); + const [response] = await client.createApi(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createApi without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Api() + ); + client.innerApiCalls.createApi = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createApi( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApi | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createApi with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createApi = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createApi(request), expectedError); + assert( + (client.innerApiCalls.createApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createApi with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createApi(request), expectedError); + }); + }); + + describe('updateApi', () => { + it('invokes updateApi without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() + ); + request.api = {}; + request.api.name = ''; + const expectedHeaderRequestParams = 'api.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Api() + ); + client.innerApiCalls.updateApi = stubSimpleCall(expectedResponse); + const [response] = await client.updateApi(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateApi without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() + ); + request.api = {}; + request.api.name = ''; + const expectedHeaderRequestParams = 'api.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Api() + ); + client.innerApiCalls.updateApi = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateApi( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApi | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateApi with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() + ); + request.api = {}; + request.api.name = ''; + const expectedHeaderRequestParams = 'api.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateApi = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateApi(request), expectedError); + assert( + (client.innerApiCalls.updateApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateApi with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() + ); + request.api = {}; + request.api.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateApi(request), expectedError); + }); + }); + + describe('deleteApi', () => { + it('invokes deleteApi without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteApi = stubSimpleCall(expectedResponse); + const [response] = await client.deleteApi(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApi without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteApi = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteApi( + 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.deleteApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteApi with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteApi = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteApi(request), expectedError); + assert( + (client.innerApiCalls.deleteApi as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApi with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteApi(request), expectedError); + }); + }); + + describe('getApiVersion', () => { + it('invokes getApiVersion without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ); + client.innerApiCalls.getApiVersion = stubSimpleCall(expectedResponse); + const [response] = await client.getApiVersion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getApiVersion without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ); + client.innerApiCalls.getApiVersion = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getApiVersion( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiVersion | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getApiVersion with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getApiVersion = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getApiVersion(request), expectedError); + assert( + (client.innerApiCalls.getApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getApiVersion with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getApiVersion(request), expectedError); + }); + }); + + describe('createApiVersion', () => { + it('invokes createApiVersion without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ); + client.innerApiCalls.createApiVersion = stubSimpleCall(expectedResponse); + const [response] = await client.createApiVersion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createApiVersion without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ); + client.innerApiCalls.createApiVersion = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createApiVersion( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiVersion | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createApiVersion with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createApiVersion = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createApiVersion(request), expectedError); + assert( + (client.innerApiCalls.createApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createApiVersion with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createApiVersion(request), expectedError); + }); + }); + + describe('updateApiVersion', () => { + it('invokes updateApiVersion without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() + ); + request.apiVersion = {}; + request.apiVersion.name = ''; + const expectedHeaderRequestParams = 'api_version.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ); + client.innerApiCalls.updateApiVersion = stubSimpleCall(expectedResponse); + const [response] = await client.updateApiVersion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateApiVersion without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() + ); + request.apiVersion = {}; + request.apiVersion.name = ''; + const expectedHeaderRequestParams = 'api_version.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ); + client.innerApiCalls.updateApiVersion = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateApiVersion( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiVersion | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateApiVersion with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() + ); + request.apiVersion = {}; + request.apiVersion.name = ''; + const expectedHeaderRequestParams = 'api_version.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateApiVersion = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateApiVersion(request), expectedError); + assert( + (client.innerApiCalls.updateApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateApiVersion with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() + ); + request.apiVersion = {}; + request.apiVersion.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateApiVersion(request), expectedError); + }); + }); + + describe('deleteApiVersion', () => { + it('invokes deleteApiVersion without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteApiVersion = stubSimpleCall(expectedResponse); + const [response] = await client.deleteApiVersion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApiVersion without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteApiVersion = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteApiVersion( + 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.deleteApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteApiVersion with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteApiVersion = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteApiVersion(request), expectedError); + assert( + (client.innerApiCalls.deleteApiVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApiVersion with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteApiVersion(request), expectedError); + }); + }); + + describe('getApiSpec', () => { + it('invokes getApiSpec without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.getApiSpec = stubSimpleCall(expectedResponse); + const [response] = await client.getApiSpec(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getApiSpec without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.getApiSpec = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getApiSpec( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiSpec | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getApiSpec with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getApiSpec = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getApiSpec(request), expectedError); + assert( + (client.innerApiCalls.getApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getApiSpec with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getApiSpec(request), expectedError); + }); + }); + + describe('getApiSpecContents', () => { + it('invokes getApiSpecContents without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.getApiSpecContents = + stubSimpleCall(expectedResponse); + const [response] = await client.getApiSpecContents(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getApiSpecContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getApiSpecContents without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.getApiSpecContents = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getApiSpecContents( + 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.getApiSpecContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getApiSpecContents with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getApiSpecContents = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getApiSpecContents(request), expectedError); + assert( + (client.innerApiCalls.getApiSpecContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getApiSpecContents with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getApiSpecContents(request), expectedError); + }); + }); + + describe('createApiSpec', () => { + it('invokes createApiSpec without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.createApiSpec = stubSimpleCall(expectedResponse); + const [response] = await client.createApiSpec(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createApiSpec without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.createApiSpec = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createApiSpec( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiSpec | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createApiSpec with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createApiSpec = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createApiSpec(request), expectedError); + assert( + (client.innerApiCalls.createApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createApiSpec with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createApiSpec(request), expectedError); + }); + }); + + describe('updateApiSpec', () => { + it('invokes updateApiSpec without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() + ); + request.apiSpec = {}; + request.apiSpec.name = ''; + const expectedHeaderRequestParams = 'api_spec.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.updateApiSpec = stubSimpleCall(expectedResponse); + const [response] = await client.updateApiSpec(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateApiSpec without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() + ); + request.apiSpec = {}; + request.apiSpec.name = ''; + const expectedHeaderRequestParams = 'api_spec.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.updateApiSpec = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateApiSpec( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiSpec | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateApiSpec with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() + ); + request.apiSpec = {}; + request.apiSpec.name = ''; + const expectedHeaderRequestParams = 'api_spec.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateApiSpec = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateApiSpec(request), expectedError); + assert( + (client.innerApiCalls.updateApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateApiSpec with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() + ); + request.apiSpec = {}; + request.apiSpec.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateApiSpec(request), expectedError); + }); + }); + + describe('deleteApiSpec', () => { + it('invokes deleteApiSpec without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteApiSpec = stubSimpleCall(expectedResponse); + const [response] = await client.deleteApiSpec(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApiSpec without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteApiSpec = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteApiSpec( + 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.deleteApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteApiSpec with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteApiSpec = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteApiSpec(request), expectedError); + assert( + (client.innerApiCalls.deleteApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApiSpec with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteApiSpec(request), expectedError); + }); + }); + + describe('tagApiSpecRevision', () => { + it('invokes tagApiSpecRevision without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.tagApiSpecRevision = + stubSimpleCall(expectedResponse); + const [response] = await client.tagApiSpecRevision(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.tagApiSpecRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes tagApiSpecRevision without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.tagApiSpecRevision = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.tagApiSpecRevision( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiSpec | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.tagApiSpecRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes tagApiSpecRevision with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.tagApiSpecRevision = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.tagApiSpecRevision(request), expectedError); + assert( + (client.innerApiCalls.tagApiSpecRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes tagApiSpecRevision with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.tagApiSpecRevision(request), expectedError); + }); + }); + + describe('rollbackApiSpec', () => { + it('invokes rollbackApiSpec without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.rollbackApiSpec = stubSimpleCall(expectedResponse); + const [response] = await client.rollbackApiSpec(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.rollbackApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes rollbackApiSpec without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.rollbackApiSpec = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.rollbackApiSpec( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiSpec | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.rollbackApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes rollbackApiSpec with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.rollbackApiSpec = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.rollbackApiSpec(request), expectedError); + assert( + (client.innerApiCalls.rollbackApiSpec as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes rollbackApiSpec with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.rollbackApiSpec(request), expectedError); + }); + }); + + describe('deleteApiSpecRevision', () => { + it('invokes deleteApiSpecRevision without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.deleteApiSpecRevision = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteApiSpecRevision(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteApiSpecRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApiSpecRevision without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ); + client.innerApiCalls.deleteApiSpecRevision = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteApiSpecRevision( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiSpec | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteApiSpecRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteApiSpecRevision with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteApiSpecRevision = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteApiSpecRevision(request), + expectedError + ); + assert( + (client.innerApiCalls.deleteApiSpecRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApiSpecRevision with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteApiSpecRevision(request), + expectedError + ); + }); + }); + + describe('getApiDeployment', () => { + it('invokes getApiDeployment without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.getApiDeployment = stubSimpleCall(expectedResponse); + const [response] = await client.getApiDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getApiDeployment without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.getApiDeployment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getApiDeployment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiDeployment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getApiDeployment with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getApiDeployment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getApiDeployment(request), expectedError); + assert( + (client.innerApiCalls.getApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getApiDeployment with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getApiDeployment(request), expectedError); + }); + }); + + describe('createApiDeployment', () => { + it('invokes createApiDeployment without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.createApiDeployment = + stubSimpleCall(expectedResponse); + const [response] = await client.createApiDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createApiDeployment without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.createApiDeployment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createApiDeployment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiDeployment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createApiDeployment with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createApiDeployment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createApiDeployment(request), expectedError); + assert( + (client.innerApiCalls.createApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createApiDeployment with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createApiDeployment(request), expectedError); + }); + }); + + describe('updateApiDeployment', () => { + it('invokes updateApiDeployment without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() + ); + request.apiDeployment = {}; + request.apiDeployment.name = ''; + const expectedHeaderRequestParams = 'api_deployment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.updateApiDeployment = + stubSimpleCall(expectedResponse); + const [response] = await client.updateApiDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateApiDeployment without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() + ); + request.apiDeployment = {}; + request.apiDeployment.name = ''; + const expectedHeaderRequestParams = 'api_deployment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.updateApiDeployment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateApiDeployment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiDeployment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateApiDeployment with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() + ); + request.apiDeployment = {}; + request.apiDeployment.name = ''; + const expectedHeaderRequestParams = 'api_deployment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateApiDeployment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateApiDeployment(request), expectedError); + assert( + (client.innerApiCalls.updateApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateApiDeployment with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() + ); + request.apiDeployment = {}; + request.apiDeployment.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateApiDeployment(request), expectedError); + }); + }); + + describe('deleteApiDeployment', () => { + it('invokes deleteApiDeployment without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteApiDeployment = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteApiDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApiDeployment without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteApiDeployment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteApiDeployment( + 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.deleteApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteApiDeployment with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteApiDeployment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteApiDeployment(request), expectedError); + assert( + (client.innerApiCalls.deleteApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApiDeployment with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteApiDeployment(request), expectedError); + }); + }); + + describe('tagApiDeploymentRevision', () => { + it('invokes tagApiDeploymentRevision without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.tagApiDeploymentRevision = + stubSimpleCall(expectedResponse); + const [response] = await client.tagApiDeploymentRevision(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.tagApiDeploymentRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes tagApiDeploymentRevision without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.tagApiDeploymentRevision = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.tagApiDeploymentRevision( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiDeployment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.tagApiDeploymentRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes tagApiDeploymentRevision with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.tagApiDeploymentRevision = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.tagApiDeploymentRevision(request), + expectedError + ); + assert( + (client.innerApiCalls.tagApiDeploymentRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes tagApiDeploymentRevision with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.tagApiDeploymentRevision(request), + expectedError + ); + }); + }); + + describe('rollbackApiDeployment', () => { + it('invokes rollbackApiDeployment without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.rollbackApiDeployment = + stubSimpleCall(expectedResponse); + const [response] = await client.rollbackApiDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.rollbackApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes rollbackApiDeployment without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.rollbackApiDeployment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.rollbackApiDeployment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiDeployment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.rollbackApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes rollbackApiDeployment with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.rollbackApiDeployment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.rollbackApiDeployment(request), + expectedError + ); + assert( + (client.innerApiCalls.rollbackApiDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes rollbackApiDeployment with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.rollbackApiDeployment(request), + expectedError + ); + }); + }); + + describe('deleteApiDeploymentRevision', () => { + it('invokes deleteApiDeploymentRevision without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.deleteApiDeploymentRevision = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteApiDeploymentRevision(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteApiDeploymentRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApiDeploymentRevision without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ); + client.innerApiCalls.deleteApiDeploymentRevision = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteApiDeploymentRevision( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiDeployment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteApiDeploymentRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteApiDeploymentRevision with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteApiDeploymentRevision = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteApiDeploymentRevision(request), + expectedError + ); + assert( + (client.innerApiCalls.deleteApiDeploymentRevision as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteApiDeploymentRevision with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteApiDeploymentRevision(request), + expectedError + ); + }); + }); + + describe('getArtifact', () => { + it('invokes getArtifact without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ); + client.innerApiCalls.getArtifact = stubSimpleCall(expectedResponse); + const [response] = await client.getArtifact(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getArtifact without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ); + client.innerApiCalls.getArtifact = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getArtifact( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IArtifact | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getArtifact with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getArtifact = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getArtifact(request), expectedError); + assert( + (client.innerApiCalls.getArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getArtifact with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getArtifact(request), expectedError); + }); + }); + + describe('getArtifactContents', () => { + it('invokes getArtifactContents without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.getArtifactContents = + stubSimpleCall(expectedResponse); + const [response] = await client.getArtifactContents(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getArtifactContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getArtifactContents without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.getArtifactContents = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getArtifactContents( + 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.getArtifactContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getArtifactContents with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getArtifactContents = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getArtifactContents(request), expectedError); + assert( + (client.innerApiCalls.getArtifactContents as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getArtifactContents with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getArtifactContents(request), expectedError); + }); + }); + + describe('createArtifact', () => { + it('invokes createArtifact without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ); + client.innerApiCalls.createArtifact = stubSimpleCall(expectedResponse); + const [response] = await client.createArtifact(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createArtifact without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ); + client.innerApiCalls.createArtifact = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createArtifact( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IArtifact | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createArtifact with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createArtifact = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createArtifact(request), expectedError); + assert( + (client.innerApiCalls.createArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createArtifact with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createArtifact(request), expectedError); + }); + }); + + describe('replaceArtifact', () => { + it('invokes replaceArtifact without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() + ); + request.artifact = {}; + request.artifact.name = ''; + const expectedHeaderRequestParams = 'artifact.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ); + client.innerApiCalls.replaceArtifact = stubSimpleCall(expectedResponse); + const [response] = await client.replaceArtifact(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.replaceArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes replaceArtifact without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() + ); + request.artifact = {}; + request.artifact.name = ''; + const expectedHeaderRequestParams = 'artifact.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ); + client.innerApiCalls.replaceArtifact = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.replaceArtifact( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IArtifact | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.replaceArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes replaceArtifact with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() + ); + request.artifact = {}; + request.artifact.name = ''; + const expectedHeaderRequestParams = 'artifact.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.replaceArtifact = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.replaceArtifact(request), expectedError); + assert( + (client.innerApiCalls.replaceArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes replaceArtifact with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() + ); + request.artifact = {}; + request.artifact.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.replaceArtifact(request), expectedError); + }); + }); + + describe('deleteArtifact', () => { + it('invokes deleteArtifact without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteArtifact = stubSimpleCall(expectedResponse); + const [response] = await client.deleteArtifact(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteArtifact without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteArtifact = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteArtifact( + 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.deleteArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteArtifact with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteArtifact = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteArtifact(request), expectedError); + assert( + (client.innerApiCalls.deleteArtifact as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteArtifact with closed client', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteArtifact(request), expectedError); + }); + }); + + describe('listApis', () => { + it('invokes listApis without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApisRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + ]; + client.innerApiCalls.listApis = stubSimpleCall(expectedResponse); + const [response] = await client.listApis(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApis as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApis without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApisRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + ]; + client.innerApiCalls.listApis = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listApis( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApi[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApis as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listApis with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApisRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listApis = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listApis(request), expectedError); + assert( + (client.innerApiCalls.listApis as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApisStream without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApisRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + ]; + client.descriptors.page.listApis.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listApisStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.Api[] = []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.Api) => { + 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.listApis.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listApis, request) + ); + assert.strictEqual( + (client.descriptors.page.listApis.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listApisStream with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApisRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listApis.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listApisStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.Api[] = []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.Api) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listApis.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listApis, request) + ); + assert.strictEqual( + (client.descriptors.page.listApis.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApis without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApisRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), + ]; + client.descriptors.page.listApis.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.apigeeregistry.v1.IApi[] = []; + const iterable = client.listApisAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listApis.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listApis.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApis with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApisRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listApis.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listApisAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.apigeeregistry.v1.IApi[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listApis.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listApis.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listApiVersions', () => { + it('invokes listApiVersions without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + ]; + client.innerApiCalls.listApiVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listApiVersions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApiVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApiVersions without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + ]; + client.innerApiCalls.listApiVersions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listApiVersions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiVersion[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApiVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listApiVersions with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listApiVersions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listApiVersions(request), expectedError); + assert( + (client.innerApiCalls.listApiVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApiVersionsStream without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + ]; + client.descriptors.page.listApiVersions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listApiVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.ApiVersion[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.ApiVersion) => { + 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.listApiVersions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listApiVersions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listApiVersions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listApiVersionsStream with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listApiVersions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listApiVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.ApiVersion[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.ApiVersion) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listApiVersions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listApiVersions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listApiVersions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApiVersions without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiVersion() + ), + ]; + client.descriptors.page.listApiVersions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.apigeeregistry.v1.IApiVersion[] = []; + const iterable = client.listApiVersionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listApiVersions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listApiVersions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApiVersions with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listApiVersions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listApiVersionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.apigeeregistry.v1.IApiVersion[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listApiVersions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listApiVersions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listApiSpecs', () => { + it('invokes listApiSpecs without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + ]; + client.innerApiCalls.listApiSpecs = stubSimpleCall(expectedResponse); + const [response] = await client.listApiSpecs(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApiSpecs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApiSpecs without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + ]; + client.innerApiCalls.listApiSpecs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listApiSpecs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiSpec[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApiSpecs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listApiSpecs with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listApiSpecs = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listApiSpecs(request), expectedError); + assert( + (client.innerApiCalls.listApiSpecs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApiSpecsStream without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + ]; + client.descriptors.page.listApiSpecs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listApiSpecsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.ApiSpec[] = []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.ApiSpec) => { + 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.listApiSpecs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listApiSpecs, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listApiSpecs.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listApiSpecsStream with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listApiSpecs.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listApiSpecsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.ApiSpec[] = []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.ApiSpec) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listApiSpecs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listApiSpecs, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listApiSpecs.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApiSpecs without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + ]; + client.descriptors.page.listApiSpecs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.apigeeregistry.v1.IApiSpec[] = []; + const iterable = client.listApiSpecsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listApiSpecs.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listApiSpecs.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApiSpecs with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listApiSpecs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listApiSpecsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.apigeeregistry.v1.IApiSpec[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listApiSpecs.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listApiSpecs.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listApiSpecRevisions', () => { + it('invokes listApiSpecRevisions without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + ]; + client.innerApiCalls.listApiSpecRevisions = + stubSimpleCall(expectedResponse); + const [response] = await client.listApiSpecRevisions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApiSpecRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApiSpecRevisions without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + ]; + client.innerApiCalls.listApiSpecRevisions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listApiSpecRevisions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IApiSpec[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApiSpecRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listApiSpecRevisions with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listApiSpecRevisions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listApiSpecRevisions(request), expectedError); + assert( + (client.innerApiCalls.listApiSpecRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApiSpecRevisionsStream without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + ]; + client.descriptors.page.listApiSpecRevisions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listApiSpecRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.ApiSpec[] = []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.ApiSpec) => { + 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.listApiSpecRevisions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listApiSpecRevisions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listApiSpecRevisions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listApiSpecRevisionsStream with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listApiSpecRevisions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listApiSpecRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.ApiSpec[] = []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.ApiSpec) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listApiSpecRevisions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listApiSpecRevisions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listApiSpecRevisions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApiSpecRevisions without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiSpec() + ), + ]; + client.descriptors.page.listApiSpecRevisions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.apigeeregistry.v1.IApiSpec[] = []; + const iterable = client.listApiSpecRevisionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listApiSpecRevisions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listApiSpecRevisions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApiSpecRevisions with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listApiSpecRevisions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listApiSpecRevisionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.apigeeregistry.v1.IApiSpec[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listApiSpecRevisions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listApiSpecRevisions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listApiDeployments', () => { + it('invokes listApiDeployments without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + ]; + client.innerApiCalls.listApiDeployments = + stubSimpleCall(expectedResponse); + const [response] = await client.listApiDeployments(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApiDeployments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApiDeployments without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + ]; + client.innerApiCalls.listApiDeployments = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listApiDeployments( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.apigeeregistry.v1.IApiDeployment[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApiDeployments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listApiDeployments with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listApiDeployments = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listApiDeployments(request), expectedError); + assert( + (client.innerApiCalls.listApiDeployments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApiDeploymentsStream without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + ]; + client.descriptors.page.listApiDeployments.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listApiDeploymentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.ApiDeployment[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.ApiDeployment) => { + 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.listApiDeployments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listApiDeployments, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listApiDeployments.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listApiDeploymentsStream with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listApiDeployments.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listApiDeploymentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.ApiDeployment[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.ApiDeployment) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listApiDeployments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listApiDeployments, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listApiDeployments.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApiDeployments without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + ]; + client.descriptors.page.listApiDeployments.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.apigeeregistry.v1.IApiDeployment[] = + []; + const iterable = client.listApiDeploymentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listApiDeployments.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listApiDeployments.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApiDeployments with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listApiDeployments.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listApiDeploymentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.apigeeregistry.v1.IApiDeployment[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listApiDeployments.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listApiDeployments.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listApiDeploymentRevisions', () => { + it('invokes listApiDeploymentRevisions without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + ]; + client.innerApiCalls.listApiDeploymentRevisions = + stubSimpleCall(expectedResponse); + const [response] = await client.listApiDeploymentRevisions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApiDeploymentRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApiDeploymentRevisions without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + ]; + client.innerApiCalls.listApiDeploymentRevisions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listApiDeploymentRevisions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.apigeeregistry.v1.IApiDeployment[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listApiDeploymentRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listApiDeploymentRevisions with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listApiDeploymentRevisions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listApiDeploymentRevisions(request), + expectedError + ); + assert( + (client.innerApiCalls.listApiDeploymentRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listApiDeploymentRevisionsStream without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + ]; + client.descriptors.page.listApiDeploymentRevisions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listApiDeploymentRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.ApiDeployment[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.ApiDeployment) => { + 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.listApiDeploymentRevisions + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listApiDeploymentRevisions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listApiDeploymentRevisions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listApiDeploymentRevisionsStream with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listApiDeploymentRevisions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listApiDeploymentRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.ApiDeployment[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.ApiDeployment) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listApiDeploymentRevisions + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listApiDeploymentRevisions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listApiDeploymentRevisions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApiDeploymentRevisions without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ApiDeployment() + ), + ]; + client.descriptors.page.listApiDeploymentRevisions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.apigeeregistry.v1.IApiDeployment[] = + []; + const iterable = client.listApiDeploymentRevisionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listApiDeploymentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listApiDeploymentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listApiDeploymentRevisions with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listApiDeploymentRevisions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listApiDeploymentRevisionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.apigeeregistry.v1.IApiDeployment[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listApiDeploymentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listApiDeploymentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listArtifacts', () => { + it('invokes listArtifacts without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + ]; + client.innerApiCalls.listArtifacts = stubSimpleCall(expectedResponse); + const [response] = await client.listArtifacts(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listArtifacts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listArtifacts without error using callback', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + ]; + client.innerApiCalls.listArtifacts = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listArtifacts( + request, + ( + err?: Error | null, + result?: protos.google.cloud.apigeeregistry.v1.IArtifact[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listArtifacts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listArtifacts with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listArtifacts = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listArtifacts(request), expectedError); + assert( + (client.innerApiCalls.listArtifacts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listArtifactsStream without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + ]; + client.descriptors.page.listArtifacts.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listArtifactsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.Artifact[] = []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.Artifact) => { + 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.listArtifacts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listArtifacts, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listArtifacts.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listArtifactsStream with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listArtifacts.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listArtifactsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.apigeeregistry.v1.Artifact[] = []; + stream.on( + 'data', + (response: protos.google.cloud.apigeeregistry.v1.Artifact) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listArtifacts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listArtifacts, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listArtifacts.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listArtifacts without error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.Artifact() + ), + ]; + client.descriptors.page.listArtifacts.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.apigeeregistry.v1.IArtifact[] = []; + const iterable = client.listArtifactsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listArtifacts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listArtifacts.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listArtifacts with error', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listArtifacts.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listArtifactsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.apigeeregistry.v1.IArtifact[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listArtifacts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listArtifacts.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new registryModule.v1.RegistryClient({ + 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.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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('api', () => { + const fakePath = '/rendered/path/api'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + }; + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.apiPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.apiPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('apiPath', () => { + const result = client.apiPath( + 'projectValue', + 'locationValue', + 'apiValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.apiPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromApiName', () => { + const result = client.matchProjectFromApiName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.apiPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromApiName', () => { + const result = client.matchLocationFromApiName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.apiPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromApiName', () => { + const result = client.matchApiFromApiName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + (client.pathTemplates.apiPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('apiDeployment', () => { + const fakePath = '/rendered/path/apiDeployment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + deployment: 'deploymentValue', + }; + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.apiDeploymentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.apiDeploymentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('apiDeploymentPath', () => { + const result = client.apiDeploymentPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'deploymentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.apiDeploymentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromApiDeploymentName', () => { + const result = client.matchProjectFromApiDeploymentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.apiDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromApiDeploymentName', () => { + const result = client.matchLocationFromApiDeploymentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.apiDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromApiDeploymentName', () => { + const result = client.matchApiFromApiDeploymentName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + (client.pathTemplates.apiDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeploymentFromApiDeploymentName', () => { + const result = client.matchDeploymentFromApiDeploymentName(fakePath); + assert.strictEqual(result, 'deploymentValue'); + assert( + (client.pathTemplates.apiDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('apiSpec', () => { + const fakePath = '/rendered/path/apiSpec'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + version: 'versionValue', + spec: 'specValue', + }; + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.apiSpecPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.apiSpecPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('apiSpecPath', () => { + const result = client.apiSpecPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'versionValue', + 'specValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.apiSpecPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromApiSpecName', () => { + const result = client.matchProjectFromApiSpecName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.apiSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromApiSpecName', () => { + const result = client.matchLocationFromApiSpecName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.apiSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromApiSpecName', () => { + const result = client.matchApiFromApiSpecName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + (client.pathTemplates.apiSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromApiSpecName', () => { + const result = client.matchVersionFromApiSpecName(fakePath); + assert.strictEqual(result, 'versionValue'); + assert( + (client.pathTemplates.apiSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSpecFromApiSpecName', () => { + const result = client.matchSpecFromApiSpecName(fakePath); + assert.strictEqual(result, 'specValue'); + assert( + (client.pathTemplates.apiSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('apiVersion', () => { + const fakePath = '/rendered/path/apiVersion'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + version: 'versionValue', + }; + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.apiVersionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.apiVersionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('apiVersionPath', () => { + const result = client.apiVersionPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'versionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.apiVersionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromApiVersionName', () => { + const result = client.matchProjectFromApiVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.apiVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromApiVersionName', () => { + const result = client.matchLocationFromApiVersionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.apiVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromApiVersionName', () => { + const result = client.matchApiFromApiVersionName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + (client.pathTemplates.apiVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromApiVersionName', () => { + const result = client.matchVersionFromApiVersionName(fakePath); + assert.strictEqual(result, 'versionValue'); + assert( + (client.pathTemplates.apiVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('instance', () => { + const fakePath = '/rendered/path/instance'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + }; + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.instancePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.instancePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('instancePath', () => { + const result = client.instancePath( + 'projectValue', + 'locationValue', + 'instanceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.instancePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromInstanceName', () => { + const result = client.matchProjectFromInstanceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromInstanceName', () => { + const result = client.matchLocationFromInstanceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromInstanceName', () => { + const result = client.matchInstanceFromInstanceName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ + 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('projectLocationApiArtifact', () => { + const fakePath = '/rendered/path/projectLocationApiArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + artifact: 'artifactValue', + }; + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationApiArtifactPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationApiArtifactPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationApiArtifactPath', () => { + const result = client.projectLocationApiArtifactPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationApiArtifactPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationApiArtifactName', () => { + const result = + client.matchProjectFromProjectLocationApiArtifactName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationApiArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationApiArtifactName', () => { + const result = + client.matchLocationFromProjectLocationApiArtifactName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationApiArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromProjectLocationApiArtifactName', () => { + const result = + client.matchApiFromProjectLocationApiArtifactName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + ( + client.pathTemplates.projectLocationApiArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromProjectLocationApiArtifactName', () => { + const result = + client.matchArtifactFromProjectLocationApiArtifactName(fakePath); + assert.strictEqual(result, 'artifactValue'); + assert( + ( + client.pathTemplates.projectLocationApiArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationApiDeploymentArtifact', () => { + const fakePath = '/rendered/path/projectLocationApiDeploymentArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + deployment: 'deploymentValue', + artifact: 'artifactValue', + }; + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationApiDeploymentArtifactPath', () => { + const result = client.projectLocationApiDeploymentArtifactPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'deploymentValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationApiDeploymentArtifactName', () => { + const result = + client.matchProjectFromProjectLocationApiDeploymentArtifactName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationApiDeploymentArtifactName', () => { + const result = + client.matchLocationFromProjectLocationApiDeploymentArtifactName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromProjectLocationApiDeploymentArtifactName', () => { + const result = + client.matchApiFromProjectLocationApiDeploymentArtifactName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeploymentFromProjectLocationApiDeploymentArtifactName', () => { + const result = + client.matchDeploymentFromProjectLocationApiDeploymentArtifactName( + fakePath + ); + assert.strictEqual(result, 'deploymentValue'); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromProjectLocationApiDeploymentArtifactName', () => { + const result = + client.matchArtifactFromProjectLocationApiDeploymentArtifactName( + fakePath + ); + assert.strictEqual(result, 'artifactValue'); + assert( + ( + client.pathTemplates + .projectLocationApiDeploymentArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationApiVersionArtifact', () => { + const fakePath = '/rendered/path/projectLocationApiVersionArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + version: 'versionValue', + artifact: 'artifactValue', + }; + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationApiVersionArtifactPath', () => { + const result = client.projectLocationApiVersionArtifactPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'versionValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationApiVersionArtifactName', () => { + const result = + client.matchProjectFromProjectLocationApiVersionArtifactName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationApiVersionArtifactName', () => { + const result = + client.matchLocationFromProjectLocationApiVersionArtifactName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromProjectLocationApiVersionArtifactName', () => { + const result = + client.matchApiFromProjectLocationApiVersionArtifactName(fakePath); + assert.strictEqual(result, 'apiValue'); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromProjectLocationApiVersionArtifactName', () => { + const result = + client.matchVersionFromProjectLocationApiVersionArtifactName( + fakePath + ); + assert.strictEqual(result, 'versionValue'); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromProjectLocationApiVersionArtifactName', () => { + const result = + client.matchArtifactFromProjectLocationApiVersionArtifactName( + fakePath + ); + assert.strictEqual(result, 'artifactValue'); + assert( + ( + client.pathTemplates.projectLocationApiVersionArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationApiVersionSpecArtifact', () => { + const fakePath = '/rendered/path/projectLocationApiVersionSpecArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + api: 'apiValue', + version: 'versionValue', + spec: 'specValue', + artifact: 'artifactValue', + }; + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationApiVersionSpecArtifactPath', () => { + const result = client.projectLocationApiVersionSpecArtifactPath( + 'projectValue', + 'locationValue', + 'apiValue', + 'versionValue', + 'specValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchProjectFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchLocationFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchApiFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchApiFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'apiValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchVersionFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'versionValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSpecFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchSpecFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'specValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromProjectLocationApiVersionSpecArtifactName', () => { + const result = + client.matchArtifactFromProjectLocationApiVersionSpecArtifactName( + fakePath + ); + assert.strictEqual(result, 'artifactValue'); + assert( + ( + client.pathTemplates + .projectLocationApiVersionSpecArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationArtifact', () => { + const fakePath = '/rendered/path/projectLocationArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + artifact: 'artifactValue', + }; + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationArtifactPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationArtifactPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationArtifactPath', () => { + const result = client.projectLocationArtifactPath( + 'projectValue', + 'locationValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationArtifactPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationArtifactName', () => { + const result = + client.matchProjectFromProjectLocationArtifactName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationArtifactName', () => { + const result = + client.matchLocationFromProjectLocationArtifactName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromProjectLocationArtifactName', () => { + const result = + client.matchArtifactFromProjectLocationArtifactName(fakePath); + assert.strictEqual(result, 'artifactValue'); + assert( + ( + client.pathTemplates.projectLocationArtifactPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-apigeeregistry/tsconfig.json b/packages/google-cloud-apigeeregistry/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-apigeeregistry/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-apigeeregistry/webpack.config.js b/packages/google-cloud-apigeeregistry/webpack.config.js new file mode 100644 index 00000000000..af9ec89d4a7 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/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: 'Provisioning', + filename: './provisioning.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 be07219f19f144968a064e541fffa0c61f4578c9 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Tue, 19 Jul 2022 14:45:51 -0700 Subject: [PATCH 03/40] feat: add initial samples and tests (#2) * feat: add initial samples and tests Co-authored-by: Owl Bot --- .../.repo-metadata.json | 14 ++-- .../CONTRIBUTING.md | 2 +- .../google-cloud-apigeeregistry/README.md | 23 +++--- .../linkinator.config.json | 20 ++++- .../google-cloud-apigeeregistry/package.json | 67 +++++++++++++++- .../samples/quickstart.js | 76 +++++++++++++------ .../samples/test/quickstart.js | 16 ++-- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 5 +- 9 files changed, 170 insertions(+), 55 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/.repo-metadata.json b/packages/google-cloud-apigeeregistry/.repo-metadata.json index 7c85ce224d4..d080edd6d64 100644 --- a/packages/google-cloud-apigeeregistry/.repo-metadata.json +++ b/packages/google-cloud-apigeeregistry/.repo-metadata.json @@ -1,13 +1,13 @@ { "name": "apigeeregistry", - "name_pretty": "", - "product_documentation": "", - "client_documentation": "", - "issue_tracker": "", + "name_pretty": "Apigee Registry API", + "product_documentation": "https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/apigeeregistry/latest", + "issue_tracker": "https://github.com/googleapis/nodejs-video-transcoder/issues", "release_level": "beta", - "language": "", - "repo": "", - "distribution_name": "", + "language": "nodejs", + "repo": "googleapis/nodejs-apigee-registry", + "distribution_name": "@google-cloud/apigee-registry", "api_id": "apigeeregistry.googleapis.com", "default_version": "v1", "requires_billing": true diff --git a/packages/google-cloud-apigeeregistry/CONTRIBUTING.md b/packages/google-cloud-apigeeregistry/CONTRIBUTING.md index fc37b2b6698..0a19fb4c70f 100644 --- a/packages/google-cloud-apigeeregistry/CONTRIBUTING.md +++ b/packages/google-cloud-apigeeregistry/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][enable_api]. +1. [Enable the Apigee Registry API API][enable_api]. 1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. diff --git a/packages/google-cloud-apigeeregistry/README.md b/packages/google-cloud-apigeeregistry/README.md index accfea4c599..8dd1af26e79 100644 --- a/packages/google-cloud-apigeeregistry/README.md +++ b/packages/google-cloud-apigeeregistry/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [: Client](https://github.com/) +# [Apigee Registry API: Node.js Client](https://github.com/googleapis/nodejs-apigee-registry) [![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/apigee-registry.svg)](https://www.npmjs.org/package/@google-cloud/apigee-registry) @@ -14,11 +14,11 @@ apigeeregistry client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com//blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-apigee-registry/blob/main/CHANGELOG.md). - - -* [github.com/](https://github.com/) +* [Apigee Registry API Node.js Client API Reference][client-docs] +* [Apigee Registry API Documentation][product-docs] +* [github.com/googleapis/nodejs-apigee-registry](https://github.com/googleapis/nodejs-apigee-registry) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -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][enable_api]. +1. [Enable the Apigee Registry API API][enable_api]. 1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. @@ -57,6 +57,9 @@ npm install @google-cloud/apigee-registry +The [Apigee Registry 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/). @@ -100,7 +103,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com//blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-apigee-registry/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`) @@ -112,10 +115,10 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com//blob/master/LICENSE) - - +See [LICENSE](https://github.com/googleapis/nodejs-apigee-registry/blob/main/LICENSE) +[client-docs]: https://cloud.google.com/nodejs/docs/reference/apigeeregistry/latest +[product-docs]: https://cloud.google.com/apigee/docs/api-hub/get-started-registry-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 diff --git a/packages/google-cloud-apigeeregistry/linkinator.config.json b/packages/google-cloud-apigeeregistry/linkinator.config.json index 57f46959ca3..66a1467385d 100644 --- a/packages/google-cloud-apigeeregistry/linkinator.config.json +++ b/packages/google-cloud-apigeeregistry/linkinator.config.json @@ -1 +1,19 @@ -{"recurse":true,"skip":["'httpRules'","lroOptions.httpRules","https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":5,"retry":true,"retryErrors":true,"retryErrorsCount":5,"retryErrorsJitter":3000} \ No newline at end of file +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com", + "https://cloud.google.com/nodejs/docs/reference/apigeeregistry/latest", + "https://github.com/googleapis/nodejs-apigee-registry/blob/master/CHANGELOG.md", + "https://github.com/googleapis/nodejs-apigee-registry/blob/addSamples/CHANGELOG.md" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 4302220ea91..25444a06527 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -1 +1,66 @@ -{"name":"@google-cloud/apigee-registry","version":"0.1.0","description":"apigeeregistry client for Node.js","repository":"googleapis/nodejs-apigee-registry","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 apigeeregistry","apigeeregistry","apigeeregistry 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/apigee-registry", + "version": "0.1.0", + "description": "apigeeregistry client for Node.js", + "repository": "googleapis/nodejs-apigee-registry", + "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 apigeeregistry", + "apigeeregistry", + "apigeeregistry 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": "^3.1.3" + }, + "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-apigeeregistry/samples/quickstart.js b/packages/google-cloud-apigeeregistry/samples/quickstart.js index 705276d6910..9a0be9c5434 100644 --- a/packages/google-cloud-apigeeregistry/samples/quickstart.js +++ b/packages/google-cloud-apigeeregistry/samples/quickstart.js @@ -1,3 +1,5 @@ +// 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 @@ -10,41 +12,67 @@ // 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'; -async function main() { - - // [START nodejs_apigee_registry_quickstart] - // Imports the Google Cloud client library +function main(parent) { + // [START apigeeregistry_v1_generated_Registry_ListApis_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of APIs. + * Format: projects/* /locations/* + */ + // const parent = 'abc123' + /** + * The maximum number of APIs to return. + * The service may return fewer than this value. + * If unspecified, at most 50 values will be returned. + * The maximum is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListApis` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListApis` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * An expression that can be used to filter the list. Filters use the Common + * Expression Language and can refer to all message fields. + */ + // const filter = 'abc123' - // remove this line after package is released - // eslint-disable-next-line node/no-missing-require - const {RegistryClient} = require('@google-cloud/apigee-registry'); + // Imports the Apigeeregistry library + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; - // TODO(developer): replace with your prefered project ID. - // const projectId = 'my-project' + // Instantiates a client + const apigeeregistryClient = new RegistryClient(); - // Creates a client - // eslint-disable-next-line no-unused-vars - const client = new {RegistryClient}(); + async function callListApis() { + // Construct request + const request = { + parent, + }; - //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); + // Run request + const iterable = await apigeeregistryClient.listApisAsync(request); + for await (const response of iterable) { + console.log(response); + } } - doSomething(); - // [END nodejs_apigee_registry_quickstart] + + callListApis(); + // [END apigeeregistry_v1_generated_Registry_ListApis_async] } -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; }); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-apigeeregistry/samples/test/quickstart.js b/packages/google-cloud-apigeeregistry/samples/test/quickstart.js index 40c125cd433..4603baafd9e 100644 --- a/packages/google-cloud-apigeeregistry/samples/test/quickstart.js +++ b/packages/google-cloud-apigeeregistry/samples/test/quickstart.js @@ -29,10 +29,10 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cwd = path.join(__dirname, '..'); -const client = new {RegistryClient}(); +const client = new RegistryClient(); describe('Quickstart', () => { - //TODO: remove this if not using the projectId + //TODO: remove this if not using the projectId // eslint-disable-next-line no-unused-vars let projectId; @@ -42,12 +42,10 @@ describe('Quickstart', () => { }); 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); + assert.throws(() => { + execSync(`node ./quickstart.js projects/${projectId}/locations/global`, { + cwd, + }); + }, /9 FAILED_PRECONDITION/); }); }); diff --git a/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.js b/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.js index c118c1f62a2..463c19fc6ee 100644 --- a/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-apigeeregistry/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 apigeeregistry = require('@google-cloud/apigeeregistry'); +const apigeeregistry = require('@google-cloud/apigee-registry'); function main() { const provisioningClient = new apigeeregistry.ProvisioningClient(); diff --git a/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.ts index c80465abb99..e6e0661b7e9 100644 --- a/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.ts @@ -16,7 +16,10 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {ProvisioningClient, RegistryClient} from '@google-cloud/apigeeregistry'; +import { + ProvisioningClient, + RegistryClient, +} from '@google-cloud/apigee-registry'; // check that the client class type name can be used function doStuffWithProvisioningClient(client: ProvisioningClient) { From f3c8c4a9f5e356ee2a5c9b1b146a2d0ca620a53e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 21 Jul 2022 11:19:35 -0700 Subject: [PATCH 04/40] chore(main): release 0.1.0 (#1) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-apigeeregistry/CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 packages/google-cloud-apigeeregistry/CHANGELOG.md diff --git a/packages/google-cloud-apigeeregistry/CHANGELOG.md b/packages/google-cloud-apigeeregistry/CHANGELOG.md new file mode 100644 index 00000000000..969354e97a7 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## 0.1.0 (2022-07-21) + + +### Features + +* add initial samples and tests ([77257a4](https://github.com/googleapis/nodejs-apigee-registry/commit/77257a467f559529416327d362ba46aaef41b037)) +* add templated files from docker image ([4999fc5](https://github.com/googleapis/nodejs-apigee-registry/commit/4999fc5f4b8150c2b2d3bcdb15d17c6ac400bfb2)) +* initial stub of library ([81efd1e](https://github.com/googleapis/nodejs-apigee-registry/commit/81efd1e2ac2c301b1a95fca58b83c9ab61103f19)) From 0d317bcef084a2957a6ffccde0e278775fd8d322 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 18:46:18 +0200 Subject: [PATCH 05/40] chore(deps): update dependency @types/mocha to v9 (#3) 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 | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.2.2` -> `^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**: 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-apigee-registry). --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 25444a06527..fc2fa59e0cf 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -42,7 +42,7 @@ "google-gax": "^3.1.3" }, "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 1ba3cd4825e417881c45ce5e0a58a2d1d6f4f577 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 18:52:11 +0200 Subject: [PATCH 06/40] chore(deps): update dependency jsdoc-region-tag to v2 (#6) 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-apigee-registry). --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index fc2fa59e0cf..d470305839d 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/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": "^8.4.0", "null-loader": "^4.0.1", From 69c8d22141e2240711ed82c8be5de4a1f1c78d05 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 18:56:14 +0200 Subject: [PATCH 07/40] chore(deps): update dependency linkinator to v4 (#7) 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-apigee-registry). --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index d470305839d..834b258062a 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -50,7 +50,7 @@ "jsdoc": "^3.6.6", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.13.6", + "linkinator": "^4.0.0", "mocha": "^8.4.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", From 03eee7a9593cca6460835bd3888592daaf6d28e3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 19:02:46 +0200 Subject: [PATCH 08/40] chore(deps): update dependency mocha to v10 (#8) 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 | |---|---|---|---|---|---| | [mocha](https://mochajs.org/) ([source](https://togithub.com/mochajs/mocha)) | [`^8.0.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/mocha/8.4.0/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/mocha/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/mocha/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/mocha/10.0.0/compatibility-slim/8.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/mocha/10.0.0/confidence-slim/8.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
mochajs/mocha ### [`v10.0.0`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​1000--2022-05-01) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.2.2...v10.0.0) #### :boom: Breaking Changes - [#​4845](https://togithub.com/mochajs/mocha/issues/4845): **Drop Node.js v12.x support** ([**@​juergba**](https://togithub.com/juergba)) - [#​4848](https://togithub.com/mochajs/mocha/issues/4848): Drop Internet-Explorer-11 support ([**@​juergba**](https://togithub.com/juergba)) - [#​4857](https://togithub.com/mochajs/mocha/issues/4857): Drop AMD/RequireJS support ([**@​juergba**](https://togithub.com/juergba)) - [#​4866](https://togithub.com/mochajs/mocha/issues/4866): Drop Growl notification support ([**@​juergba**](https://togithub.com/juergba)) - [#​4863](https://togithub.com/mochajs/mocha/issues/4863): Rename executable `bin/mocha` to `bin/mocha.js` ([**@​juergba**](https://togithub.com/juergba)) - [#​4865](https://togithub.com/mochajs/mocha/issues/4865): `--ignore` option in Windows: upgrade Minimatch ([**@​juergba**](https://togithub.com/juergba)) - [#​4861](https://togithub.com/mochajs/mocha/issues/4861): Remove deprecated `Runner` signature ([**@​juergba**](https://togithub.com/juergba)) #### :nut_and_bolt: Other - [#​4878](https://togithub.com/mochajs/mocha/issues/4878): Update production dependencies ([**@​juergba**](https://togithub.com/juergba)) - [#​4876](https://togithub.com/mochajs/mocha/issues/4876): Add Node.js v18 to CI test matrix ([**@​outsideris**](https://togithub.com/outsideris)) - [#​4852](https://togithub.com/mochajs/mocha/issues/4852): Replace deprecated `String.prototype.substr()` ([**@​CommanderRoot**](https://togithub.com/CommanderRoot)) Also thanks to [**@​ea2305**](https://togithub.com/ea2305) and [**@​SukkaW**](https://togithub.com/SukkaW) for improvements to our documentation. ### [`v9.2.2`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​922--2022-03-11) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.2.1...v9.2.2) #### :bug: Fixes - [#​4842](https://togithub.com/mochajs/mocha/issues/4842): Loading of reporter throws wrong error ([**@​juergba**](https://togithub.com/juergba)) - [#​4839](https://togithub.com/mochajs/mocha/issues/4839): `dry-run`: prevent potential call-stack crash ([**@​juergba**](https://togithub.com/juergba)) #### :nut_and_bolt: Other - [#​4843](https://togithub.com/mochajs/mocha/issues/4843): Update production dependencies ([**@​juergba**](https://togithub.com/juergba)) ### [`v9.2.1`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​921--2022-02-19) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.2.0...v9.2.1) #### :bug: Fixes - [#​4832](https://togithub.com/mochajs/mocha/issues/4832): Loading of config files throws wrong error ([**@​juergba**](https://togithub.com/juergba)) - [#​4799](https://togithub.com/mochajs/mocha/issues/4799): Reporter: configurable `maxDiffSize` reporter-option ([**@​norla**](https://togithub.com/norla)) ### [`v9.2.0`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​920--2022-01-24) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.1.4...v9.2.0) #### :tada: Enhancements - [#​4813](https://togithub.com/mochajs/mocha/issues/4813): Parallel: assign each worker a worker-id ([**@​forty**](https://togithub.com/forty)) #### :nut_and_bolt: Other - [#​4818](https://togithub.com/mochajs/mocha/issues/4818): Update production dependencies ([**@​juergba**](https://togithub.com/juergba)) ### [`v9.1.4`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​914--2022-01-14) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.1.3...v9.1.4) #### :bug: Fixes - [#​4807](https://togithub.com/mochajs/mocha/issues/4807): `import` throws wrong error if loader is used ([**@​giltayar**](https://togithub.com/giltayar)) #### :nut_and_bolt: Other - [#​4777](https://togithub.com/mochajs/mocha/issues/4777): Add Node v17 to CI test matrix ([**@​outsideris**](https://togithub.com/outsideris)) ### [`v9.1.3`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​913--2021-10-15) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.1.2...v9.1.3) #### :bug: Fixes - [#​4769](https://togithub.com/mochajs/mocha/issues/4769): Browser: re-enable `bdd` ES6 style import ([**@​juergba**](https://togithub.com/juergba)) #### :nut_and_bolt: Other - [#​4764](https://togithub.com/mochajs/mocha/issues/4764): Revert deprecation of `EVENT_SUITE_ADD_*` events ([**@​beatfactor**](https://togithub.com/beatfactor)) ### [`v9.1.2`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​912--2021-09-25) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.1.1...v9.1.2) #### :bug: Fixes - [#​4746](https://togithub.com/mochajs/mocha/issues/4746): Browser: stop using all global vars in `browser-entry.js` ([**@​PaperStrike**](https://togithub.com/PaperStrike)) #### :nut_and_bolt: Other - [#​4754](https://togithub.com/mochajs/mocha/issues/4754): Remove dependency wide-align ([**@​juergba**](https://togithub.com/juergba)) - [#​4736](https://togithub.com/mochajs/mocha/issues/4736): ESM: remove code for Node versions <10 ([**@​juergba**](https://togithub.com/juergba)) ### [`v9.1.1`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​911--2021-08-28) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.1.0...v9.1.1) #### :bug: Fixes - [#​4623](https://togithub.com/mochajs/mocha/issues/4623): `XUNIT` and `JSON` reporter crash in `parallel` mode ([**@​curtisman**](https://togithub.com/curtisman)) ### [`v9.1.0`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​910--2021-08-20) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.0.3...v9.1.0) #### :tada: Enhancements - [#​4716](https://togithub.com/mochajs/mocha/issues/4716): Add new option `--fail-zero` ([**@​juergba**](https://togithub.com/juergba)) - [#​4691](https://togithub.com/mochajs/mocha/issues/4691): Add new option `--node-option` ([**@​juergba**](https://togithub.com/juergba)) - [#​4607](https://togithub.com/mochajs/mocha/issues/4607): Add output option to `JSON` reporter ([**@​dorny**](https://togithub.com/dorny)) ### [`v9.0.3`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​903--2021-07-25) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.0.2...v9.0.3) #### :bug: Fixes - [#​4702](https://togithub.com/mochajs/mocha/issues/4702): Error rethrow from cwd-relative path while loading `.mocharc.js` ([**@​kirill-golovan**](https://togithub.com/kirill-golovan)) - [#​4688](https://togithub.com/mochajs/mocha/issues/4688): Usage of custom interface in parallel mode ([**@​juergba**](https://togithub.com/juergba)) - [#​4687](https://togithub.com/mochajs/mocha/issues/4687): ESM: don't swallow `MODULE_NOT_FOUND` errors in case of `type:module` ([**@​giltayar**](https://togithub.com/giltayar)) ### [`v9.0.2`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​902--2021-07-03) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.0.1...v9.0.2) #### :bug: Fixes - [#​4668](https://togithub.com/mochajs/mocha/issues/4668): ESM: make `--require ` work with new `import`-first loading ([**@​giltayar**](https://togithub.com/giltayar)) #### :nut_and_bolt: Other - [#​4674](https://togithub.com/mochajs/mocha/issues/4674): Update production dependencies ([**@​juergba**](https://togithub.com/juergba)) ### [`v9.0.1`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​901--2021-06-18) [Compare Source](https://togithub.com/mochajs/mocha/compare/v9.0.0...v9.0.1) #### :nut_and_bolt: Other - [#​4657](https://togithub.com/mochajs/mocha/issues/4657): Browser: add separate bundle for modern browsers ([**@​juergba**](https://togithub.com/juergba)) We added a separate browser bundle `mocha-es2018.js` in javascript ES2018, as we skipped the transpilation down to ES5. This is an **experimental step towards freezing Mocha's support of IE11**. - [#​4653](https://togithub.com/mochajs/mocha/issues/4653): ESM: proper version check in `hasStableEsmImplementation` ([**@​alexander-fenster**](https://togithub.com/alexander-fenster)) ### [`v9.0.0`](https://togithub.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#​900--2021-06-07) [Compare Source](https://togithub.com/mochajs/mocha/compare/v8.4.0...v9.0.0) #### :boom: Breaking Changes - [#​4633](https://togithub.com/mochajs/mocha/issues/4633): **Drop Node.js v10.x support** ([**@​juergba**](https://togithub.com/juergba)) - [#​4635](https://togithub.com/mochajs/mocha/issues/4635): `import`-first loading of test files ([**@​giltayar**](https://togithub.com/giltayar)) **Mocha is going ESM-first!** This means that it will now use ESM `import(test_file)` to load the test files, instead of the CommonJS `require(test_file)`. This is not a problem, as `import` can also load most files that `require` does. In the rare cases where this fails, it will fallback to `require(...)`. This ESM-first approach is the next step in Mocha's ESM migration, and allows ESM loaders to load and transform the test file. - [#​4636](https://togithub.com/mochajs/mocha/issues/4636): Remove deprecated `utils.lookupFiles()` ([**@​juergba**](https://togithub.com/juergba)) - [#​4638](https://togithub.com/mochajs/mocha/issues/4638): Limit the size of `actual`/`expected` for `diff` generation ([**@​juergba**](https://togithub.com/juergba)) - [#​4389](https://togithub.com/mochajs/mocha/issues/4389): Refactoring: Consuming log-symbols alternate to code for win32 in reporters/base ([**@​MoonSupport**](https://togithub.com/MoonSupport)) #### :tada: Enhancements - [#​4640](https://togithub.com/mochajs/mocha/issues/4640): Add new option `--dry-run` ([**@​juergba**](https://togithub.com/juergba)) #### :bug: Fixes - [#​4128](https://togithub.com/mochajs/mocha/issues/4128): Fix: control stringification of error message ([**@​syeutyu**](https://togithub.com/syeutyu)) #### :nut_and_bolt: Other - [#​4646](https://togithub.com/mochajs/mocha/issues/4646): Deprecate `Runner(suite: Suite, delay: boolean)` signature ([**@​juergba**](https://togithub.com/juergba)) - [#​4643](https://togithub.com/mochajs/mocha/issues/4643): Update production dependencies ([**@​juergba**](https://togithub.com/juergba))
--- ### 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-apigee-registry). --- packages/google-cloud-apigeeregistry/package.json | 2 +- packages/google-cloud-apigeeregistry/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 834b258062a..c139cd3fa0a 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -51,7 +51,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", - "mocha": "^8.4.0", + "mocha": "^10.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", diff --git a/packages/google-cloud-apigeeregistry/samples/package.json b/packages/google-cloud-apigeeregistry/samples/package.json index 56371599739..559744e07bb 100644 --- a/packages/google-cloud-apigeeregistry/samples/package.json +++ b/packages/google-cloud-apigeeregistry/samples/package.json @@ -18,6 +18,6 @@ "devDependencies": { "c8": "^7.1.0", "chai": "^4.2.0", - "mocha": "^8.0.0" + "mocha": "^10.0.0" } } From 6228d1c9d6abe98893b39b4d9c907de11e30db05 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 19:08:15 +0200 Subject: [PATCH 09/40] chore(deps): update dependency sinon to v14 (#9) 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 | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^10.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/10.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/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/10.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.* ### [`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.* ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1200) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) - [`b20ef9e4`](https://togithub.com/sinonjs/sinon/commit/b20ef9e4940e9384a6d0707b917a38e7bbfcd816) Upgrade to fake-timers@8 (Carl-Erik Kopseng). This is potentially breaking, but should not be, as the breaking change deals with the Node timer object created by fake timers. - [`eba42cc3`](https://togithub.com/sinonjs/sinon/commit/eba42cc38dbaf5417178a12cec11e35014e335ea) Enable esm named exports ([#​2382](https://togithub.com/sinonjs/sinon/issues/2382)) (Julian Grinblat) - [`b0cf5448`](https://togithub.com/sinonjs/sinon/commit/b0cf5448993c2ace607cdf430b7e389d02c2f296) Spelling ([#​2398](https://togithub.com/sinonjs/sinon/issues/2398)) (Josh Soref) - [`e78a6706`](https://togithub.com/sinonjs/sinon/commit/e78a670611682c7e35cf7d27887b409d6397d27c) Make calledWith() assertions idempotent ([#​2407](https://togithub.com/sinonjs/sinon/issues/2407)) (Joel Bradshaw) - [`2814c0a2`](https://togithub.com/sinonjs/sinon/commit/2814c0a212ab6b79c7251e4b0a1bebc9918257d4) Generate CHANGES.md using [@​studio/changes](https://togithub.com/studio/changes) (Morgan Roderick) > This will bring us closer to having the same release process as the > other `@sinonjs` packages. - [`2d5d6ad4`](https://togithub.com/sinonjs/sinon/commit/2d5d6ad4cd89c2063834991da5073f7640d0d722) Run tests in Node 16 in GitHub Actions (Morgan Roderick) *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-03.* ### [`v11.1.2`](https://togithub.com/sinonjs/sinon/blob/HEAD/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) ### [`v11.1.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1111) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.0...v11.1.1) - Fix [#​2379](https://togithub.com/sinonjs/sinon/issues/2379) by using v7 of supports-color ### [`v11.1.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1110) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.0.0...v11.1.0) - 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/HEAD/CHANGES.md#​1100) [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/HEAD/CHANGES.md#​1001) [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**: 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-apigee-registry). --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index c139cd3fa0a..0426743bc25 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -54,7 +54,7 @@ "mocha": "^10.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From de230d0a6572f5118dfb63e9f02ffa5e49d2e3f2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 19:12:12 +0200 Subject: [PATCH 10/40] chore(deps): update dependency @types/node to v16 (#4) 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 | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^14.14.44` -> `^16.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/14.18.22/16.11.45) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.45/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.45/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.45/compatibility-slim/14.18.22)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.45/confidence-slim/14.18.22)](https://docs.renovatebot.com/merge-confidence/) | --- ### 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-apigee-registry). --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 0426743bc25..6891352f426 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/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 ab57945548c10351108cdcf512d381eb5ea4cabd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 19:20:18 +0200 Subject: [PATCH 11/40] chore(deps): update dependency jsdoc-fresh to v2 (#5) 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-apigee-registry). --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 6891352f426..4d56f04fc72 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/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": "^4.0.0", "mocha": "^10.0.0", From dcd67e4fc30f3b02891fab04cbc02e96dca4d96c 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:20 +0000 Subject: [PATCH 12/40] fix: change import long to require (#12) 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 | 816 ++- .../protos/protos.js | 4718 ++++++++++++----- .../protos/protos.json | 24 + 3 files changed, 4133 insertions(+), 1425 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/protos/protos.d.ts b/packages/google-cloud-apigeeregistry/protos/protos.d.ts index 3af2a5614eb..761e29eaaf5 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.d.ts +++ b/packages/google-cloud-apigeeregistry/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 { @@ -92,21 +92,21 @@ export namespace google { namespace Provisioning { /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#createInstance}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning|createInstance}. * @param error Error, if any * @param [response] Operation */ type CreateInstanceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#deleteInstance}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning|deleteInstance}. * @param error Error, if any * @param [response] Operation */ type DeleteInstanceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#getInstance}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning|getInstance}. * @param error Error, if any * @param [response] Instance */ @@ -213,6 +213,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateInstanceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteInstanceRequest. */ @@ -303,6 +310,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteInstanceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetInstanceRequest. */ @@ -393,6 +407,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetInstanceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationMetadata. */ @@ -519,6 +540,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 Instance. */ @@ -639,6 +667,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Instance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Instance { @@ -748,6 +783,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; } } @@ -893,6 +935,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Api + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ApiVersion. */ @@ -1025,6 +1074,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApiVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ApiSpec. */ @@ -1193,6 +1249,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApiSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ApiDeployment. */ @@ -1361,6 +1424,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApiDeployment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Artifact. */ @@ -1487,6 +1557,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Artifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Represents a Registry */ @@ -2003,245 +2080,245 @@ export namespace google { namespace Registry { /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApis}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApis}. * @param error Error, if any * @param [response] ListApisResponse */ type ListApisCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApisResponse) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApi}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getApi}. * @param error Error, if any * @param [response] Api */ type GetApiCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Api) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApi}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|createApi}. * @param error Error, if any * @param [response] Api */ type CreateApiCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Api) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApi}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|updateApi}. * @param error Error, if any * @param [response] Api */ type UpdateApiCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Api) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApi}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApi}. * @param error Error, if any * @param [response] Empty */ type DeleteApiCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiVersions}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApiVersions}. * @param error Error, if any * @param [response] ListApiVersionsResponse */ type ListApiVersionsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApiVersionsResponse) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiVersion}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getApiVersion}. * @param error Error, if any * @param [response] ApiVersion */ type GetApiVersionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiVersion) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiVersion}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|createApiVersion}. * @param error Error, if any * @param [response] ApiVersion */ type CreateApiVersionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiVersion) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiVersion}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|updateApiVersion}. * @param error Error, if any * @param [response] ApiVersion */ type UpdateApiVersionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiVersion) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiVersion}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApiVersion}. * @param error Error, if any * @param [response] Empty */ type DeleteApiVersionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiSpecs}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApiSpecs}. * @param error Error, if any * @param [response] ListApiSpecsResponse */ type ListApiSpecsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApiSpecsResponse) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiSpec}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getApiSpec}. * @param error Error, if any * @param [response] ApiSpec */ type GetApiSpecCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiSpecContents}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getApiSpecContents}. * @param error Error, if any * @param [response] HttpBody */ type GetApiSpecContentsCallback = (error: (Error|null), response?: google.api.HttpBody) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiSpec}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|createApiSpec}. * @param error Error, if any * @param [response] ApiSpec */ type CreateApiSpecCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiSpec}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|updateApiSpec}. * @param error Error, if any * @param [response] ApiSpec */ type UpdateApiSpecCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiSpec}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApiSpec}. * @param error Error, if any * @param [response] Empty */ type DeleteApiSpecCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#tagApiSpecRevision}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|tagApiSpecRevision}. * @param error Error, if any * @param [response] ApiSpec */ type TagApiSpecRevisionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiSpecRevisions}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApiSpecRevisions}. * @param error Error, if any * @param [response] ListApiSpecRevisionsResponse */ type ListApiSpecRevisionsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#rollbackApiSpec}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|rollbackApiSpec}. * @param error Error, if any * @param [response] ApiSpec */ type RollbackApiSpecCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiSpecRevision}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApiSpecRevision}. * @param error Error, if any * @param [response] ApiSpec */ type DeleteApiSpecRevisionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiSpec) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiDeployments}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApiDeployments}. * @param error Error, if any * @param [response] ListApiDeploymentsResponse */ type ListApiDeploymentsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiDeployment}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getApiDeployment}. * @param error Error, if any * @param [response] ApiDeployment */ type GetApiDeploymentCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiDeployment}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|createApiDeployment}. * @param error Error, if any * @param [response] ApiDeployment */ type CreateApiDeploymentCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiDeployment}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|updateApiDeployment}. * @param error Error, if any * @param [response] ApiDeployment */ type UpdateApiDeploymentCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiDeployment}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApiDeployment}. * @param error Error, if any * @param [response] Empty */ type DeleteApiDeploymentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#tagApiDeploymentRevision}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|tagApiDeploymentRevision}. * @param error Error, if any * @param [response] ApiDeployment */ type TagApiDeploymentRevisionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiDeploymentRevisions}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApiDeploymentRevisions}. * @param error Error, if any * @param [response] ListApiDeploymentRevisionsResponse */ type ListApiDeploymentRevisionsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#rollbackApiDeployment}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|rollbackApiDeployment}. * @param error Error, if any * @param [response] ApiDeployment */ type RollbackApiDeploymentCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiDeploymentRevision}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApiDeploymentRevision}. * @param error Error, if any * @param [response] ApiDeployment */ type DeleteApiDeploymentRevisionCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ApiDeployment) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listArtifacts}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listArtifacts}. * @param error Error, if any * @param [response] ListArtifactsResponse */ type ListArtifactsCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.ListArtifactsResponse) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getArtifact}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getArtifact}. * @param error Error, if any * @param [response] Artifact */ type GetArtifactCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Artifact) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getArtifactContents}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getArtifactContents}. * @param error Error, if any * @param [response] HttpBody */ type GetArtifactContentsCallback = (error: (Error|null), response?: google.api.HttpBody) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createArtifact}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|createArtifact}. * @param error Error, if any * @param [response] Artifact */ type CreateArtifactCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Artifact) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#replaceArtifact}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|replaceArtifact}. * @param error Error, if any * @param [response] Artifact */ type ReplaceArtifactCallback = (error: (Error|null), response?: google.cloud.apigeeregistry.v1.Artifact) => void; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteArtifact}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteArtifact}. * @param error Error, if any * @param [response] Empty */ @@ -2354,6 +2431,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApisRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListApisResponse. */ @@ -2450,6 +2534,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApisResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetApiRequest. */ @@ -2540,6 +2631,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetApiRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateApiRequest. */ @@ -2642,6 +2740,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateApiRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateApiRequest. */ @@ -2744,6 +2849,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateApiRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteApiRequest. */ @@ -2834,6 +2946,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteApiRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListApiVersionsRequest. */ @@ -2942,6 +3061,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApiVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListApiVersionsResponse. */ @@ -3038,6 +3164,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApiVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetApiVersionRequest. */ @@ -3128,6 +3261,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetApiVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateApiVersionRequest. */ @@ -3230,6 +3370,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateApiVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateApiVersionRequest. */ @@ -3332,6 +3479,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateApiVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteApiVersionRequest. */ @@ -3422,6 +3576,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteApiVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListApiSpecsRequest. */ @@ -3530,6 +3691,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApiSpecsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListApiSpecsResponse. */ @@ -3626,6 +3794,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApiSpecsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetApiSpecRequest. */ @@ -3716,6 +3891,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetApiSpecRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetApiSpecContentsRequest. */ @@ -3806,6 +3988,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetApiSpecContentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateApiSpecRequest. */ @@ -3908,6 +4097,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateApiSpecRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateApiSpecRequest. */ @@ -4010,6 +4206,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateApiSpecRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteApiSpecRequest. */ @@ -4106,6 +4309,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteApiSpecRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TagApiSpecRevisionRequest. */ @@ -4202,6 +4412,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TagApiSpecRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListApiSpecRevisionsRequest. */ @@ -4304,6 +4521,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApiSpecRevisionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListApiSpecRevisionsResponse. */ @@ -4400,6 +4624,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApiSpecRevisionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RollbackApiSpecRequest. */ @@ -4496,6 +4727,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RollbackApiSpecRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteApiSpecRevisionRequest. */ @@ -4586,6 +4824,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteApiSpecRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListApiDeploymentsRequest. */ @@ -4694,6 +4939,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApiDeploymentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListApiDeploymentsResponse. */ @@ -4790,6 +5042,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApiDeploymentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetApiDeploymentRequest. */ @@ -4880,6 +5139,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetApiDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateApiDeploymentRequest. */ @@ -4982,6 +5248,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateApiDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateApiDeploymentRequest. */ @@ -5084,6 +5357,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateApiDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteApiDeploymentRequest. */ @@ -5180,6 +5460,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteApiDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TagApiDeploymentRevisionRequest. */ @@ -5276,6 +5563,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TagApiDeploymentRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListApiDeploymentRevisionsRequest. */ @@ -5378,6 +5672,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApiDeploymentRevisionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListApiDeploymentRevisionsResponse. */ @@ -5474,6 +5775,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListApiDeploymentRevisionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RollbackApiDeploymentRequest. */ @@ -5570,6 +5878,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RollbackApiDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteApiDeploymentRevisionRequest. */ @@ -5660,6 +5975,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteApiDeploymentRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListArtifactsRequest. */ @@ -5768,6 +6090,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListArtifactsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListArtifactsResponse. */ @@ -5864,6 +6193,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListArtifactsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetArtifactRequest. */ @@ -5954,6 +6290,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetArtifactRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetArtifactContentsRequest. */ @@ -6044,6 +6387,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetArtifactContentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateArtifactRequest. */ @@ -6146,6 +6496,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateArtifactRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReplaceArtifactRequest. */ @@ -6236,6 +6593,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReplaceArtifactRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteArtifactRequest. */ @@ -6326,6 +6690,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteArtifactRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -6428,6 +6799,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. */ @@ -6575,6 +6953,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. */ @@ -6671,6 +7056,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. */ @@ -6809,6 +7201,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 { @@ -6921,6 +7320,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 HttpBody. */ @@ -7023,6 +7429,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; } } @@ -7117,6 +7530,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. */ @@ -7157,6 +7577,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -7204,6 +7627,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 @@ -7273,6 +7699,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. */ @@ -7417,6 +7850,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 { @@ -7521,6 +7961,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. */ @@ -7617,6 +8064,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; } } @@ -7708,6 +8162,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. */ @@ -7858,6 +8319,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 { @@ -7986,6 +8454,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. */ @@ -8100,6 +8575,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 { @@ -8198,6 +8680,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; } } @@ -8301,6 +8790,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. */ @@ -8403,6 +8899,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. */ @@ -8523,6 +9026,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. */ @@ -8736,6 +9246,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 { @@ -8863,6 +9380,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. */ @@ -8880,6 +9404,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -8917,6 +9444,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -8995,6 +9525,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 { @@ -9102,6 +9639,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. */ @@ -9204,6 +9748,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. */ @@ -9300,6 +9851,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. */ @@ -9402,6 +9960,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. */ @@ -9513,6 +10078,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 { @@ -9649,6 +10221,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 { @@ -9747,6 +10326,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; } } @@ -9838,6 +10424,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 { @@ -9954,6 +10547,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; } } @@ -10045,6 +10645,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 { @@ -10063,6 +10670,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. */ @@ -10086,6 +10696,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 @@ -10155,6 +10768,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 + } } } @@ -10252,6 +10882,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. */ @@ -10348,6 +10985,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. */ @@ -10432,6 +11076,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 Timestamp. */ @@ -10528,6 +11179,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 a FieldMask. */ @@ -10618,6 +11276,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; } } @@ -10718,35 +11383,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 */ @@ -10868,6 +11533,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. */ @@ -10958,6 +11630,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. */ @@ -11066,6 +11745,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. */ @@ -11162,6 +11848,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. */ @@ -11252,6 +11945,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. */ @@ -11342,6 +12042,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. */ @@ -11438,6 +12145,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. */ @@ -11534,6 +12248,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; } } @@ -11640,6 +12361,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-apigeeregistry/protos/protos.js b/packages/google-cloud-apigeeregistry/protos/protos.js index e94c299b4e2..808a1bde682 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.js +++ b/packages/google-cloud-apigeeregistry/protos/protos.js @@ -99,7 +99,7 @@ }; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#createInstance}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning|createInstance}. * @memberof google.cloud.apigeeregistry.v1.Provisioning * @typedef CreateInstanceCallback * @type {function} @@ -132,7 +132,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#deleteInstance}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning|deleteInstance}. * @memberof google.cloud.apigeeregistry.v1.Provisioning * @typedef DeleteInstanceCallback * @type {function} @@ -165,7 +165,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning#getInstance}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Provisioning|getInstance}. * @memberof google.cloud.apigeeregistry.v1.Provisioning * @typedef GetInstanceCallback * @type {function} @@ -314,15 +314,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.instanceId = reader.string(); - break; - case 3: - message.instance = $root.google.cloud.apigeeregistry.v1.Instance.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.instanceId = reader.string(); + break; + } + case 3: { + message.instance = $root.google.cloud.apigeeregistry.v1.Instance.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -434,6 +437,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateInstanceRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.CreateInstanceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateInstanceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.CreateInstanceRequest"; + }; + return CreateInstanceRequest; })(); @@ -529,9 +547,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; @@ -621,6 +640,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteInstanceRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.DeleteInstanceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteInstanceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.DeleteInstanceRequest"; + }; + return DeleteInstanceRequest; })(); @@ -716,9 +750,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; @@ -808,6 +843,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetInstanceRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.GetInstanceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetInstanceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.GetInstanceRequest"; + }; + return GetInstanceRequest; })(); @@ -969,27 +1019,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.cancellationRequested = 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.cancellationRequested = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -1138,6 +1195,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.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.apigeeregistry.v1.OperationMetadata"; + }; + return OperationMetadata; })(); @@ -1288,24 +1360,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.stateMessage = reader.string(); - break; - case 6: - message.config = $root.google.cloud.apigeeregistry.v1.Instance.Config.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.stateMessage = reader.string(); + break; + } + case 6: { + message.config = $root.google.cloud.apigeeregistry.v1.Instance.Config.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1489,6 +1567,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Instance + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.Instance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Instance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.Instance"; + }; + /** * State enum. * @name google.cloud.apigeeregistry.v1.Instance.State @@ -1616,12 +1709,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.location = reader.string(); - break; - case 2: - message.cmekKeyName = reader.string(); - break; + case 1: { + message.location = reader.string(); + break; + } + case 2: { + message.cmekKeyName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -1720,6 +1815,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Config + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.Instance.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.apigeeregistry.v1.Instance.Config"; + }; + return Config; })(); @@ -1921,74 +2031,84 @@ 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 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: - message.availability = reader.string(); - break; - case 7: - message.recommendedVersion = reader.string(); - break; - case 8: - message.recommendedDeployment = reader.string(); - break; - case 9: - 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.description = 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: { + message.availability = reader.string(); + break; + } + case 7: { + message.recommendedVersion = reader.string(); + break; + } + case 8: { + message.recommendedDeployment = reader.string(); + break; + } + case 9: { + 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 10: - 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 10: { + 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; default: reader.skipType(tag & 7); break; @@ -2190,6 +2310,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Api + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.Api + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Api.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.Api"; + }; + return Api; })(); @@ -2366,68 +2501,76 @@ 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 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: - message.state = reader.string(); - break; - case 7: - 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.description = 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: { + message.state = reader.string(); + break; + } + case 7: { + 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 8: - 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 8: { + 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; default: reader.skipType(tag & 7); break; @@ -2613,6 +2756,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ApiVersion + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ApiVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApiVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ApiVersion"; + }; + return ApiVersion; })(); @@ -2855,86 +3013,100 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.filename = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.revisionId = reader.string(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.revisionUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.mimeType = reader.string(); - break; - case 9: - message.sizeBytes = reader.int32(); - break; - case 10: - message.hash = reader.string(); - break; - case 11: - message.sourceUri = reader.string(); - break; - case 12: - message.contents = reader.bytes(); - break; - case 14: - 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.filename = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.revisionId = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.revisionUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.mimeType = reader.string(); + break; + } + case 9: { + message.sizeBytes = reader.int32(); + break; + } + case 10: { + message.hash = reader.string(); + break; + } + case 11: { + message.sourceUri = reader.string(); + break; + } + case 12: { + message.contents = reader.bytes(); + break; + } + case 14: { + 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 15: - 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 15: { + 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; default: reader.skipType(tag & 7); break; @@ -3077,7 +3249,7 @@ if (object.contents != null) if (typeof object.contents === "string") $util.base64.decode(object.contents, message.contents = $util.newBuffer($util.base64.length(object.contents)), 0); - else if (object.contents.length) + else if (object.contents.length >= 0) message.contents = object.contents; if (object.labels) { if (typeof object.labels !== "object") @@ -3182,6 +3354,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ApiSpec + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ApiSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApiSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ApiSpec"; + }; + return ApiSpec; })(); @@ -3424,86 +3611,100 @@ 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 4: - message.revisionId = reader.string(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.revisionUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.apiSpecRevision = reader.string(); - break; - case 9: - message.endpointUri = reader.string(); - break; - case 10: - message.externalChannelUri = reader.string(); - break; - case 11: - message.intendedAudience = reader.string(); - break; - case 12: - message.accessGuidance = reader.string(); - break; - case 14: - 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.description = reader.string(); + break; + } + case 4: { + message.revisionId = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.revisionUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.apiSpecRevision = reader.string(); + break; + } + case 9: { + message.endpointUri = reader.string(); + break; + } + case 10: { + message.externalChannelUri = reader.string(); + break; + } + case 11: { + message.intendedAudience = reader.string(); + break; + } + case 12: { + message.accessGuidance = reader.string(); + break; + } + case 14: { + 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 15: - 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 15: { + 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; default: reader.skipType(tag & 7); break; @@ -3742,6 +3943,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ApiDeployment + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ApiDeployment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApiDeployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ApiDeployment"; + }; + return ApiDeployment; })(); @@ -3903,27 +4119,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.mimeType = reader.string(); - break; - case 5: - message.sizeBytes = reader.int32(); - break; - case 6: - message.hash = reader.string(); - break; - case 7: - message.contents = reader.bytes(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.mimeType = reader.string(); + break; + } + case 5: { + message.sizeBytes = reader.int32(); + break; + } + case 6: { + message.hash = reader.string(); + break; + } + case 7: { + message.contents = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -4020,7 +4243,7 @@ if (object.contents != null) if (typeof object.contents === "string") $util.base64.decode(object.contents, message.contents = $util.newBuffer($util.base64.length(object.contents)), 0); - else if (object.contents.length) + else if (object.contents.length >= 0) message.contents = object.contents; return message; }; @@ -4081,6 +4304,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Artifact + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.Artifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Artifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.Artifact"; + }; + return Artifact; })(); @@ -4117,7 +4355,7 @@ }; /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApis}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApis}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef ListApisCallback * @type {function} @@ -4150,7 +4388,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApi}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getApi}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef GetApiCallback * @type {function} @@ -4183,7 +4421,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApi}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|createApi}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef CreateApiCallback * @type {function} @@ -4216,7 +4454,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApi}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|updateApi}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef UpdateApiCallback * @type {function} @@ -4249,7 +4487,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApi}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApi}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef DeleteApiCallback * @type {function} @@ -4282,7 +4520,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiVersions}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApiVersions}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef ListApiVersionsCallback * @type {function} @@ -4315,7 +4553,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiVersion}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getApiVersion}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef GetApiVersionCallback * @type {function} @@ -4348,7 +4586,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiVersion}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|createApiVersion}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef CreateApiVersionCallback * @type {function} @@ -4381,7 +4619,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiVersion}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|updateApiVersion}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef UpdateApiVersionCallback * @type {function} @@ -4414,7 +4652,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiVersion}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApiVersion}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef DeleteApiVersionCallback * @type {function} @@ -4447,7 +4685,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiSpecs}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApiSpecs}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef ListApiSpecsCallback * @type {function} @@ -4480,7 +4718,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiSpec}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getApiSpec}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef GetApiSpecCallback * @type {function} @@ -4513,7 +4751,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiSpecContents}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getApiSpecContents}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef GetApiSpecContentsCallback * @type {function} @@ -4546,7 +4784,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiSpec}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|createApiSpec}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef CreateApiSpecCallback * @type {function} @@ -4579,7 +4817,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiSpec}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|updateApiSpec}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef UpdateApiSpecCallback * @type {function} @@ -4612,7 +4850,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiSpec}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApiSpec}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef DeleteApiSpecCallback * @type {function} @@ -4645,7 +4883,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#tagApiSpecRevision}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|tagApiSpecRevision}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef TagApiSpecRevisionCallback * @type {function} @@ -4678,7 +4916,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiSpecRevisions}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApiSpecRevisions}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef ListApiSpecRevisionsCallback * @type {function} @@ -4711,7 +4949,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#rollbackApiSpec}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|rollbackApiSpec}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef RollbackApiSpecCallback * @type {function} @@ -4744,7 +4982,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiSpecRevision}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApiSpecRevision}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef DeleteApiSpecRevisionCallback * @type {function} @@ -4777,7 +5015,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiDeployments}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApiDeployments}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef ListApiDeploymentsCallback * @type {function} @@ -4810,7 +5048,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getApiDeployment}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getApiDeployment}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef GetApiDeploymentCallback * @type {function} @@ -4843,7 +5081,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createApiDeployment}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|createApiDeployment}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef CreateApiDeploymentCallback * @type {function} @@ -4876,7 +5114,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#updateApiDeployment}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|updateApiDeployment}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef UpdateApiDeploymentCallback * @type {function} @@ -4909,7 +5147,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiDeployment}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApiDeployment}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef DeleteApiDeploymentCallback * @type {function} @@ -4942,7 +5180,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#tagApiDeploymentRevision}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|tagApiDeploymentRevision}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef TagApiDeploymentRevisionCallback * @type {function} @@ -4975,7 +5213,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listApiDeploymentRevisions}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listApiDeploymentRevisions}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef ListApiDeploymentRevisionsCallback * @type {function} @@ -5008,7 +5246,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#rollbackApiDeployment}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|rollbackApiDeployment}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef RollbackApiDeploymentCallback * @type {function} @@ -5041,7 +5279,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteApiDeploymentRevision}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteApiDeploymentRevision}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef DeleteApiDeploymentRevisionCallback * @type {function} @@ -5074,7 +5312,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#listArtifacts}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|listArtifacts}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef ListArtifactsCallback * @type {function} @@ -5107,7 +5345,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getArtifact}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getArtifact}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef GetArtifactCallback * @type {function} @@ -5140,7 +5378,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#getArtifactContents}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|getArtifactContents}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef GetArtifactContentsCallback * @type {function} @@ -5173,7 +5411,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#createArtifact}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|createArtifact}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef CreateArtifactCallback * @type {function} @@ -5206,7 +5444,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#replaceArtifact}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|replaceArtifact}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef ReplaceArtifactCallback * @type {function} @@ -5239,7 +5477,7 @@ */ /** - * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry#deleteArtifact}. + * Callback as used by {@link google.cloud.apigeeregistry.v1.Registry|deleteArtifact}. * @memberof google.cloud.apigeeregistry.v1.Registry * @typedef DeleteArtifactCallback * @type {function} @@ -5399,18 +5637,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; @@ -5525,6 +5767,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApisRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApisRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApisRequest"; + }; + return ListApisRequest; })(); @@ -5633,14 +5890,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.apis && message.apis.length)) - message.apis = []; - message.apis.push($root.google.cloud.apigeeregistry.v1.Api.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.apis && message.apis.length)) + message.apis = []; + message.apis.push($root.google.cloud.apigeeregistry.v1.Api.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5756,6 +6015,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApisResponse + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApisResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApisResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApisResponse"; + }; + return ListApisResponse; })(); @@ -5851,9 +6125,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; @@ -5943,6 +6218,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetApiRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.GetApiRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetApiRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.GetApiRequest"; + }; + return GetApiRequest; })(); @@ -6060,15 +6350,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.api = $root.google.cloud.apigeeregistry.v1.Api.decode(reader, reader.uint32()); - break; - case 3: - message.apiId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.api = $root.google.cloud.apigeeregistry.v1.Api.decode(reader, reader.uint32()); + break; + } + case 3: { + message.apiId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6180,6 +6473,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateApiRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.CreateApiRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateApiRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.CreateApiRequest"; + }; + return CreateApiRequest; })(); @@ -6297,15 +6605,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.api = $root.google.cloud.apigeeregistry.v1.Api.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.allowMissing = reader.bool(); - break; + case 1: { + message.api = $root.google.cloud.apigeeregistry.v1.Api.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -6422,6 +6733,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateApiRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.UpdateApiRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateApiRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.UpdateApiRequest"; + }; + return UpdateApiRequest; })(); @@ -6517,9 +6843,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; @@ -6609,6 +6936,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteApiRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteApiRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.DeleteApiRequest"; + }; + return DeleteApiRequest; })(); @@ -6737,18 +7079,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; @@ -6863,6 +7209,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApiVersionsRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApiVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApiVersionsRequest"; + }; + return ListApiVersionsRequest; })(); @@ -6971,14 +7332,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.apiVersions && message.apiVersions.length)) - message.apiVersions = []; - message.apiVersions.push($root.google.cloud.apigeeregistry.v1.ApiVersion.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.apiVersions && message.apiVersions.length)) + message.apiVersions = []; + message.apiVersions.push($root.google.cloud.apigeeregistry.v1.ApiVersion.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7094,6 +7457,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApiVersionsResponse + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApiVersionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApiVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApiVersionsResponse"; + }; + return ListApiVersionsResponse; })(); @@ -7189,9 +7567,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; @@ -7281,6 +7660,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetApiVersionRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.GetApiVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetApiVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.GetApiVersionRequest"; + }; + return GetApiVersionRequest; })(); @@ -7398,15 +7792,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.apiVersion = $root.google.cloud.apigeeregistry.v1.ApiVersion.decode(reader, reader.uint32()); - break; - case 3: - message.apiVersionId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.apiVersion = $root.google.cloud.apigeeregistry.v1.ApiVersion.decode(reader, reader.uint32()); + break; + } + case 3: { + message.apiVersionId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7518,6 +7915,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateApiVersionRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.CreateApiVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateApiVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.CreateApiVersionRequest"; + }; + return CreateApiVersionRequest; })(); @@ -7635,15 +8047,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.apiVersion = $root.google.cloud.apigeeregistry.v1.ApiVersion.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.allowMissing = reader.bool(); - break; + case 1: { + message.apiVersion = $root.google.cloud.apigeeregistry.v1.ApiVersion.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -7760,6 +8175,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateApiVersionRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.UpdateApiVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateApiVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.UpdateApiVersionRequest"; + }; + return UpdateApiVersionRequest; })(); @@ -7855,9 +8285,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; @@ -7947,6 +8378,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteApiVersionRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteApiVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.DeleteApiVersionRequest"; + }; + return DeleteApiVersionRequest; })(); @@ -8075,18 +8521,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; @@ -8201,6 +8651,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApiSpecsRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApiSpecsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApiSpecsRequest"; + }; + return ListApiSpecsRequest; })(); @@ -8309,14 +8774,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.apiSpecs && message.apiSpecs.length)) - message.apiSpecs = []; - message.apiSpecs.push($root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.apiSpecs && message.apiSpecs.length)) + message.apiSpecs = []; + message.apiSpecs.push($root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8432,6 +8899,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApiSpecsResponse + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApiSpecsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApiSpecsResponse"; + }; + return ListApiSpecsResponse; })(); @@ -8527,9 +9009,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; @@ -8619,6 +9102,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetApiSpecRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetApiSpecRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.GetApiSpecRequest"; + }; + return GetApiSpecRequest; })(); @@ -8714,9 +9212,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; @@ -8806,6 +9305,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetApiSpecContentsRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetApiSpecContentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest"; + }; + return GetApiSpecContentsRequest; })(); @@ -8923,15 +9437,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.apiSpec = $root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32()); - break; - case 3: - message.apiSpecId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.apiSpec = $root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32()); + break; + } + case 3: { + message.apiSpecId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9043,6 +9560,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateApiSpecRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.CreateApiSpecRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateApiSpecRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.CreateApiSpecRequest"; + }; + return CreateApiSpecRequest; })(); @@ -9160,15 +9692,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.apiSpec = $root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.allowMissing = reader.bool(); - break; + case 1: { + message.apiSpec = $root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -9285,6 +9820,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateApiSpecRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.UpdateApiSpecRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateApiSpecRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.UpdateApiSpecRequest"; + }; + return UpdateApiSpecRequest; })(); @@ -9391,12 +9941,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.force = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -9495,6 +10047,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteApiSpecRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteApiSpecRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.DeleteApiSpecRequest"; + }; + return DeleteApiSpecRequest; })(); @@ -9601,12 +10168,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.tag = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.tag = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9705,6 +10274,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TagApiSpecRevisionRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TagApiSpecRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest"; + }; + return TagApiSpecRevisionRequest; })(); @@ -9822,15 +10406,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9937,6 +10524,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApiSpecRevisionsRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApiSpecRevisionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest"; + }; + return ListApiSpecRevisionsRequest; })(); @@ -10045,14 +10647,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.apiSpecs && message.apiSpecs.length)) - message.apiSpecs = []; - message.apiSpecs.push($root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.apiSpecs && message.apiSpecs.length)) + message.apiSpecs = []; + message.apiSpecs.push($root.google.cloud.apigeeregistry.v1.ApiSpec.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10168,6 +10772,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApiSpecRevisionsResponse + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApiSpecRevisionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse"; + }; + return ListApiSpecRevisionsResponse; })(); @@ -10274,12 +10893,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.revisionId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.revisionId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10378,6 +10999,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RollbackApiSpecRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.RollbackApiSpecRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RollbackApiSpecRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.RollbackApiSpecRequest"; + }; + return RollbackApiSpecRequest; })(); @@ -10473,9 +11109,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; @@ -10565,6 +11202,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteApiSpecRevisionRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteApiSpecRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest"; + }; + return DeleteApiSpecRevisionRequest; })(); @@ -10693,18 +11345,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; @@ -10819,6 +11475,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApiDeploymentsRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApiDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest"; + }; + return ListApiDeploymentsRequest; })(); @@ -10927,14 +11598,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.apiDeployments && message.apiDeployments.length)) - message.apiDeployments = []; - message.apiDeployments.push($root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.apiDeployments && message.apiDeployments.length)) + message.apiDeployments = []; + message.apiDeployments.push($root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11050,6 +11723,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApiDeploymentsResponse + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApiDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse"; + }; + return ListApiDeploymentsResponse; })(); @@ -11145,9 +11833,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; @@ -11237,6 +11926,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetApiDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.GetApiDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetApiDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.GetApiDeploymentRequest"; + }; + return GetApiDeploymentRequest; })(); @@ -11354,15 +12058,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.apiDeployment = $root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32()); - break; - case 3: - message.apiDeploymentId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.apiDeployment = $root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.apiDeploymentId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11474,6 +12181,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateApiDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateApiDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest"; + }; + return CreateApiDeploymentRequest; })(); @@ -11591,15 +12313,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.apiDeployment = $root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.allowMissing = reader.bool(); - break; + case 1: { + message.apiDeployment = $root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -11716,6 +12441,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateApiDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateApiDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest"; + }; + return UpdateApiDeploymentRequest; })(); @@ -11822,12 +12562,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.force = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -11926,6 +12668,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteApiDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteApiDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest"; + }; + return DeleteApiDeploymentRequest; })(); @@ -12032,12 +12789,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.tag = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.tag = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12132,8 +12891,23 @@ * @instance * @returns {Object.} JSON object */ - TagApiDeploymentRevisionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + TagApiDeploymentRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TagApiDeploymentRevisionRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TagApiDeploymentRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest"; }; return TagApiDeploymentRevisionRequest; @@ -12253,15 +13027,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12368,6 +13145,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApiDeploymentRevisionsRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApiDeploymentRevisionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest"; + }; + return ListApiDeploymentRevisionsRequest; })(); @@ -12476,14 +13268,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.apiDeployments && message.apiDeployments.length)) - message.apiDeployments = []; - message.apiDeployments.push($root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.apiDeployments && message.apiDeployments.length)) + message.apiDeployments = []; + message.apiDeployments.push($root.google.cloud.apigeeregistry.v1.ApiDeployment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12599,6 +13393,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListApiDeploymentRevisionsResponse + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListApiDeploymentRevisionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse"; + }; + return ListApiDeploymentRevisionsResponse; })(); @@ -12705,12 +13514,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.revisionId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.revisionId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12809,6 +13620,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RollbackApiDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RollbackApiDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest"; + }; + return RollbackApiDeploymentRequest; })(); @@ -12904,9 +13730,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; @@ -12996,6 +13823,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteApiDeploymentRevisionRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteApiDeploymentRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest"; + }; + return DeleteApiDeploymentRevisionRequest; })(); @@ -13124,18 +13966,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; @@ -13250,6 +14096,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListArtifactsRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListArtifactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListArtifactsRequest"; + }; + return ListArtifactsRequest; })(); @@ -13358,14 +14219,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.artifacts && message.artifacts.length)) - message.artifacts = []; - message.artifacts.push($root.google.cloud.apigeeregistry.v1.Artifact.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.artifacts && message.artifacts.length)) + message.artifacts = []; + message.artifacts.push($root.google.cloud.apigeeregistry.v1.Artifact.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13481,6 +14344,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListArtifactsResponse + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ListArtifactsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListArtifactsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ListArtifactsResponse"; + }; + return ListArtifactsResponse; })(); @@ -13576,9 +14454,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; @@ -13668,6 +14547,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetArtifactRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.GetArtifactRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetArtifactRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.GetArtifactRequest"; + }; + return GetArtifactRequest; })(); @@ -13763,9 +14657,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; @@ -13855,6 +14750,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetArtifactContentsRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.GetArtifactContentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetArtifactContentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.GetArtifactContentsRequest"; + }; + return GetArtifactContentsRequest; })(); @@ -13972,15 +14882,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.artifact = $root.google.cloud.apigeeregistry.v1.Artifact.decode(reader, reader.uint32()); - break; - case 3: - message.artifactId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.artifact = $root.google.cloud.apigeeregistry.v1.Artifact.decode(reader, reader.uint32()); + break; + } + case 3: { + message.artifactId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14092,6 +15005,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateArtifactRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.CreateArtifactRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateArtifactRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.CreateArtifactRequest"; + }; + return CreateArtifactRequest; })(); @@ -14187,9 +15115,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.artifact = $root.google.cloud.apigeeregistry.v1.Artifact.decode(reader, reader.uint32()); - break; + case 1: { + message.artifact = $root.google.cloud.apigeeregistry.v1.Artifact.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -14284,6 +15213,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReplaceArtifactRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.ReplaceArtifactRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReplaceArtifactRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.ReplaceArtifactRequest"; + }; + return ReplaceArtifactRequest; })(); @@ -14379,9 +15323,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; @@ -14471,6 +15416,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteArtifactRequest + * @function getTypeUrl + * @memberof google.cloud.apigeeregistry.v1.DeleteArtifactRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteArtifactRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.apigeeregistry.v1.DeleteArtifactRequest"; + }; + return DeleteArtifactRequest; })(); @@ -14597,14 +15557,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; @@ -14720,6 +15682,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; })(); @@ -14930,38 +15907,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; @@ -15183,6 +16170,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; })(); @@ -15289,12 +16291,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; @@ -15393,6 +16397,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; })(); @@ -15587,36 +16606,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; @@ -15814,6 +16840,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 @@ -15950,12 +16991,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; @@ -16054,6 +17097,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; })(); @@ -16173,17 +17231,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; @@ -16254,7 +17315,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)) @@ -16317,6 +17378,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; })(); @@ -16426,11 +17502,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; @@ -16537,6 +17614,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; })(); @@ -16558,6 +17650,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 */ /** @@ -16678,6 +17771,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 @@ -16733,6 +17834,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; }; @@ -16767,66 +17870,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; @@ -16938,6 +18057,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; }; @@ -17030,6 +18152,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -17061,6 +18185,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -17107,6 +18232,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; }; @@ -17121,6 +18248,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; })(); @@ -17331,52 +18473,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; @@ -17677,6 +18829,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() { /** @@ -17791,15 +18958,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; @@ -17911,6 +19081,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; })(); @@ -18017,12 +19202,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; @@ -18121,6 +19308,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; })(); @@ -18221,11 +19423,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; @@ -18332,6 +19535,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; })(); @@ -18537,39 +19755,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; @@ -18856,6 +20085,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 @@ -19024,12 +20268,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; @@ -19133,6 +20379,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; })(); @@ -19278,27 +20539,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; @@ -19474,6 +20740,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() { /** @@ -19577,12 +20858,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; @@ -19681,6 +20964,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; })(); @@ -19801,15 +21099,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; @@ -19921,6 +21222,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; })(); @@ -20040,17 +21356,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; @@ -20180,6 +21499,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; })(); @@ -20330,24 +21664,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; @@ -20483,6 +21823,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; })(); @@ -20813,76 +22168,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; @@ -21195,6 +22572,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 @@ -21363,26 +22755,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; @@ -21536,6 +22934,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; })(); @@ -21549,6 +22962,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 @@ -21605,6 +23019,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -21681,6 +23103,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(); @@ -21726,42 +23150,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; @@ -21821,6 +23258,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"; @@ -21906,6 +23346,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) @@ -21993,6 +23435,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")) @@ -22007,6 +23450,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) @@ -22033,6 +23478,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 @@ -22162,11 +23622,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; @@ -22273,6 +23734,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; })(); @@ -22392,17 +23868,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; @@ -22527,6 +24006,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; })(); @@ -22635,14 +24129,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; @@ -22758,6 +24254,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; })(); @@ -22888,20 +24399,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; @@ -23034,6 +24549,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; })(); @@ -23188,28 +24718,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; @@ -23399,6 +24935,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 @@ -23578,29 +25129,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; @@ -23713,7 +25271,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); @@ -23794,6 +25352,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() { /** @@ -23895,12 +25468,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; @@ -24001,6 +25576,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; })(); @@ -24101,11 +25691,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; @@ -24212,6 +25803,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() { /** @@ -24360,37 +25966,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; @@ -24551,6 +26162,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; })(); @@ -24651,11 +26277,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; @@ -24762,6 +26389,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() { /** @@ -24772,6 +26414,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 */ /** @@ -24822,6 +26465,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 @@ -24858,6 +26509,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; }; @@ -24892,25 +26545,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; @@ -24962,6 +26623,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; }; @@ -24990,6 +26660,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; }; @@ -25012,6 +26696,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -25024,6 +26709,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; }; @@ -25038,6 +26725,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; })(); @@ -25147,12 +26865,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; @@ -25214,7 +26934,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; }; @@ -25260,6 +26980,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; })(); @@ -25366,12 +27101,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; @@ -25484,6 +27221,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; })(); @@ -25644,6 +27396,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; })(); @@ -25750,12 +27517,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; @@ -25868,6 +27637,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; })(); @@ -25965,11 +27749,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; @@ -26071,6 +27856,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; })(); @@ -26119,7 +27919,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} @@ -26152,7 +27952,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} @@ -26185,7 +27985,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} @@ -26218,7 +28018,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} @@ -26251,7 +28051,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} @@ -26436,21 +28236,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; @@ -26601,6 +28406,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; })(); @@ -26696,9 +28516,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; @@ -26788,6 +28609,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; })(); @@ -26916,18 +28752,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; @@ -27042,6 +28882,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; })(); @@ -27150,14 +29005,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; @@ -27273,6 +29130,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; })(); @@ -27368,9 +29240,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; @@ -27460,6 +29333,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; })(); @@ -27555,9 +29443,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; @@ -27647,6 +29536,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; })(); @@ -27753,12 +29657,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; @@ -27862,6 +29768,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; })(); @@ -27968,12 +29889,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; @@ -28072,6 +29995,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; })(); @@ -28203,17 +30141,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; @@ -28338,6 +30279,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-apigeeregistry/protos/protos.json b/packages/google-cloud-apigeeregistry/protos/protos.json index 5e1bc2b97cd..0cb7b3416a4 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.json +++ b/packages/google-cloud-apigeeregistry/protos/protos.json @@ -2363,6 +2363,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -2891,6 +2895,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -3183,6 +3194,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 23b660c06303b15976c35b4d7047bb8dbced64a7 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:02:24 +0000 Subject: [PATCH 13/40] fix: do not import the whole google-gax from proto JS (#1553) (#15) 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-apigeeregistry/package.json | 2 +- packages/google-cloud-apigeeregistry/protos/protos.d.ts | 2 +- packages/google-cloud-apigeeregistry/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 4d56f04fc72..61e77b81b04 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^3.1.3" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-apigeeregistry/protos/protos.d.ts b/packages/google-cloud-apigeeregistry/protos/protos.d.ts index 761e29eaaf5..779da33d229 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.d.ts +++ b/packages/google-cloud-apigeeregistry/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-apigeeregistry/protos/protos.js b/packages/google-cloud-apigeeregistry/protos/protos.js index 808a1bde682..4d1b27b5a45 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.js +++ b/packages/google-cloud-apigeeregistry/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 32c04fb2b768962f5cbb6d60c7bb2d23d82b1b76 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 30 Aug 2022 17:15:23 -0400 Subject: [PATCH 14/40] fix: use _gaxModule when accessing gax for bundling (#11) feat: added support for `force` field for API and API version deletion docs: updated proto comments to align with the public documentation PiperOrigin-RevId: 468760464 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 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Sofia Leon --- .../google-cloud-apigeeregistry/.jsdoc.js | 2 +- .../linkinator.config.json | 5 +- .../v1/provisioning_service.proto | 2 +- .../apigeeregistry/v1/registry_models.proto | 44 +-- .../apigeeregistry/v1/registry_service.proto | 166 +++++---- .../protos/protos.d.ts | 12 + .../protos/protos.js | 52 ++- .../protos/protos.json | 8 + .../v1/provisioning.create_instance.js | 5 +- .../v1/provisioning.delete_instance.js | 5 +- .../generated/v1/provisioning.get_instance.js | 5 +- .../generated/v1/registry.create_api.js | 11 +- .../v1/registry.create_api_deployment.js | 7 +- .../generated/v1/registry.create_api_spec.js | 7 +- .../v1/registry.create_api_version.js | 7 +- .../generated/v1/registry.create_artifact.js | 7 +- .../generated/v1/registry.delete_api.js | 12 +- .../v1/registry.delete_api_deployment.js | 7 +- ...registry.delete_api_deployment_revision.js | 7 +- .../generated/v1/registry.delete_api_spec.js | 7 +- .../v1/registry.delete_api_spec_revision.js | 7 +- .../v1/registry.delete_api_version.js | 12 +- .../generated/v1/registry.delete_artifact.js | 7 +- .../samples/generated/v1/registry.get_api.js | 7 +- .../v1/registry.get_api_deployment.js | 7 +- .../generated/v1/registry.get_api_spec.js | 7 +- .../v1/registry.get_api_spec_contents.js | 7 +- .../generated/v1/registry.get_api_version.js | 7 +- .../generated/v1/registry.get_artifact.js | 7 +- .../v1/registry.get_artifact_contents.js | 7 +- .../registry.list_api_deployment_revisions.js | 5 +- .../v1/registry.list_api_deployments.js | 7 +- .../v1/registry.list_api_spec_revisions.js | 5 +- .../generated/v1/registry.list_api_specs.js | 7 +- .../v1/registry.list_api_versions.js | 7 +- .../generated/v1/registry.list_apis.js | 7 +- .../generated/v1/registry.list_artifacts.js | 7 +- .../generated/v1/registry.replace_artifact.js | 7 +- .../v1/registry.rollback_api_deployment.js | 7 +- .../v1/registry.rollback_api_spec.js | 7 +- .../registry.tag_api_deployment_revision.js | 5 +- .../v1/registry.tag_api_spec_revision.js | 5 +- .../generated/v1/registry.update_api.js | 13 +- .../v1/registry.update_api_deployment.js | 11 +- .../generated/v1/registry.update_api_spec.js | 11 +- .../v1/registry.update_api_version.js | 11 +- ...tadata.google.cloud.apigeeregistry.v1.json | 154 ++++---- .../src/v1/gapic_metadata.json | 2 +- .../src/v1/provisioning_client.ts | 66 ++-- .../src/v1/registry_client.ts | 348 ++++++++++-------- .../test/gapic_provisioning_v1.ts | 156 ++++---- .../test/gapic_registry_v1.ts | 157 ++++---- 52 files changed, 854 insertions(+), 604 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/.jsdoc.js b/packages/google-cloud-apigeeregistry/.jsdoc.js index 4d488530161..2efe6c2e060 100644 --- a/packages/google-cloud-apigeeregistry/.jsdoc.js +++ b/packages/google-cloud-apigeeregistry/.jsdoc.js @@ -43,7 +43,7 @@ module.exports = { copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, - systemName: '@google-cloud/apigeeregistry', + systemName: '@google-cloud/apigee-registry', theme: 'lumen', default: { outputSourceFiles: false diff --git a/packages/google-cloud-apigeeregistry/linkinator.config.json b/packages/google-cloud-apigeeregistry/linkinator.config.json index 66a1467385d..befd23c8633 100644 --- a/packages/google-cloud-apigeeregistry/linkinator.config.json +++ b/packages/google-cloud-apigeeregistry/linkinator.config.json @@ -5,10 +5,7 @@ "www.googleapis.com", "img.shields.io", "https://console.cloud.google.com/cloudshell", - "https://support.google.com", - "https://cloud.google.com/nodejs/docs/reference/apigeeregistry/latest", - "https://github.com/googleapis/nodejs-apigee-registry/blob/master/CHANGELOG.md", - "https://github.com/googleapis/nodejs-apigee-registry/blob/addSamples/CHANGELOG.md" + "https://support.google.com" ], "silent": true, "concurrency": 5, diff --git a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto index 8ecc5a1ff96..9e7baee5866 100644 --- a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto +++ b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto @@ -185,7 +185,7 @@ message Instance { } // Format: `projects/*/locations/*/instance`. - // Currently only locations/global is supported. + // Currently only `locations/global` is supported. string name = 1; // Output only. Creation timestamp. diff --git a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto index 002a8b2138e..8411f9ecf7f 100644 --- a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto +++ b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto @@ -28,8 +28,8 @@ option java_package = "com.google.cloud.apigeeregistry.v1"; option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1"; option ruby_package = "Google::Cloud::ApigeeRegistry::V1"; -// An Api is a top-level description of an API. -// Apis are produced by producers and are commitments to provide services. +// A top-level description of an API. +// Produced by producers and are commitments to provide services. message Api { option (google.api.resource) = { type: "apigeeregistry.googleapis.com/Api" @@ -53,17 +53,17 @@ message Api { // A user-definable description of the availability of this service. // Format: free-form, but we expect single words that describe availability, - // e.g. "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN". + // e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN". string availability = 6; // The recommended version of the API. - // Format: apis/{api}/versions/{version} + // Format: `apis/{api}/versions/{version}` string recommended_version = 7 [(google.api.resource_reference) = { type: "apigeeregistry.googleapis.com/ApiVersion" }]; // The recommended deployment of the API. - // Format: apis/{api}/deployments/{deployment} + // Format: `apis/{api}/deployments/{deployment}` string recommended_deployment = 8 [(google.api.resource_reference) = { type: "apigeeregistry.googleapis.com/ApiDeployment" }]; @@ -73,13 +73,13 @@ message Api { // // Label keys and values can be no longer than 64 characters // (Unicode codepoints), can only contain lowercase letters, numeric - // characters, underscores and dashes. International characters are allowed. + // characters, underscores, and dashes. International characters are allowed. // No more than 64 user labels can be associated with one resource (System // labels are excluded). // // See https://goo.gl/xmQnxf for more information and examples of labels. // System reserved label keys are prefixed with - // "apigeeregistry.googleapis.com/" and cannot be changed. + // `apigeeregistry.googleapis.com/` and cannot be changed. map labels = 9; // Annotations attach non-identifying metadata to resources. @@ -90,7 +90,7 @@ message Api { map annotations = 10; } -// An ApiVersion describes a particular version of an API. +// Describes a particular version of an API. // ApiVersions are what consumers actually use. message ApiVersion { option (google.api.resource) = { @@ -115,7 +115,7 @@ message ApiVersion { // A user-definable description of the lifecycle phase of this API version. // Format: free-form, but we expect single words that describe API maturity, - // e.g. "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", + // e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", // "DEPRECATED", "RETIRED". string state = 6; @@ -130,7 +130,7 @@ message ApiVersion { // // See https://goo.gl/xmQnxf for more information and examples of labels. // System reserved label keys are prefixed with - // "apigeeregistry.googleapis.com/" and cannot be changed. + // `apigeeregistry.googleapis.com/` and cannot be changed. map labels = 7; // Annotations attach non-identifying metadata to resources. @@ -141,11 +141,11 @@ message ApiVersion { map annotations = 8; } -// An ApiSpec describes a version of an API in a structured way. +// Describes a version of an API in a structured way. // ApiSpecs provide formal descriptions that consumers can use to use a version. // ApiSpec resources are intended to be fully-resolved descriptions of an // ApiVersion. When specs consist of multiple files, these should be bundled -// together (e.g. in a zip archive) and stored as a unit. Multiple specs can +// together (e.g., in a zip archive) and stored as a unit. Multiple specs can // exist to provide representations in different API description formats. // Synchronization of these representations would be provided by tooling and // background services. @@ -183,8 +183,8 @@ message ApiSpec { // A style (format) descriptor for this spec that is specified as a Media Type // (https://en.wikipedia.org/wiki/Media_type). Possible values include - // "application/vnd.apigee.proto", "application/vnd.apigee.openapi", and - // "application/vnd.apigee.graphql", with possible suffixes representing + // `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and + // `application/vnd.apigee.graphql`, with possible suffixes representing // compression types. These hypothetical names are defined in the vendor tree // defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. // Content types can specify compression. Currently only GZip compression is @@ -221,7 +221,7 @@ message ApiSpec { // // See https://goo.gl/xmQnxf for more information and examples of labels. // System reserved label keys are prefixed with - // "apigeeregistry.googleapis.com/" and cannot be changed. + // `apigeeregistry.googleapis.com/` and cannot be changed. map labels = 14; // Annotations attach non-identifying metadata to resources. @@ -232,7 +232,7 @@ message ApiSpec { map annotations = 15; } -// An ApiDeployment describes a service running at particular address that +// Describes a service running at particular address that // provides a particular version of an API. ApiDeployments have revisions which // correspond to different configurations of a single deployment in time. // Revision identifiers should be updated whenever the served API spec or @@ -269,9 +269,9 @@ message ApiDeployment { // Output only. Last update timestamp: when the represented revision was last modified. google.protobuf.Timestamp revision_update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The full resource name (including revision id) of the spec of the API being + // The full resource name (including revision ID) of the spec of the API being // served by the deployment. Changes to this value will update the revision. - // Format: apis/{api}/deployments/{deployment} + // Format: `apis/{api}/deployments/{deployment}` string api_spec_revision = 8 [(google.api.resource_reference) = { type: "apigeeregistry.googleapis.com/ApiSpec" }]; @@ -280,7 +280,7 @@ message ApiDeployment { // update the revision. string endpoint_uri = 9; - // The address of the external channel of the API (e.g. the Developer + // The address of the external channel of the API (e.g., the Developer // Portal). Changes to this value will not affect the revision. string external_channel_uri = 10; @@ -303,7 +303,7 @@ message ApiDeployment { // // See https://goo.gl/xmQnxf for more information and examples of labels. // System reserved label keys are prefixed with - // "apigeeregistry.googleapis.com/" and cannot be changed. + // `apigeeregistry.googleapis.com/` and cannot be changed. map labels = 14; // Annotations attach non-identifying metadata to resources. @@ -318,8 +318,8 @@ message ApiDeployment { // and are used to store metadata that is too large or numerous to be stored // directly on the resource. Since artifacts are stored separately from parent // resources, they should generally be used for metadata that is needed -// infrequently, i.e. not for display in primary views of the resource but -// perhaps displayed or downloaded upon request. The ListArtifacts method +// infrequently, i.e., not for display in primary views of the resource but +// perhaps displayed or downloaded upon request. The `ListArtifacts` method // allows artifacts to be quickly enumerated and checked for presence without // downloading their (potentially-large) contents. message Artifact { diff --git a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto index f191336f16e..1eec64e8b8f 100644 --- a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto +++ b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto @@ -38,7 +38,7 @@ service Registry { option (google.api.default_host) = "apigeeregistry.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - // ListApis returns matching APIs. + // Returns matching APIs. rpc ListApis(ListApisRequest) returns (ListApisResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/apis" @@ -46,7 +46,7 @@ service Registry { option (google.api.method_signature) = "parent"; } - // GetApi returns a specified API. + // Returns a specified API. rpc GetApi(GetApiRequest) returns (Api) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/apis/*}" @@ -54,7 +54,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // CreateApi creates a specified API. + // Creates a specified API. rpc CreateApi(CreateApiRequest) returns (Api) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/apis" @@ -63,7 +63,7 @@ service Registry { option (google.api.method_signature) = "parent,api,api_id"; } - // UpdateApi can be used to modify a specified API. + // Used to modify a specified API. rpc UpdateApi(UpdateApiRequest) returns (Api) { option (google.api.http) = { patch: "/v1/{api.name=projects/*/locations/*/apis/*}" @@ -72,7 +72,7 @@ service Registry { option (google.api.method_signature) = "api,update_mask"; } - // DeleteApi removes a specified API and all of the resources that it + // Removes a specified API and all of the resources that it // owns. rpc DeleteApi(DeleteApiRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -81,7 +81,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // ListApiVersions returns matching versions. + // Returns matching versions. rpc ListApiVersions(ListApiVersionsRequest) returns (ListApiVersionsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/apis/*}/versions" @@ -89,7 +89,7 @@ service Registry { option (google.api.method_signature) = "parent"; } - // GetApiVersion returns a specified version. + // Returns a specified version. rpc GetApiVersion(GetApiVersionRequest) returns (ApiVersion) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/apis/*/versions/*}" @@ -97,7 +97,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // CreateApiVersion creates a specified version. + // Creates a specified version. rpc CreateApiVersion(CreateApiVersionRequest) returns (ApiVersion) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/apis/*}/versions" @@ -106,7 +106,7 @@ service Registry { option (google.api.method_signature) = "parent,api_version,api_version_id"; } - // UpdateApiVersion can be used to modify a specified version. + // Used to modify a specified version. rpc UpdateApiVersion(UpdateApiVersionRequest) returns (ApiVersion) { option (google.api.http) = { patch: "/v1/{api_version.name=projects/*/locations/*/apis/*/versions/*}" @@ -115,7 +115,7 @@ service Registry { option (google.api.method_signature) = "api_version,update_mask"; } - // DeleteApiVersion removes a specified version and all of the resources that + // Removes a specified version and all of the resources that // it owns. rpc DeleteApiVersion(DeleteApiVersionRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -124,7 +124,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // ListApiSpecs returns matching specs. + // Returns matching specs. rpc ListApiSpecs(ListApiSpecsRequest) returns (ListApiSpecsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs" @@ -132,7 +132,7 @@ service Registry { option (google.api.method_signature) = "parent"; } - // GetApiSpec returns a specified spec. + // Returns a specified spec. rpc GetApiSpec(GetApiSpecRequest) returns (ApiSpec) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}" @@ -140,7 +140,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // GetApiSpecContents returns the contents of a specified spec. + // Returns the contents of a specified spec. // If specs are stored with GZip compression, the default behavior // is to return the spec uncompressed (the mime_type response field // indicates the exact format returned). @@ -151,7 +151,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // CreateApiSpec creates a specified spec. + // Creates a specified spec. rpc CreateApiSpec(CreateApiSpecRequest) returns (ApiSpec) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs" @@ -160,7 +160,7 @@ service Registry { option (google.api.method_signature) = "parent,api_spec,api_spec_id"; } - // UpdateApiSpec can be used to modify a specified spec. + // Used to modify a specified spec. rpc UpdateApiSpec(UpdateApiSpecRequest) returns (ApiSpec) { option (google.api.http) = { patch: "/v1/{api_spec.name=projects/*/locations/*/apis/*/versions/*/specs/*}" @@ -169,8 +169,8 @@ service Registry { option (google.api.method_signature) = "api_spec,update_mask"; } - // DeleteApiSpec removes a specified spec, all revisions, and all child - // resources (e.g. artifacts). + // Removes a specified spec, all revisions, and all child + // resources (e.g., artifacts). rpc DeleteApiSpec(DeleteApiSpecRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}" @@ -178,7 +178,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // TagApiSpecRevision adds a tag to a specified revision of a spec. + // Adds a tag to a specified revision of a spec. rpc TagApiSpecRevision(TagApiSpecRevisionRequest) returns (ApiSpec) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision" @@ -186,7 +186,7 @@ service Registry { }; } - // ListApiSpecRevisions lists all revisions of a spec. + // Lists all revisions of a spec. // Revisions are returned in descending order of revision creation time. rpc ListApiSpecRevisions(ListApiSpecRevisionsRequest) returns (ListApiSpecRevisionsResponse) { option (google.api.http) = { @@ -194,7 +194,7 @@ service Registry { }; } - // RollbackApiSpec sets the current revision to a specified prior revision. + // Sets the current revision to a specified prior revision. // Note that this creates a new revision with a new revision ID. rpc RollbackApiSpec(RollbackApiSpecRequest) returns (ApiSpec) { option (google.api.http) = { @@ -203,7 +203,7 @@ service Registry { }; } - // DeleteApiSpecRevision deletes a revision of a spec. + // Deletes a revision of a spec. rpc DeleteApiSpecRevision(DeleteApiSpecRevisionRequest) returns (ApiSpec) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision" @@ -211,7 +211,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // ListApiDeployments returns matching deployments. + // Returns matching deployments. rpc ListApiDeployments(ListApiDeploymentsRequest) returns (ListApiDeploymentsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/apis/*}/deployments" @@ -219,7 +219,7 @@ service Registry { option (google.api.method_signature) = "parent"; } - // GetApiDeployment returns a specified deployment. + // Returns a specified deployment. rpc GetApiDeployment(GetApiDeploymentRequest) returns (ApiDeployment) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}" @@ -227,7 +227,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // CreateApiDeployment creates a specified deployment. + // Creates a specified deployment. rpc CreateApiDeployment(CreateApiDeploymentRequest) returns (ApiDeployment) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/apis/*}/deployments" @@ -236,7 +236,7 @@ service Registry { option (google.api.method_signature) = "parent,api_deployment,api_deployment_id"; } - // UpdateApiDeployment can be used to modify a specified deployment. + // Used to modify a specified deployment. rpc UpdateApiDeployment(UpdateApiDeploymentRequest) returns (ApiDeployment) { option (google.api.http) = { patch: "/v1/{api_deployment.name=projects/*/locations/*/apis/*/deployments/*}" @@ -245,8 +245,8 @@ service Registry { option (google.api.method_signature) = "api_deployment,update_mask"; } - // DeleteApiDeployment removes a specified deployment, all revisions, and all - // child resources (e.g. artifacts). + // Removes a specified deployment, all revisions, and all + // child resources (e.g., artifacts). rpc DeleteApiDeployment(DeleteApiDeploymentRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}" @@ -254,7 +254,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // TagApiDeploymentRevision adds a tag to a specified revision of a + // Adds a tag to a specified revision of a // deployment. rpc TagApiDeploymentRevision(TagApiDeploymentRevisionRequest) returns (ApiDeployment) { option (google.api.http) = { @@ -263,7 +263,7 @@ service Registry { }; } - // ListApiDeploymentRevisions lists all revisions of a deployment. + // Lists all revisions of a deployment. // Revisions are returned in descending order of revision creation time. rpc ListApiDeploymentRevisions(ListApiDeploymentRevisionsRequest) returns (ListApiDeploymentRevisionsResponse) { option (google.api.http) = { @@ -271,7 +271,7 @@ service Registry { }; } - // RollbackApiDeployment sets the current revision to a specified prior + // Sets the current revision to a specified prior // revision. Note that this creates a new revision with a new revision ID. rpc RollbackApiDeployment(RollbackApiDeploymentRequest) returns (ApiDeployment) { option (google.api.http) = { @@ -280,7 +280,7 @@ service Registry { }; } - // DeleteApiDeploymentRevision deletes a revision of a deployment. + // Deletes a revision of a deployment. rpc DeleteApiDeploymentRevision(DeleteApiDeploymentRevisionRequest) returns (ApiDeployment) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision" @@ -288,7 +288,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // ListArtifacts returns matching artifacts. + // Returns matching artifacts. rpc ListArtifacts(ListArtifactsRequest) returns (ListArtifactsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/artifacts" @@ -308,7 +308,7 @@ service Registry { option (google.api.method_signature) = "parent"; } - // GetArtifact returns a specified artifact. + // Returns a specified artifact. rpc GetArtifact(GetArtifactRequest) returns (Artifact) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/artifacts/*}" @@ -328,7 +328,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // GetArtifactContents returns the contents of a specified artifact. + // Returns the contents of a specified artifact. // If artifacts are stored with GZip compression, the default behavior // is to return the artifact uncompressed (the mime_type response field // indicates the exact format returned). @@ -351,7 +351,7 @@ service Registry { option (google.api.method_signature) = "name"; } - // CreateArtifact creates a specified artifact. + // Creates a specified artifact. rpc CreateArtifact(CreateArtifactRequest) returns (Artifact) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/artifacts" @@ -376,7 +376,7 @@ service Registry { option (google.api.method_signature) = "parent,artifact,artifact_id"; } - // ReplaceArtifact can be used to replace a specified artifact. + // Used to replace a specified artifact. rpc ReplaceArtifact(ReplaceArtifactRequest) returns (Artifact) { option (google.api.http) = { put: "/v1/{artifact.name=projects/*/locations/*/artifacts/*}" @@ -401,7 +401,7 @@ service Registry { option (google.api.method_signature) = "artifact"; } - // DeleteArtifact removes a specified artifact. + // Removes a specified artifact. rpc DeleteArtifact(DeleteArtifactRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/artifacts/*}" @@ -425,7 +425,7 @@ service Registry { // Request message for ListApis. message ListApisRequest { // Required. The parent, which owns this collection of APIs. - // Format: projects/*/locations/* + // Format: `projects/*/locations/*` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -464,7 +464,7 @@ message ListApisResponse { // Request message for GetApi. message GetApiRequest { // Required. The name of the API to retrieve. - // Format: projects/*/locations/*/apis/* + // Format: `projects/*/locations/*/apis/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -476,7 +476,7 @@ message GetApiRequest { // Request message for CreateApi. message CreateApiRequest { // Required. The parent, which owns this collection of APIs. - // Format: projects/*/locations/* + // Format: `projects/*/locations/*` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -487,8 +487,8 @@ message CreateApiRequest { // Required. The API to create. Api api = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The ID to use for the api, which will become the final component of - // the api's resource name. + // Required. The ID to use for the API, which will become the final component of + // the API's resource name. // // This value should be 4-63 characters, and valid characters // are /[a-z][0-9]-/. @@ -502,16 +502,16 @@ message UpdateApiRequest { // Required. The API to update. // // The `name` field is used to identify the API to update. - // Format: projects/*/locations/*/apis/* + // Format: `projects/*/locations/*/apis/*` Api api = 1 [(google.api.field_behavior) = REQUIRED]; // The list of fields to be updated. If omitted, all fields are updated that // are set in the request message (fields set to default values are ignored). - // If a "*" is specified, all fields are updated, including fields that are - // unspecified/default in the request. + // If an asterisk "*" is specified, all fields are updated, including fields + // that are unspecified/default in the request. google.protobuf.FieldMask update_mask = 2; - // If set to true, and the api is not found, a new api will be created. + // If set to true, and the API is not found, a new API will be created. // In this situation, `update_mask` is ignored. bool allow_missing = 3; } @@ -519,19 +519,23 @@ message UpdateApiRequest { // Request message for DeleteApi. message DeleteApiRequest { // Required. The name of the API to delete. - // Format: projects/*/locations/*/apis/* + // Format: `projects/*/locations/*/apis/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "apigeeregistry.googleapis.com/Api" } ]; + + // If set to true, any child resources will also be deleted. + // (Otherwise, the request will only work if there are no child resources.) + bool force = 2; } // Request message for ListApiVersions. message ListApiVersionsRequest { // Required. The parent, which owns this collection of versions. - // Format: projects/*/locations/*/apis/* + // Format: `projects/*/locations/*/apis/*` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -570,7 +574,7 @@ message ListApiVersionsResponse { // Request message for GetApiVersion. message GetApiVersionRequest { // Required. The name of the version to retrieve. - // Format: projects/*/locations/*/apis/*/versions/* + // Format: `projects/*/locations/*/apis/*/versions/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -582,7 +586,7 @@ message GetApiVersionRequest { // Request message for CreateApiVersion. message CreateApiVersionRequest { // Required. The parent, which owns this collection of versions. - // Format: projects/*/locations/*/apis/* + // Format: `projects/*/locations/*/apis/*` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -608,13 +612,13 @@ message UpdateApiVersionRequest { // Required. The version to update. // // The `name` field is used to identify the version to update. - // Format: projects/*/locations/*/apis/*/versions/* + // Format: `projects/*/locations/*/apis/*/versions/*` ApiVersion api_version = 1 [(google.api.field_behavior) = REQUIRED]; // The list of fields to be updated. If omitted, all fields are updated that // are set in the request message (fields set to default values are ignored). - // If a "*" is specified, all fields are updated, including fields that are - // unspecified/default in the request. + // If an asterisk "*" is specified, all fields are updated, including fields + // that are unspecified/default in the request. google.protobuf.FieldMask update_mask = 2; // If set to true, and the version is not found, a new version will be @@ -625,19 +629,23 @@ message UpdateApiVersionRequest { // Request message for DeleteApiVersion. message DeleteApiVersionRequest { // Required. The name of the version to delete. - // Format: projects/*/locations/*/apis/*/versions/* + // Format: `projects/*/locations/*/apis/*/versions/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "apigeeregistry.googleapis.com/ApiVersion" } ]; + + // If set to true, any child resources will also be deleted. + // (Otherwise, the request will only work if there are no child resources.) + bool force = 2; } // Request message for ListApiSpecs. message ListApiSpecsRequest { // Required. The parent, which owns this collection of specs. - // Format: projects/*/locations/*/apis/*/versions/* + // Format: `projects/*/locations/*/apis/*/versions/*` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -676,7 +684,7 @@ message ListApiSpecsResponse { // Request message for GetApiSpec. message GetApiSpecRequest { // Required. The name of the spec to retrieve. - // Format: projects/*/locations/*/apis/*/versions/*/specs/* + // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -688,7 +696,7 @@ message GetApiSpecRequest { // Request message for GetApiSpecContents. message GetApiSpecContentsRequest { // Required. The name of the spec whose contents should be retrieved. - // Format: projects/*/locations/*/apis/*/versions/*/specs/* + // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -700,7 +708,7 @@ message GetApiSpecContentsRequest { // Request message for CreateApiSpec. message CreateApiSpecRequest { // Required. The parent, which owns this collection of specs. - // Format: projects/*/locations/*/apis/*/versions/* + // Format: `projects/*/locations/*/apis/*/versions/*` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -726,13 +734,13 @@ message UpdateApiSpecRequest { // Required. The spec to update. // // The `name` field is used to identify the spec to update. - // Format: projects/*/locations/*/apis/*/versions/*/specs/* + // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` ApiSpec api_spec = 1 [(google.api.field_behavior) = REQUIRED]; // The list of fields to be updated. If omitted, all fields are updated that // are set in the request message (fields set to default values are ignored). - // If a "*" is specified, all fields are updated, including fields that are - // unspecified/default in the request. + // If an asterisk "*" is specified, all fields are updated, including fields + // that are unspecified/default in the request. google.protobuf.FieldMask update_mask = 2; // If set to true, and the spec is not found, a new spec will be created. @@ -743,7 +751,7 @@ message UpdateApiSpecRequest { // Request message for DeleteApiSpec. message DeleteApiSpecRequest { // Required. The name of the spec to delete. - // Format: projects/*/locations/*/apis/*/versions/*/specs/* + // Format: `projects/*/locations/*/apis/*/versions/*/specs/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -812,7 +820,7 @@ message RollbackApiSpecRequest { // Required. The revision ID to roll back to. // It must be a revision of the same spec. // - // Example: c7cfa2a8 + // Example: `c7cfa2a8` string revision_id = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -822,7 +830,7 @@ message DeleteApiSpecRevisionRequest { // with a revision ID explicitly included. // // Example: - // projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8 + // `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -834,7 +842,7 @@ message DeleteApiSpecRevisionRequest { // Request message for ListApiDeployments. message ListApiDeploymentsRequest { // Required. The parent, which owns this collection of deployments. - // Format: projects/*/locations/*/apis/* + // Format: `projects/*/locations/*/apis/*` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -873,7 +881,7 @@ message ListApiDeploymentsResponse { // Request message for GetApiDeployment. message GetApiDeploymentRequest { // Required. The name of the deployment to retrieve. - // Format: projects/*/locations/*/apis/*/deployments/* + // Format: `projects/*/locations/*/apis/*/deployments/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -885,7 +893,7 @@ message GetApiDeploymentRequest { // Request message for CreateApiDeployment. message CreateApiDeploymentRequest { // Required. The parent, which owns this collection of deployments. - // Format: projects/*/locations/*/apis/* + // Format: `projects/*/locations/*/apis/*` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -911,13 +919,13 @@ message UpdateApiDeploymentRequest { // Required. The deployment to update. // // The `name` field is used to identify the deployment to update. - // Format: projects/*/locations/*/apis/*/deployments/* + // Format: `projects/*/locations/*/apis/*/deployments/*` ApiDeployment api_deployment = 1 [(google.api.field_behavior) = REQUIRED]; // The list of fields to be updated. If omitted, all fields are updated that // are set in the request message (fields set to default values are ignored). - // If a "*" is specified, all fields are updated, including fields that are - // unspecified/default in the request. + // If an asterisk "*" is specified, all fields are updated, including fields + // that are unspecified/default in the request. google.protobuf.FieldMask update_mask = 2; // If set to true, and the deployment is not found, a new deployment will be @@ -928,7 +936,7 @@ message UpdateApiDeploymentRequest { // Request message for DeleteApiDeployment. message DeleteApiDeploymentRequest { // Required. The name of the deployment to delete. - // Format: projects/*/locations/*/apis/*/deployments/* + // Format: `projects/*/locations/*/apis/*/deployments/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -997,7 +1005,7 @@ message RollbackApiDeploymentRequest { // Required. The revision ID to roll back to. // It must be a revision of the same deployment. // - // Example: c7cfa2a8 + // Example: `c7cfa2a8` string revision_id = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -1007,7 +1015,7 @@ message DeleteApiDeploymentRevisionRequest { // with a revision ID explicitly included. // // Example: - // projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8 + // `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1019,7 +1027,7 @@ message DeleteApiDeploymentRevisionRequest { // Request message for ListArtifacts. message ListArtifactsRequest { // Required. The parent, which owns this collection of artifacts. - // Format: {parent} + // Format: `{parent}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1058,7 +1066,7 @@ message ListArtifactsResponse { // Request message for GetArtifact. message GetArtifactRequest { // Required. The name of the artifact to retrieve. - // Format: {parent}/artifacts/* + // Format: `{parent}/artifacts/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1070,7 +1078,7 @@ message GetArtifactRequest { // Request message for GetArtifactContents. message GetArtifactContentsRequest { // Required. The name of the artifact whose contents should be retrieved. - // Format: {parent}/artifacts/* + // Format: `{parent}/artifacts/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1082,7 +1090,7 @@ message GetArtifactContentsRequest { // Request message for CreateArtifact. message CreateArtifactRequest { // Required. The parent, which owns this collection of artifacts. - // Format: {parent} + // Format: `{parent}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1108,14 +1116,14 @@ message ReplaceArtifactRequest { // Required. The artifact to replace. // // The `name` field is used to identify the artifact to replace. - // Format: {parent}/artifacts/* + // Format: `{parent}/artifacts/*` Artifact artifact = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for DeleteArtifact. message DeleteArtifactRequest { // Required. The name of the artifact to delete. - // Format: {parent}/artifacts/* + // Format: `{parent}/artifacts/*` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-apigeeregistry/protos/protos.d.ts b/packages/google-cloud-apigeeregistry/protos/protos.d.ts index 779da33d229..33e60bf4c81 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.d.ts +++ b/packages/google-cloud-apigeeregistry/protos/protos.d.ts @@ -2863,6 +2863,9 @@ export namespace google { /** DeleteApiRequest name */ name?: (string|null); + + /** DeleteApiRequest force */ + force?: (boolean|null); } /** Represents a DeleteApiRequest. */ @@ -2877,6 +2880,9 @@ export namespace google { /** DeleteApiRequest name. */ public name: string; + /** DeleteApiRequest force. */ + public force: boolean; + /** * Creates a new DeleteApiRequest instance using the specified properties. * @param [properties] Properties to set @@ -3493,6 +3499,9 @@ export namespace google { /** DeleteApiVersionRequest name */ name?: (string|null); + + /** DeleteApiVersionRequest force */ + force?: (boolean|null); } /** Represents a DeleteApiVersionRequest. */ @@ -3507,6 +3516,9 @@ export namespace google { /** DeleteApiVersionRequest name. */ public name: string; + /** DeleteApiVersionRequest force. */ + public force: boolean; + /** * Creates a new DeleteApiVersionRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-apigeeregistry/protos/protos.js b/packages/google-cloud-apigeeregistry/protos/protos.js index 4d1b27b5a45..f6406258392 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.js +++ b/packages/google-cloud-apigeeregistry/protos/protos.js @@ -6758,6 +6758,7 @@ * @memberof google.cloud.apigeeregistry.v1 * @interface IDeleteApiRequest * @property {string|null} [name] DeleteApiRequest name + * @property {boolean|null} [force] DeleteApiRequest force */ /** @@ -6783,6 +6784,14 @@ */ DeleteApiRequest.prototype.name = ""; + /** + * DeleteApiRequest force. + * @member {boolean} force + * @memberof google.cloud.apigeeregistry.v1.DeleteApiRequest + * @instance + */ + DeleteApiRequest.prototype.force = false; + /** * Creates a new DeleteApiRequest instance using the specified properties. * @function create @@ -6809,6 +6818,8 @@ writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; @@ -6847,6 +6858,10 @@ message.name = reader.string(); break; } + case 2: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -6885,6 +6900,9 @@ if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; @@ -6902,6 +6920,8 @@ var message = new $root.google.cloud.apigeeregistry.v1.DeleteApiRequest(); if (object.name != null) message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); return message; }; @@ -6918,10 +6938,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.force = false; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; @@ -8200,6 +8224,7 @@ * @memberof google.cloud.apigeeregistry.v1 * @interface IDeleteApiVersionRequest * @property {string|null} [name] DeleteApiVersionRequest name + * @property {boolean|null} [force] DeleteApiVersionRequest force */ /** @@ -8225,6 +8250,14 @@ */ DeleteApiVersionRequest.prototype.name = ""; + /** + * DeleteApiVersionRequest force. + * @member {boolean} force + * @memberof google.cloud.apigeeregistry.v1.DeleteApiVersionRequest + * @instance + */ + DeleteApiVersionRequest.prototype.force = false; + /** * Creates a new DeleteApiVersionRequest instance using the specified properties. * @function create @@ -8251,6 +8284,8 @@ writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; @@ -8289,6 +8324,10 @@ message.name = reader.string(); break; } + case 2: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -8327,6 +8366,9 @@ if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; @@ -8344,6 +8386,8 @@ var message = new $root.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest(); if (object.name != null) message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); return message; }; @@ -8360,10 +8404,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.force = false; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; diff --git a/packages/google-cloud-apigeeregistry/protos/protos.json b/packages/google-cloud-apigeeregistry/protos/protos.json index 0cb7b3416a4..75e89aa2795 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.json +++ b/packages/google-cloud-apigeeregistry/protos/protos.json @@ -1431,6 +1431,10 @@ "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/Api" } + }, + "force": { + "type": "bool", + "id": 2 } } }, @@ -1537,6 +1541,10 @@ "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "apigeeregistry.googleapis.com/ApiVersion" } + }, + "force": { + "type": "bool", + "id": 2 } } }, diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.js index 7b57b4b4971..4f84cd15fd5 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.js @@ -23,6 +23,9 @@ function main(parent, instanceId, instance) { // [START apigeeregistry_v1_generated_Provisioning_CreateInstance_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. */ /** @@ -40,7 +43,7 @@ function main(parent, instanceId, instance) { // const instance = {} // Imports the Apigeeregistry library - const {ProvisioningClient} = require('@google-cloud/apigeeregistry').v1; + const {ProvisioningClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new ProvisioningClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js index 772406e5ecb..9e1d2269b9f 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js @@ -23,6 +23,9 @@ function main(name) { // [START apigeeregistry_v1_generated_Provisioning_DeleteInstance_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. */ /** @@ -32,7 +35,7 @@ function main(name) { // const name = 'abc123' // Imports the Apigeeregistry library - const {ProvisioningClient} = require('@google-cloud/apigeeregistry').v1; + const {ProvisioningClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new ProvisioningClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js index c091293b088..4a4355c5cb4 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js @@ -23,6 +23,9 @@ function main(name) { // [START apigeeregistry_v1_generated_Provisioning_GetInstance_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. */ /** @@ -32,7 +35,7 @@ function main(name) { // const name = 'abc123' // Imports the Apigeeregistry library - const {ProvisioningClient} = require('@google-cloud/apigeeregistry').v1; + const {ProvisioningClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new ProvisioningClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.js index 1ee1773b339..ebce3b4b148 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.js @@ -23,11 +23,14 @@ function main(parent, api, apiId) { // [START apigeeregistry_v1_generated_Registry_CreateApi_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 parent, which owns this collection of APIs. - * Format: projects/* /locations/* + * Format: `projects/* /locations/*` */ // const parent = 'abc123' /** @@ -35,8 +38,8 @@ function main(parent, api, apiId) { */ // const api = {} /** - * Required. The ID to use for the api, which will become the final component of - * the api's resource name. + * Required. The ID to use for the API, which will become the final component of + * the API's resource name. * This value should be 4-63 characters, and valid characters * are /[a-z][0-9]-/. * Following AIP-162, IDs must not have the form of a UUID. @@ -44,7 +47,7 @@ function main(parent, api, apiId) { // const apiId = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js index e60fcfa553a..1d0c276c167 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js @@ -23,11 +23,14 @@ function main(parent, apiDeployment, apiDeploymentId) { // [START apigeeregistry_v1_generated_Registry_CreateApiDeployment_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 parent, which owns this collection of deployments. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` */ // const parent = 'abc123' /** @@ -44,7 +47,7 @@ function main(parent, apiDeployment, apiDeploymentId) { // const apiDeploymentId = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.js index 5e11372ee87..44c0e0504ea 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.js @@ -23,11 +23,14 @@ function main(parent, apiSpec, apiSpecId) { // [START apigeeregistry_v1_generated_Registry_CreateApiSpec_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 parent, which owns this collection of specs. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` */ // const parent = 'abc123' /** @@ -44,7 +47,7 @@ function main(parent, apiSpec, apiSpecId) { // const apiSpecId = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.js index df5fa6c7339..dd7182a62cd 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.js @@ -23,11 +23,14 @@ function main(parent, apiVersion, apiVersionId) { // [START apigeeregistry_v1_generated_Registry_CreateApiVersion_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 parent, which owns this collection of versions. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` */ // const parent = 'abc123' /** @@ -44,7 +47,7 @@ function main(parent, apiVersion, apiVersionId) { // const apiVersionId = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.js index 9c13c5c37b0..565ba5f32a0 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.js @@ -23,11 +23,14 @@ function main(parent, artifact, artifactId) { // [START apigeeregistry_v1_generated_Registry_CreateArtifact_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 parent, which owns this collection of artifacts. - * Format: {parent} + * Format: `{parent}` */ // const parent = 'abc123' /** @@ -44,7 +47,7 @@ function main(parent, artifact, artifactId) { // const artifactId = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js index ceb657e72b5..440f84654e5 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js @@ -23,16 +23,24 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_DeleteApi_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 name of the API to delete. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` */ // const name = 'abc123' + /** + * If set to true, any child resources will also be deleted. + * (Otherwise, the request will only work if there are no child resources.) + */ + // const force = true // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js index 9dcf52efda0..47100ad20a7 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js @@ -23,11 +23,14 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_DeleteApiDeployment_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 name of the deployment to delete. - * Format: projects/* /locations/* /apis/* /deployments/* + * Format: `projects/* /locations/* /apis/* /deployments/*` */ // const name = 'abc123' /** @@ -37,7 +40,7 @@ function main(name) { // const force = true // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js index 4c0ddabef79..b46ffa35c3e 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js @@ -23,18 +23,21 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_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 name of the deployment revision to be deleted, * with a revision ID explicitly included. * Example: - * projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8 + * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` */ // const name = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js index 1275c623f64..bf1dfe8e0db 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js @@ -23,11 +23,14 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_DeleteApiSpec_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 name of the spec to delete. - * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * Format: `projects/* /locations/* /apis/* /versions/* /specs/*` */ // const name = 'abc123' /** @@ -37,7 +40,7 @@ function main(name) { // const force = true // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js index a9852641b18..21fb81322ae 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js @@ -23,18 +23,21 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_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 name of the spec revision to be deleted, * with a revision ID explicitly included. * Example: - * projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8 + * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` */ // const name = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js index 104daec73b3..9c59f0b03df 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js @@ -23,16 +23,24 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_DeleteApiVersion_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 name of the version to delete. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` */ // const name = 'abc123' + /** + * If set to true, any child resources will also be deleted. + * (Otherwise, the request will only work if there are no child resources.) + */ + // const force = true // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js index bb06c41b1dd..d3e2b7c0fd9 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js @@ -23,16 +23,19 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_DeleteArtifact_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 name of the artifact to delete. - * Format: {parent}/artifacts/* + * Format: `{parent}/artifacts/*` */ // const name = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js index bad83b5d1eb..79568c883d7 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js @@ -23,16 +23,19 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_GetApi_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 name of the API to retrieve. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` */ // const name = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js index 7516ef71923..2c0d9d10a90 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js @@ -23,16 +23,19 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_GetApiDeployment_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 name of the deployment to retrieve. - * Format: projects/* /locations/* /apis/* /deployments/* + * Format: `projects/* /locations/* /apis/* /deployments/*` */ // const name = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js index be8f42acc4f..364e0d10852 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js @@ -23,16 +23,19 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_GetApiSpec_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 name of the spec to retrieve. - * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * Format: `projects/* /locations/* /apis/* /versions/* /specs/*` */ // const name = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js index d20e06d6e7e..419e495e98b 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js @@ -23,16 +23,19 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_GetApiSpecContents_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 name of the spec whose contents should be retrieved. - * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * Format: `projects/* /locations/* /apis/* /versions/* /specs/*` */ // const name = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js index 60f933b4910..384f458072c 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js @@ -23,16 +23,19 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_GetApiVersion_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 name of the version to retrieve. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` */ // const name = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js index ba6fb79c949..fd8cf0468b0 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js @@ -23,16 +23,19 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_GetArtifact_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 name of the artifact to retrieve. - * Format: {parent}/artifacts/* + * Format: `{parent}/artifacts/*` */ // const name = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js index 34599910730..983ab0fa0b0 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js @@ -23,16 +23,19 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_GetArtifactContents_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 name of the artifact whose contents should be retrieved. - * Format: {parent}/artifacts/* + * Format: `{parent}/artifacts/*` */ // const name = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js index 6c424719c3a..0f9fa672264 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js @@ -23,6 +23,9 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_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. */ /** @@ -40,7 +43,7 @@ function main(name) { // const pageToken = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js index d0965126c71..10a7f19821d 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js @@ -23,11 +23,14 @@ function main(parent) { // [START apigeeregistry_v1_generated_Registry_ListApiDeployments_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 parent, which owns this collection of deployments. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` */ // const parent = 'abc123' /** @@ -51,7 +54,7 @@ function main(parent) { // const filter = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js index dd1aed4a644..1ee59f01749 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js @@ -23,6 +23,9 @@ function main(name) { // [START apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_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. */ /** @@ -40,7 +43,7 @@ function main(name) { // const pageToken = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js index 9963e1e747a..ed3c4e98ef2 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js @@ -23,11 +23,14 @@ function main(parent) { // [START apigeeregistry_v1_generated_Registry_ListApiSpecs_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 parent, which owns this collection of specs. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` */ // const parent = 'abc123' /** @@ -51,7 +54,7 @@ function main(parent) { // const filter = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js index 680d6fed135..01a63148e1f 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js @@ -23,11 +23,14 @@ function main(parent) { // [START apigeeregistry_v1_generated_Registry_ListApiVersions_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 parent, which owns this collection of versions. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` */ // const parent = 'abc123' /** @@ -51,7 +54,7 @@ function main(parent) { // const filter = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js index f21659924fc..9280a5300a3 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js @@ -23,11 +23,14 @@ function main(parent) { // [START apigeeregistry_v1_generated_Registry_ListApis_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 parent, which owns this collection of APIs. - * Format: projects/* /locations/* + * Format: `projects/* /locations/*` */ // const parent = 'abc123' /** @@ -51,7 +54,7 @@ function main(parent) { // const filter = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js index b23c895432b..c5d2c3e251a 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js @@ -23,11 +23,14 @@ function main(parent) { // [START apigeeregistry_v1_generated_Registry_ListArtifacts_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 parent, which owns this collection of artifacts. - * Format: {parent} + * Format: `{parent}` */ // const parent = 'abc123' /** @@ -51,7 +54,7 @@ function main(parent) { // const filter = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js index 0ea6d96fdf2..af41ce89ac3 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js @@ -23,17 +23,20 @@ function main(artifact) { // [START apigeeregistry_v1_generated_Registry_ReplaceArtifact_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 artifact to replace. * The `name` field is used to identify the artifact to replace. - * Format: {parent}/artifacts/* + * Format: `{parent}/artifacts/*` */ // const artifact = {} // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js index adb8d2df6d9..022b8dcbca2 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js @@ -23,6 +23,9 @@ function main(name, revisionId) { // [START apigeeregistry_v1_generated_Registry_RollbackApiDeployment_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. */ /** @@ -32,12 +35,12 @@ function main(name, revisionId) { /** * Required. The revision ID to roll back to. * It must be a revision of the same deployment. - * Example: c7cfa2a8 + * Example: `c7cfa2a8` */ // const revisionId = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js index 3df461dc2b4..d8acd2542c1 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js @@ -23,6 +23,9 @@ function main(name, revisionId) { // [START apigeeregistry_v1_generated_Registry_RollbackApiSpec_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. */ /** @@ -32,12 +35,12 @@ function main(name, revisionId) { /** * Required. The revision ID to roll back to. * It must be a revision of the same spec. - * Example: c7cfa2a8 + * Example: `c7cfa2a8` */ // const revisionId = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js index 71147d2ac3c..5c386cc579b 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js @@ -23,6 +23,9 @@ function main(name, tag) { // [START apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_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. */ /** @@ -36,7 +39,7 @@ function main(name, tag) { // const tag = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js index da9a6d324a0..838836c8c5a 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js @@ -23,6 +23,9 @@ function main(name, tag) { // [START apigeeregistry_v1_generated_Registry_TagApiSpecRevision_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. */ /** @@ -36,7 +39,7 @@ function main(name, tag) { // const tag = 'abc123' // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js index 7579e099787..8cb7e3d0fe5 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js @@ -23,29 +23,32 @@ function main(api) { // [START apigeeregistry_v1_generated_Registry_UpdateApi_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 API to update. * The `name` field is used to identify the API to update. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` */ // const api = {} /** * The list of fields to be updated. If omitted, all fields are updated that * are set in the request message (fields set to default values are ignored). - * If a "*" is specified, all fields are updated, including fields that are - * unspecified/default in the request. + * If an asterisk "*" is specified, all fields are updated, including fields + * that are unspecified/default in the request. */ // const updateMask = {} /** - * If set to true, and the api is not found, a new api will be created. + * If set to true, and the API is not found, a new API will be created. * In this situation, `update_mask` is ignored. */ // const allowMissing = true // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js index 647685f7d10..2858dd4dff8 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js @@ -23,19 +23,22 @@ function main(apiDeployment) { // [START apigeeregistry_v1_generated_Registry_UpdateApiDeployment_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 deployment to update. * The `name` field is used to identify the deployment to update. - * Format: projects/* /locations/* /apis/* /deployments/* + * Format: `projects/* /locations/* /apis/* /deployments/*` */ // const apiDeployment = {} /** * The list of fields to be updated. If omitted, all fields are updated that * are set in the request message (fields set to default values are ignored). - * If a "*" is specified, all fields are updated, including fields that are - * unspecified/default in the request. + * If an asterisk "*" is specified, all fields are updated, including fields + * that are unspecified/default in the request. */ // const updateMask = {} /** @@ -45,7 +48,7 @@ function main(apiDeployment) { // const allowMissing = true // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js index aebc5264de9..563ac37f695 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js @@ -23,19 +23,22 @@ function main(apiSpec) { // [START apigeeregistry_v1_generated_Registry_UpdateApiSpec_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 spec to update. * The `name` field is used to identify the spec to update. - * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * Format: `projects/* /locations/* /apis/* /versions/* /specs/*` */ // const apiSpec = {} /** * The list of fields to be updated. If omitted, all fields are updated that * are set in the request message (fields set to default values are ignored). - * If a "*" is specified, all fields are updated, including fields that are - * unspecified/default in the request. + * If an asterisk "*" is specified, all fields are updated, including fields + * that are unspecified/default in the request. */ // const updateMask = {} /** @@ -45,7 +48,7 @@ function main(apiSpec) { // const allowMissing = true // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js index 07d2c3938f0..59fb2f515c0 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js @@ -23,19 +23,22 @@ function main(apiVersion) { // [START apigeeregistry_v1_generated_Registry_UpdateApiVersion_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 version to update. * The `name` field is used to identify the version to update. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` */ // const apiVersion = {} /** * The list of fields to be updated. If omitted, all fields are updated that * are set in the request message (fields set to default values are ignored). - * If a "*" is specified, all fields are updated, including fields that are - * unspecified/default in the request. + * If an asterisk "*" is specified, all fields are updated, including fields + * that are unspecified/default in the request. */ // const updateMask = {} /** @@ -45,7 +48,7 @@ function main(apiVersion) { // const allowMissing = true // Imports the Apigeeregistry library - const {RegistryClient} = require('@google-cloud/apigeeregistry').v1; + const {RegistryClient} = require('@google-cloud/apigee-registry').v1; // Instantiates a client const apigeeregistryClient = new RegistryClient(); diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json index c053b6596e2..259c49eb8fa 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -70,7 +70,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -110,7 +110,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -143,14 +143,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_ListApis_async", "title": "Provisioning listApis Sample", "origin": "API_DEFINITION", - "description": " ListApis returns matching APIs.", + "description": " Returns matching APIs.", "canonical": true, "file": "registry.list_apis.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 72, + "end": 75, "type": "FULL" } ], @@ -195,14 +195,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_GetApi_async", "title": "Provisioning getApi Sample", "origin": "API_DEFINITION", - "description": " GetApi returns a specified API.", + "description": " Returns a specified API.", "canonical": true, "file": "registry.get_api.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -235,14 +235,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_CreateApi_async", "title": "Provisioning createApi Sample", "origin": "API_DEFINITION", - "description": " CreateApi creates a specified API.", + "description": " Creates a specified API.", "canonical": true, "file": "registry.create_api.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -283,14 +283,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApi_async", "title": "Provisioning updateApi Sample", "origin": "API_DEFINITION", - "description": " UpdateApi can be used to modify a specified API.", + "description": " Used to modify a specified API.", "canonical": true, "file": "registry.update_api.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -331,14 +331,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApi_async", "title": "Provisioning deleteApi Sample", "origin": "API_DEFINITION", - "description": " DeleteApi removes a specified API and all of the resources that it owns.", + "description": " Removes a specified API and all of the resources that it owns.", "canonical": true, "file": "registry.delete_api.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 51, + "end": 59, "type": "FULL" } ], @@ -350,6 +350,10 @@ { "name": "name", "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" } ], "resultType": ".google.protobuf.Empty", @@ -371,14 +375,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_ListApiVersions_async", "title": "Provisioning listApiVersions Sample", "origin": "API_DEFINITION", - "description": " ListApiVersions returns matching versions.", + "description": " Returns matching versions.", "canonical": true, "file": "registry.list_api_versions.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 72, + "end": 75, "type": "FULL" } ], @@ -423,14 +427,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_GetApiVersion_async", "title": "Provisioning getApiVersion Sample", "origin": "API_DEFINITION", - "description": " GetApiVersion returns a specified version.", + "description": " Returns a specified version.", "canonical": true, "file": "registry.get_api_version.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -463,14 +467,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiVersion_async", "title": "Provisioning createApiVersion Sample", "origin": "API_DEFINITION", - "description": " CreateApiVersion creates a specified version.", + "description": " Creates a specified version.", "canonical": true, "file": "registry.create_api_version.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -511,14 +515,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiVersion_async", "title": "Provisioning updateApiVersion Sample", "origin": "API_DEFINITION", - "description": " UpdateApiVersion can be used to modify a specified version.", + "description": " Used to modify a specified version.", "canonical": true, "file": "registry.update_api_version.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -559,14 +563,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiVersion_async", "title": "Provisioning deleteApiVersion Sample", "origin": "API_DEFINITION", - "description": " DeleteApiVersion removes a specified version and all of the resources that it owns.", + "description": " Removes a specified version and all of the resources that it owns.", "canonical": true, "file": "registry.delete_api_version.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 51, + "end": 59, "type": "FULL" } ], @@ -578,6 +582,10 @@ { "name": "name", "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" } ], "resultType": ".google.protobuf.Empty", @@ -599,14 +607,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_ListApiSpecs_async", "title": "Provisioning listApiSpecs Sample", "origin": "API_DEFINITION", - "description": " ListApiSpecs returns matching specs.", + "description": " Returns matching specs.", "canonical": true, "file": "registry.list_api_specs.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 72, + "end": 75, "type": "FULL" } ], @@ -651,14 +659,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_GetApiSpec_async", "title": "Provisioning getApiSpec Sample", "origin": "API_DEFINITION", - "description": " GetApiSpec returns a specified spec.", + "description": " Returns a specified spec.", "canonical": true, "file": "registry.get_api_spec.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -691,14 +699,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_GetApiSpecContents_async", "title": "Provisioning getApiSpecContents Sample", "origin": "API_DEFINITION", - "description": " GetApiSpecContents returns the contents of a specified spec. If specs are stored with GZip compression, the default behavior is to return the spec uncompressed (the mime_type response field indicates the exact format returned).", + "description": " Returns the contents of a specified spec. If specs are stored with GZip compression, the default behavior is to return the spec uncompressed (the mime_type response field indicates the exact format returned).", "canonical": true, "file": "registry.get_api_spec_contents.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -731,14 +739,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiSpec_async", "title": "Provisioning createApiSpec Sample", "origin": "API_DEFINITION", - "description": " CreateApiSpec creates a specified spec.", + "description": " Creates a specified spec.", "canonical": true, "file": "registry.create_api_spec.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -779,14 +787,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiSpec_async", "title": "Provisioning updateApiSpec Sample", "origin": "API_DEFINITION", - "description": " UpdateApiSpec can be used to modify a specified spec.", + "description": " Used to modify a specified spec.", "canonical": true, "file": "registry.update_api_spec.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -827,14 +835,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiSpec_async", "title": "Provisioning deleteApiSpec Sample", "origin": "API_DEFINITION", - "description": " DeleteApiSpec removes a specified spec, all revisions, and all child resources (e.g. artifacts).", + "description": " Removes a specified spec, all revisions, and all child resources (e.g., artifacts).", "canonical": true, "file": "registry.delete_api_spec.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -871,14 +879,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_TagApiSpecRevision_async", "title": "Provisioning tagApiSpecRevision Sample", "origin": "API_DEFINITION", - "description": " TagApiSpecRevision adds a tag to a specified revision of a spec.", + "description": " Adds a tag to a specified revision of a spec.", "canonical": true, "file": "registry.tag_api_spec_revision.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -915,14 +923,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_async", "title": "Provisioning listApiSpecRevisions Sample", "origin": "API_DEFINITION", - "description": " ListApiSpecRevisions lists all revisions of a spec. Revisions are returned in descending order of revision creation time.", + "description": " Lists all revisions of a spec. Revisions are returned in descending order of revision creation time.", "canonical": true, "file": "registry.list_api_spec_revisions.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -963,14 +971,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_RollbackApiSpec_async", "title": "Provisioning rollbackApiSpec Sample", "origin": "API_DEFINITION", - "description": " RollbackApiSpec sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.", + "description": " Sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.", "canonical": true, "file": "registry.rollback_api_spec.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -1007,14 +1015,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_async", "title": "Provisioning deleteApiSpecRevision Sample", "origin": "API_DEFINITION", - "description": " DeleteApiSpecRevision deletes a revision of a spec.", + "description": " Deletes a revision of a spec.", "canonical": true, "file": "registry.delete_api_spec_revision.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], @@ -1047,14 +1055,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_ListApiDeployments_async", "title": "Provisioning listApiDeployments Sample", "origin": "API_DEFINITION", - "description": " ListApiDeployments returns matching deployments.", + "description": " Returns matching deployments.", "canonical": true, "file": "registry.list_api_deployments.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 72, + "end": 75, "type": "FULL" } ], @@ -1099,14 +1107,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_GetApiDeployment_async", "title": "Provisioning getApiDeployment Sample", "origin": "API_DEFINITION", - "description": " GetApiDeployment returns a specified deployment.", + "description": " Returns a specified deployment.", "canonical": true, "file": "registry.get_api_deployment.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1139,14 +1147,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiDeployment_async", "title": "Provisioning createApiDeployment Sample", "origin": "API_DEFINITION", - "description": " CreateApiDeployment creates a specified deployment.", + "description": " Creates a specified deployment.", "canonical": true, "file": "registry.create_api_deployment.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -1187,14 +1195,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiDeployment_async", "title": "Provisioning updateApiDeployment Sample", "origin": "API_DEFINITION", - "description": " UpdateApiDeployment can be used to modify a specified deployment.", + "description": " Used to modify a specified deployment.", "canonical": true, "file": "registry.update_api_deployment.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -1235,14 +1243,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiDeployment_async", "title": "Provisioning deleteApiDeployment Sample", "origin": "API_DEFINITION", - "description": " DeleteApiDeployment removes a specified deployment, all revisions, and all child resources (e.g. artifacts).", + "description": " Removes a specified deployment, all revisions, and all child resources (e.g., artifacts).", "canonical": true, "file": "registry.delete_api_deployment.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1279,14 +1287,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_async", "title": "Provisioning tagApiDeploymentRevision Sample", "origin": "API_DEFINITION", - "description": " TagApiDeploymentRevision adds a tag to a specified revision of a deployment.", + "description": " Adds a tag to a specified revision of a deployment.", "canonical": true, "file": "registry.tag_api_deployment_revision.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1323,14 +1331,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_async", "title": "Provisioning listApiDeploymentRevisions Sample", "origin": "API_DEFINITION", - "description": " ListApiDeploymentRevisions lists all revisions of a deployment. Revisions are returned in descending order of revision creation time.", + "description": " Lists all revisions of a deployment. Revisions are returned in descending order of revision creation time.", "canonical": true, "file": "registry.list_api_deployment_revisions.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -1371,14 +1379,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_RollbackApiDeployment_async", "title": "Provisioning rollbackApiDeployment Sample", "origin": "API_DEFINITION", - "description": " RollbackApiDeployment sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.", + "description": " Sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.", "canonical": true, "file": "registry.rollback_api_deployment.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -1415,14 +1423,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_async", "title": "Provisioning deleteApiDeploymentRevision Sample", "origin": "API_DEFINITION", - "description": " DeleteApiDeploymentRevision deletes a revision of a deployment.", + "description": " Deletes a revision of a deployment.", "canonical": true, "file": "registry.delete_api_deployment_revision.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], @@ -1455,14 +1463,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_ListArtifacts_async", "title": "Provisioning listArtifacts Sample", "origin": "API_DEFINITION", - "description": " ListArtifacts returns matching artifacts.", + "description": " Returns matching artifacts.", "canonical": true, "file": "registry.list_artifacts.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 72, + "end": 75, "type": "FULL" } ], @@ -1507,14 +1515,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_GetArtifact_async", "title": "Provisioning getArtifact Sample", "origin": "API_DEFINITION", - "description": " GetArtifact returns a specified artifact.", + "description": " Returns a specified artifact.", "canonical": true, "file": "registry.get_artifact.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1547,14 +1555,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_GetArtifactContents_async", "title": "Provisioning getArtifactContents Sample", "origin": "API_DEFINITION", - "description": " GetArtifactContents returns the contents of a specified artifact. If artifacts are stored with GZip compression, the default behavior is to return the artifact uncompressed (the mime_type response field indicates the exact format returned).", + "description": " Returns the contents of a specified artifact. If artifacts are stored with GZip compression, the default behavior is to return the artifact uncompressed (the mime_type response field indicates the exact format returned).", "canonical": true, "file": "registry.get_artifact_contents.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1587,14 +1595,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_CreateArtifact_async", "title": "Provisioning createArtifact Sample", "origin": "API_DEFINITION", - "description": " CreateArtifact creates a specified artifact.", + "description": " Creates a specified artifact.", "canonical": true, "file": "registry.create_artifact.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -1635,14 +1643,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_ReplaceArtifact_async", "title": "Provisioning replaceArtifact Sample", "origin": "API_DEFINITION", - "description": " ReplaceArtifact can be used to replace a specified artifact.", + "description": " Used to replace a specified artifact.", "canonical": true, "file": "registry.replace_artifact.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1675,14 +1683,14 @@ "regionTag": "apigeeregistry_v1_generated_Registry_DeleteArtifact_async", "title": "Provisioning deleteArtifact Sample", "origin": "API_DEFINITION", - "description": " DeleteArtifact removes a specified artifact.", + "description": " Removes a specified artifact.", "canonical": true, "file": "registry.delete_artifact.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], diff --git a/packages/google-cloud-apigeeregistry/src/v1/gapic_metadata.json b/packages/google-cloud-apigeeregistry/src/v1/gapic_metadata.json index 2a54281498a..783049f935e 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/gapic_metadata.json +++ b/packages/google-cloud-apigeeregistry/src/v1/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.apigeeregistry.v1", - "libraryPackage": "@google-cloud/apigeeregistry", + "libraryPackage": "@google-cloud/apigee-registry", "services": { "Provisioning": { "clients": { diff --git a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts index 67eaa907620..122b3c97e78 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/provisioning_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, @@ -39,7 +39,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 './provisioning_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -103,8 +102,18 @@ export class ProvisioningClient { * 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 ProvisioningClient({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 ProvisioningClient; const servicePath = @@ -124,8 +133,13 @@ export class ProvisioningClient { 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); @@ -146,9 +160,12 @@ export class ProvisioningClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } - this.iamClient = new IamClient(this._gaxGrpc, opts); + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); - this.locationsClient = new LocationsClient(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}`]; @@ -408,7 +425,7 @@ export class ProvisioningClient { 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; } /** @@ -467,7 +484,8 @@ export class ProvisioningClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -615,7 +633,7 @@ export class ProvisioningClient { 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(); @@ -724,7 +742,7 @@ export class ProvisioningClient { 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(); @@ -750,14 +768,15 @@ export class ProvisioningClient { protos.google.cloud.apigeeregistry.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.createInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.apigeeregistry.v1.Instance, @@ -862,7 +881,7 @@ export class ProvisioningClient { 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(); @@ -888,14 +907,15 @@ export class ProvisioningClient { protos.google.cloud.apigeeregistry.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.deleteInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts index c181390ef40..3bcb8ba9738 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_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, @@ -31,9 +31,7 @@ import { 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'); /** @@ -42,7 +40,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 './registry_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -105,8 +102,18 @@ export class RegistryClient { * 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 RegistryClient({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 RegistryClient; const servicePath = @@ -126,8 +133,13 @@ export class RegistryClient { 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); @@ -148,9 +160,12 @@ export class RegistryClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } - this.iamClient = new IamClient(this._gaxGrpc, opts); + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); - this.locationsClient = new LocationsClient(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}`]; @@ -431,7 +446,7 @@ export class RegistryClient { 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; } /** @@ -522,7 +537,8 @@ export class RegistryClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -585,13 +601,13 @@ export class RegistryClient { // -- Service calls -- // ------------------- /** - * GetApi returns a specified API. + * Returns a specified API. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the API to retrieve. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /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. @@ -664,25 +680,25 @@ export class RegistryClient { 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(); return this.innerApiCalls.getApi(request, options, callback); } /** - * CreateApi creates a specified API. + * Creates a specified API. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of APIs. - * Format: projects/* /locations/* + * Format: `projects/* /locations/*` * @param {google.cloud.apigeeregistry.v1.Api} request.api * Required. The API to create. * @param {string} request.apiId - * Required. The ID to use for the api, which will become the final component of - * the api's resource name. + * Required. The ID to use for the API, which will become the final component of + * the API's resource name. * * This value should be 4-63 characters, and valid characters * are /{@link 0-9|a-z}-/. @@ -766,14 +782,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.createApi(request, options, callback); } /** - * UpdateApi can be used to modify a specified API. + * Used to modify a specified API. * * @param {Object} request * The request object that will be sent. @@ -781,14 +797,14 @@ export class RegistryClient { * Required. The API to update. * * The `name` field is used to identify the API to update. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` * @param {google.protobuf.FieldMask} request.updateMask * The list of fields to be updated. If omitted, all fields are updated that * are set in the request message (fields set to default values are ignored). - * If a "*" is specified, all fields are updated, including fields that are - * unspecified/default in the request. + * If an asterisk "*" is specified, all fields are updated, including fields + * that are unspecified/default in the request. * @param {boolean} request.allowMissing - * If set to true, and the api is not found, a new api will be created. + * If set to true, and the API is not found, a new API will be created. * In this situation, `update_mask` is ignored. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -868,21 +884,24 @@ export class RegistryClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'api.name': request.api!.name || '', }); this.initialize(); return this.innerApiCalls.updateApi(request, options, callback); } /** - * DeleteApi removes a specified API and all of the resources that it + * Removes a specified API and all of the resources that it * owns. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the API to delete. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` + * @param {boolean} request.force + * If set to true, any child resources will also be deleted. + * (Otherwise, the request will only work if there are no child resources.) * @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. @@ -961,20 +980,20 @@ export class RegistryClient { 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(); return this.innerApiCalls.deleteApi(request, options, callback); } /** - * GetApiVersion returns a specified version. + * Returns a specified version. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the version to retrieve. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` * @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. @@ -1053,20 +1072,20 @@ export class RegistryClient { 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(); return this.innerApiCalls.getApiVersion(request, options, callback); } /** - * CreateApiVersion creates a specified version. + * Creates a specified version. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of versions. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` * @param {google.cloud.apigeeregistry.v1.ApiVersion} request.apiVersion * Required. The version to create. * @param {string} request.apiVersionId @@ -1161,14 +1180,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.createApiVersion(request, options, callback); } /** - * UpdateApiVersion can be used to modify a specified version. + * Used to modify a specified version. * * @param {Object} request * The request object that will be sent. @@ -1176,12 +1195,12 @@ export class RegistryClient { * Required. The version to update. * * The `name` field is used to identify the version to update. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` * @param {google.protobuf.FieldMask} request.updateMask * The list of fields to be updated. If omitted, all fields are updated that * are set in the request message (fields set to default values are ignored). - * If a "*" is specified, all fields are updated, including fields that are - * unspecified/default in the request. + * If an asterisk "*" is specified, all fields are updated, including fields + * that are unspecified/default in the request. * @param {boolean} request.allowMissing * If set to true, and the version is not found, a new version will be * created. In this situation, `update_mask` is ignored. @@ -1269,21 +1288,24 @@ export class RegistryClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'api_version.name': request.apiVersion!.name || '', }); this.initialize(); return this.innerApiCalls.updateApiVersion(request, options, callback); } /** - * DeleteApiVersion removes a specified version and all of the resources that + * Removes a specified version and all of the resources that * it owns. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the version to delete. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` + * @param {boolean} request.force + * If set to true, any child resources will also be deleted. + * (Otherwise, the request will only work if there are no child resources.) * @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. @@ -1368,20 +1390,20 @@ export class RegistryClient { 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(); return this.innerApiCalls.deleteApiVersion(request, options, callback); } /** - * GetApiSpec returns a specified spec. + * Returns a specified spec. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the spec to retrieve. - * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * Format: `projects/* /locations/* /apis/* /versions/* /specs/*` * @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. @@ -1460,14 +1482,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.getApiSpec(request, options, callback); } /** - * GetApiSpecContents returns the contents of a specified spec. + * Returns the contents of a specified spec. * If specs are stored with GZip compression, the default behavior * is to return the spec uncompressed (the mime_type response field * indicates the exact format returned). @@ -1476,7 +1498,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.name * Required. The name of the spec whose contents should be retrieved. - * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * Format: `projects/* /locations/* /apis/* /versions/* /specs/*` * @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. @@ -1561,20 +1583,20 @@ export class RegistryClient { 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(); return this.innerApiCalls.getApiSpecContents(request, options, callback); } /** - * CreateApiSpec creates a specified spec. + * Creates a specified spec. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of specs. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` * @param {google.cloud.apigeeregistry.v1.ApiSpec} request.apiSpec * Required. The spec to create. * @param {string} request.apiSpecId @@ -1663,14 +1685,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.createApiSpec(request, options, callback); } /** - * UpdateApiSpec can be used to modify a specified spec. + * Used to modify a specified spec. * * @param {Object} request * The request object that will be sent. @@ -1678,12 +1700,12 @@ export class RegistryClient { * Required. The spec to update. * * The `name` field is used to identify the spec to update. - * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * Format: `projects/* /locations/* /apis/* /versions/* /specs/*` * @param {google.protobuf.FieldMask} request.updateMask * The list of fields to be updated. If omitted, all fields are updated that * are set in the request message (fields set to default values are ignored). - * If a "*" is specified, all fields are updated, including fields that are - * unspecified/default in the request. + * If an asterisk "*" is specified, all fields are updated, including fields + * that are unspecified/default in the request. * @param {boolean} request.allowMissing * If set to true, and the spec is not found, a new spec will be created. * In this situation, `update_mask` is ignored. @@ -1765,21 +1787,21 @@ export class RegistryClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'api_spec.name': request.apiSpec!.name || '', }); this.initialize(); return this.innerApiCalls.updateApiSpec(request, options, callback); } /** - * DeleteApiSpec removes a specified spec, all revisions, and all child - * resources (e.g. artifacts). + * Removes a specified spec, all revisions, and all child + * resources (e.g., artifacts). * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the spec to delete. - * Format: projects/* /locations/* /apis/* /versions/* /specs/* + * Format: `projects/* /locations/* /apis/* /versions/* /specs/*` * @param {boolean} request.force * If set to true, any child resources will also be deleted. * (Otherwise, the request will only work if there are no child resources.) @@ -1861,14 +1883,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.deleteApiSpec(request, options, callback); } /** - * TagApiSpecRevision adds a tag to a specified revision of a spec. + * Adds a tag to a specified revision of a spec. * * @param {Object} request * The request object that will be sent. @@ -1961,14 +1983,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.tagApiSpecRevision(request, options, callback); } /** - * RollbackApiSpec sets the current revision to a specified prior revision. + * Sets the current revision to a specified prior revision. * Note that this creates a new revision with a new revision ID. * * @param {Object} request @@ -1979,7 +2001,7 @@ export class RegistryClient { * Required. The revision ID to roll back to. * It must be a revision of the same spec. * - * Example: c7cfa2a8 + * Example: `c7cfa2a8` * @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. @@ -2058,14 +2080,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.rollbackApiSpec(request, options, callback); } /** - * DeleteApiSpecRevision deletes a revision of a spec. + * Deletes a revision of a spec. * * @param {Object} request * The request object that will be sent. @@ -2074,7 +2096,7 @@ export class RegistryClient { * with a revision ID explicitly included. * * Example: - * projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8 + * `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` * @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. @@ -2159,20 +2181,20 @@ export class RegistryClient { 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(); return this.innerApiCalls.deleteApiSpecRevision(request, options, callback); } /** - * GetApiDeployment returns a specified deployment. + * Returns a specified deployment. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the deployment to retrieve. - * Format: projects/* /locations/* /apis/* /deployments/* + * Format: `projects/* /locations/* /apis/* /deployments/*` * @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. @@ -2257,20 +2279,20 @@ export class RegistryClient { 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(); return this.innerApiCalls.getApiDeployment(request, options, callback); } /** - * CreateApiDeployment creates a specified deployment. + * Creates a specified deployment. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of deployments. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` * @param {google.cloud.apigeeregistry.v1.ApiDeployment} request.apiDeployment * Required. The deployment to create. * @param {string} request.apiDeploymentId @@ -2365,14 +2387,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.createApiDeployment(request, options, callback); } /** - * UpdateApiDeployment can be used to modify a specified deployment. + * Used to modify a specified deployment. * * @param {Object} request * The request object that will be sent. @@ -2380,12 +2402,12 @@ export class RegistryClient { * Required. The deployment to update. * * The `name` field is used to identify the deployment to update. - * Format: projects/* /locations/* /apis/* /deployments/* + * Format: `projects/* /locations/* /apis/* /deployments/*` * @param {google.protobuf.FieldMask} request.updateMask * The list of fields to be updated. If omitted, all fields are updated that * are set in the request message (fields set to default values are ignored). - * If a "*" is specified, all fields are updated, including fields that are - * unspecified/default in the request. + * If an asterisk "*" is specified, all fields are updated, including fields + * that are unspecified/default in the request. * @param {boolean} request.allowMissing * If set to true, and the deployment is not found, a new deployment will be * created. In this situation, `update_mask` is ignored. @@ -2473,21 +2495,21 @@ export class RegistryClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'api_deployment.name': request.apiDeployment!.name || '', }); this.initialize(); return this.innerApiCalls.updateApiDeployment(request, options, callback); } /** - * DeleteApiDeployment removes a specified deployment, all revisions, and all - * child resources (e.g. artifacts). + * Removes a specified deployment, all revisions, and all + * child resources (e.g., artifacts). * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the deployment to delete. - * Format: projects/* /locations/* /apis/* /deployments/* + * Format: `projects/* /locations/* /apis/* /deployments/*` * @param {boolean} request.force * If set to true, any child resources will also be deleted. * (Otherwise, the request will only work if there are no child resources.) @@ -2575,14 +2597,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.deleteApiDeployment(request, options, callback); } /** - * TagApiDeploymentRevision adds a tag to a specified revision of a + * Adds a tag to a specified revision of a * deployment. * * @param {Object} request @@ -2676,7 +2698,7 @@ export class RegistryClient { 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(); @@ -2687,7 +2709,7 @@ export class RegistryClient { ); } /** - * RollbackApiDeployment sets the current revision to a specified prior + * Sets the current revision to a specified prior * revision. Note that this creates a new revision with a new revision ID. * * @param {Object} request @@ -2698,7 +2720,7 @@ export class RegistryClient { * Required. The revision ID to roll back to. * It must be a revision of the same deployment. * - * Example: c7cfa2a8 + * Example: `c7cfa2a8` * @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. @@ -2783,14 +2805,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.rollbackApiDeployment(request, options, callback); } /** - * DeleteApiDeploymentRevision deletes a revision of a deployment. + * Deletes a revision of a deployment. * * @param {Object} request * The request object that will be sent. @@ -2799,7 +2821,7 @@ export class RegistryClient { * with a revision ID explicitly included. * * Example: - * projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8 + * `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` * @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. @@ -2884,7 +2906,7 @@ export class RegistryClient { 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(); @@ -2895,13 +2917,13 @@ export class RegistryClient { ); } /** - * GetArtifact returns a specified artifact. + * Returns a specified artifact. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the artifact to retrieve. - * Format: {parent}/artifacts/* + * Format: `{parent}/artifacts/*` * @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. @@ -2980,14 +3002,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.getArtifact(request, options, callback); } /** - * GetArtifactContents returns the contents of a specified artifact. + * Returns the contents of a specified artifact. * If artifacts are stored with GZip compression, the default behavior * is to return the artifact uncompressed (the mime_type response field * indicates the exact format returned). @@ -2996,7 +3018,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.name * Required. The name of the artifact whose contents should be retrieved. - * Format: {parent}/artifacts/* + * Format: `{parent}/artifacts/*` * @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. @@ -3081,20 +3103,20 @@ export class RegistryClient { 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(); return this.innerApiCalls.getArtifactContents(request, options, callback); } /** - * CreateArtifact creates a specified artifact. + * Creates a specified artifact. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of artifacts. - * Format: {parent} + * Format: `{parent}` * @param {google.cloud.apigeeregistry.v1.Artifact} request.artifact * Required. The artifact to create. * @param {string} request.artifactId @@ -3183,14 +3205,14 @@ export class RegistryClient { 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(); return this.innerApiCalls.createArtifact(request, options, callback); } /** - * ReplaceArtifact can be used to replace a specified artifact. + * Used to replace a specified artifact. * * @param {Object} request * The request object that will be sent. @@ -3198,7 +3220,7 @@ export class RegistryClient { * Required. The artifact to replace. * * The `name` field is used to identify the artifact to replace. - * Format: {parent}/artifacts/* + * Format: `{parent}/artifacts/*` * @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. @@ -3277,20 +3299,20 @@ export class RegistryClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'artifact.name': request.artifact!.name || '', }); this.initialize(); return this.innerApiCalls.replaceArtifact(request, options, callback); } /** - * DeleteArtifact removes a specified artifact. + * Removes a specified artifact. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the artifact to delete. - * Format: {parent}/artifacts/* + * Format: `{parent}/artifacts/*` * @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. @@ -3369,7 +3391,7 @@ export class RegistryClient { 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(); @@ -3377,13 +3399,13 @@ export class RegistryClient { } /** - * ListApis returns matching APIs. + * Returns matching APIs. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of APIs. - * Format: projects/* /locations/* + * Format: `projects/* /locations/*` * @param {number} request.pageSize * The maximum number of APIs to return. * The service may return fewer than this value. @@ -3479,7 +3501,7 @@ export class RegistryClient { 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(); @@ -3492,7 +3514,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of APIs. - * Format: projects/* /locations/* + * Format: `projects/* /locations/*` * @param {number} request.pageSize * The maximum number of APIs to return. * The service may return fewer than this value. @@ -3528,14 +3550,14 @@ export class RegistryClient { 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['listApis']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listApis.createStream( - this.innerApiCalls.listApis as gax.GaxCall, + this.innerApiCalls.listApis as GaxCall, request, callSettings ); @@ -3549,7 +3571,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of APIs. - * Format: projects/* /locations/* + * Format: `projects/* /locations/*` * @param {number} request.pageSize * The maximum number of APIs to return. * The service may return fewer than this value. @@ -3586,7 +3608,7 @@ export class RegistryClient { 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['listApis']; @@ -3594,18 +3616,18 @@ export class RegistryClient { this.initialize(); return this.descriptors.page.listApis.asyncIterate( this.innerApiCalls['listApis'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } /** - * ListApiVersions returns matching versions. + * Returns matching versions. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of versions. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` * @param {number} request.pageSize * The maximum number of versions to return. * The service may return fewer than this value. @@ -3701,7 +3723,7 @@ export class RegistryClient { 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(); @@ -3714,7 +3736,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of versions. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` * @param {number} request.pageSize * The maximum number of versions to return. * The service may return fewer than this value. @@ -3750,14 +3772,14 @@ export class RegistryClient { 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['listApiVersions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listApiVersions.createStream( - this.innerApiCalls.listApiVersions as gax.GaxCall, + this.innerApiCalls.listApiVersions as GaxCall, request, callSettings ); @@ -3771,7 +3793,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of versions. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` * @param {number} request.pageSize * The maximum number of versions to return. * The service may return fewer than this value. @@ -3808,7 +3830,7 @@ export class RegistryClient { 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['listApiVersions']; @@ -3816,18 +3838,18 @@ export class RegistryClient { this.initialize(); return this.descriptors.page.listApiVersions.asyncIterate( this.innerApiCalls['listApiVersions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } /** - * ListApiSpecs returns matching specs. + * Returns matching specs. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of specs. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` * @param {number} request.pageSize * The maximum number of specs to return. * The service may return fewer than this value. @@ -3923,7 +3945,7 @@ export class RegistryClient { 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(); @@ -3936,7 +3958,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of specs. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` * @param {number} request.pageSize * The maximum number of specs to return. * The service may return fewer than this value. @@ -3972,14 +3994,14 @@ export class RegistryClient { 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['listApiSpecs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listApiSpecs.createStream( - this.innerApiCalls.listApiSpecs as gax.GaxCall, + this.innerApiCalls.listApiSpecs as GaxCall, request, callSettings ); @@ -3993,7 +4015,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of specs. - * Format: projects/* /locations/* /apis/* /versions/* + * Format: `projects/* /locations/* /apis/* /versions/*` * @param {number} request.pageSize * The maximum number of specs to return. * The service may return fewer than this value. @@ -4030,7 +4052,7 @@ export class RegistryClient { 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['listApiSpecs']; @@ -4038,12 +4060,12 @@ export class RegistryClient { this.initialize(); return this.descriptors.page.listApiSpecs.asyncIterate( this.innerApiCalls['listApiSpecs'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } /** - * ListApiSpecRevisions lists all revisions of a spec. + * Lists all revisions of a spec. * Revisions are returned in descending order of revision creation time. * * @param {Object} request @@ -4136,7 +4158,7 @@ export class RegistryClient { 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(); @@ -4175,14 +4197,14 @@ export class RegistryClient { 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 || '', }); const defaultCallSettings = this._defaults['listApiSpecRevisions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listApiSpecRevisions.createStream( - this.innerApiCalls.listApiSpecRevisions as gax.GaxCall, + this.innerApiCalls.listApiSpecRevisions as GaxCall, request, callSettings ); @@ -4223,7 +4245,7 @@ export class RegistryClient { 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 || '', }); const defaultCallSettings = this._defaults['listApiSpecRevisions']; @@ -4231,18 +4253,18 @@ export class RegistryClient { this.initialize(); return this.descriptors.page.listApiSpecRevisions.asyncIterate( this.innerApiCalls['listApiSpecRevisions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } /** - * ListApiDeployments returns matching deployments. + * Returns matching deployments. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of deployments. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` * @param {number} request.pageSize * The maximum number of deployments to return. * The service may return fewer than this value. @@ -4338,7 +4360,7 @@ export class RegistryClient { 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(); @@ -4351,7 +4373,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of deployments. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` * @param {number} request.pageSize * The maximum number of deployments to return. * The service may return fewer than this value. @@ -4387,14 +4409,14 @@ export class RegistryClient { 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['listApiDeployments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listApiDeployments.createStream( - this.innerApiCalls.listApiDeployments as gax.GaxCall, + this.innerApiCalls.listApiDeployments as GaxCall, request, callSettings ); @@ -4408,7 +4430,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of deployments. - * Format: projects/* /locations/* /apis/* + * Format: `projects/* /locations/* /apis/*` * @param {number} request.pageSize * The maximum number of deployments to return. * The service may return fewer than this value. @@ -4445,7 +4467,7 @@ export class RegistryClient { 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['listApiDeployments']; @@ -4453,12 +4475,12 @@ export class RegistryClient { this.initialize(); return this.descriptors.page.listApiDeployments.asyncIterate( this.innerApiCalls['listApiDeployments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } /** - * ListApiDeploymentRevisions lists all revisions of a deployment. + * Lists all revisions of a deployment. * Revisions are returned in descending order of revision creation time. * * @param {Object} request @@ -4551,7 +4573,7 @@ export class RegistryClient { 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(); @@ -4594,14 +4616,14 @@ export class RegistryClient { 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 || '', }); const defaultCallSettings = this._defaults['listApiDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listApiDeploymentRevisions.createStream( - this.innerApiCalls.listApiDeploymentRevisions as gax.GaxCall, + this.innerApiCalls.listApiDeploymentRevisions as GaxCall, request, callSettings ); @@ -4642,7 +4664,7 @@ export class RegistryClient { 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 || '', }); const defaultCallSettings = this._defaults['listApiDeploymentRevisions']; @@ -4650,18 +4672,18 @@ export class RegistryClient { this.initialize(); return this.descriptors.page.listApiDeploymentRevisions.asyncIterate( this.innerApiCalls['listApiDeploymentRevisions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } /** - * ListArtifacts returns matching artifacts. + * Returns matching artifacts. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of artifacts. - * Format: {parent} + * Format: `{parent}` * @param {number} request.pageSize * The maximum number of artifacts to return. * The service may return fewer than this value. @@ -4757,7 +4779,7 @@ export class RegistryClient { 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(); @@ -4770,7 +4792,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of artifacts. - * Format: {parent} + * Format: `{parent}` * @param {number} request.pageSize * The maximum number of artifacts to return. * The service may return fewer than this value. @@ -4806,14 +4828,14 @@ export class RegistryClient { 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['listArtifacts']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listArtifacts.createStream( - this.innerApiCalls.listArtifacts as gax.GaxCall, + this.innerApiCalls.listArtifacts as GaxCall, request, callSettings ); @@ -4827,7 +4849,7 @@ export class RegistryClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of artifacts. - * Format: {parent} + * Format: `{parent}` * @param {number} request.pageSize * The maximum number of artifacts to return. * The service may return fewer than this value. @@ -4864,7 +4886,7 @@ export class RegistryClient { 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['listArtifacts']; @@ -4872,7 +4894,7 @@ export class RegistryClient { this.initialize(); return this.descriptors.page.listArtifacts.asyncIterate( this.innerApiCalls['listArtifacts'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts b/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts index 060266212ae..29286290b92 100644 --- a/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts +++ b/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts @@ -111,99 +111,101 @@ function stubAsyncIterationCall( } describe('v1.ProvisioningClient', () => { - it('has servicePath', () => { - const servicePath = provisioningModule.v1.ProvisioningClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = provisioningModule.v1.ProvisioningClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = provisioningModule.v1.ProvisioningClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new provisioningModule.v1.ProvisioningClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = provisioningModule.v1.ProvisioningClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new provisioningModule.v1.ProvisioningClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = provisioningModule.v1.ProvisioningClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new provisioningModule.v1.ProvisioningClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = provisioningModule.v1.ProvisioningClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.provisioningStub, undefined); - await client.initialize(); - assert(client.provisioningStub); - }); - it('has close method for the initialized client', done => { - const client = new provisioningModule.v1.ProvisioningClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new provisioningModule.v1.ProvisioningClient(); + assert(client); }); - client.initialize(); - assert(client.provisioningStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new provisioningModule.v1.ProvisioningClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new provisioningModule.v1.ProvisioningClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.provisioningStub, undefined); + await client.initialize(); + assert(client.provisioningStub); }); - assert.strictEqual(client.provisioningStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.provisioningStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new provisioningModule.v1.ProvisioningClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new provisioningModule.v1.ProvisioningClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.provisioningStub, 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 provisioningModule.v1.ProvisioningClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new provisioningModule.v1.ProvisioningClient({ + 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 provisioningModule.v1.ProvisioningClient({ + 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('getInstance', () => { diff --git a/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts b/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts index db39c09f115..5b982c4f039 100644 --- a/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts +++ b/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts @@ -27,7 +27,6 @@ import {PassThrough} from 'stream'; import { protobuf, - LROperation, operationsProtos, IamProtos, LocationProtos, @@ -119,99 +118,101 @@ function stubAsyncIterationCall( } describe('v1.RegistryClient', () => { - it('has servicePath', () => { - const servicePath = registryModule.v1.RegistryClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = registryModule.v1.RegistryClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = registryModule.v1.RegistryClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = registryModule.v1.RegistryClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new registryModule.v1.RegistryClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = registryModule.v1.RegistryClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new registryModule.v1.RegistryClient({ - fallback: true, + it('has port', () => { + const port = registryModule.v1.RegistryClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new registryModule.v1.RegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new registryModule.v1.RegistryClient(); + assert(client); }); - assert.strictEqual(client.registryStub, undefined); - await client.initialize(); - assert(client.registryStub); - }); - it('has close method for the initialized client', done => { - const client = new registryModule.v1.RegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new registryModule.v1.RegistryClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.registryStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.registryStub, undefined); + await client.initialize(); + assert(client.registryStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new registryModule.v1.RegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.registryStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.registryStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new registryModule.v1.RegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.registryStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new registryModule.v1.RegistryClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new registryModule.v1.RegistryClient({ + 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 registryModule.v1.RegistryClient({ - 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 registryModule.v1.RegistryClient({ + 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('getApi', () => { From 875a4824fded0804ccf702b588ff49ed5ff1f9fd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 30 Aug 2022 17:23:25 -0400 Subject: [PATCH 15/40] chore(main): release 0.2.0 (#13) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 0.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-apigeeregistry/CHANGELOG.md | 15 +++++++++++++++ packages/google-cloud-apigeeregistry/package.json | 2 +- ...t_metadata.google.cloud.apigeeregistry.v1.json | 2 +- .../samples/package.json | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/CHANGELOG.md b/packages/google-cloud-apigeeregistry/CHANGELOG.md index 969354e97a7..347e84b1f03 100644 --- a/packages/google-cloud-apigeeregistry/CHANGELOG.md +++ b/packages/google-cloud-apigeeregistry/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [0.2.0](https://github.com/googleapis/nodejs-apigee-registry/compare/v0.1.0...v0.2.0) (2022-08-30) + + +### Features + +* added support for force field for API and API version deletion ([c0bf481](https://github.com/googleapis/nodejs-apigee-registry/commit/c0bf48111db1e05f88cb68fac40584e60bbdf6f6)) + + +### Bug Fixes + +* change import long to require ([#12](https://github.com/googleapis/nodejs-apigee-registry/issues/12)) ([c04237e](https://github.com/googleapis/nodejs-apigee-registry/commit/c04237ebc9dc76016f9017ee6f8cdf938fd14da8)) +* do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-apigee-registry/issues/1553)) ([#15](https://github.com/googleapis/nodejs-apigee-registry/issues/15)) ([34da6db](https://github.com/googleapis/nodejs-apigee-registry/commit/34da6dbc51476bf7a30fae332233c76527f9e9ff)) +* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-apigee-registry/issues/1546)) ([#14](https://github.com/googleapis/nodejs-apigee-registry/issues/14)) ([a6dba15](https://github.com/googleapis/nodejs-apigee-registry/commit/a6dba15c574a7537771ee95a50785b30b83eb4a2)) +* use google-gax v3.3.0 ([34da6db](https://github.com/googleapis/nodejs-apigee-registry/commit/34da6dbc51476bf7a30fae332233c76527f9e9ff)) + ## 0.1.0 (2022-07-21) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 61e77b81b04..ebc3b07aef0 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/apigee-registry", - "version": "0.1.0", + "version": "0.2.0", "description": "apigeeregistry client for Node.js", "repository": "googleapis/nodejs-apigee-registry", "license": "Apache-2.0", diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json index 259c49eb8fa..d8d7ae21c78 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeregistry", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeregistry/samples/package.json b/packages/google-cloud-apigeeregistry/samples/package.json index 559744e07bb..545bafcb2d9 100644 --- a/packages/google-cloud-apigeeregistry/samples/package.json +++ b/packages/google-cloud-apigeeregistry/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/apigee-registry": "^0.1.0" + "@google-cloud/apigee-registry": "^0.2.0" }, "devDependencies": { "c8": "^7.1.0", From 7a85656c32e46f33795c4f3ec3a81040005a5312 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 16:58:40 -0400 Subject: [PATCH 16/40] fix: additional error codes added to service configuration for retry (#16) PiperOrigin-RevId: 471585446 Source-Link: https://github.com/googleapis/googleapis/commit/e1b54cd79326cd4aae95ea7ae121dcd115a44dbf Source-Link: https://github.com/googleapis/googleapis-gen/commit/5cf9f3d16d4414508889245a7ac5ae36f4d886ee Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWNmOWYzZDE2ZDQ0MTQ1MDg4ODkyNDVhN2FjNWFlMzZmNGQ4ODZlZSJ9 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/registry_client_config.json | 141 +++++++++--------- 1 file changed, 72 insertions(+), 69 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_client_config.json b/packages/google-cloud-apigeeregistry/src/v1/registry_client_config.json index ac2098f7936..c26bf956bc9 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/registry_client_config.json +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_client_config.json @@ -7,7 +7,10 @@ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], - "unavailable": [ + "cancelled_deadline_exceeded_aborted_unavailable": [ + "CANCELLED", + "DEADLINE_EXCEEDED", + "ABORTED", "UNAVAILABLE" ] }, @@ -21,8 +24,8 @@ "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 }, - "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { - "initial_retry_delay_millis": 1000, + "5763d5cb4f40f09b4de469b8a0f10443a7a49d00": { + "initial_retry_delay_millis": 200, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, "initial_rpc_timeout_millis": 60000, @@ -34,93 +37,93 @@ "methods": { "ListApis": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "GetApi": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "CreateApi": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "UpdateApi": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "DeleteApi": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "ListApiVersions": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "GetApiVersion": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "CreateApiVersion": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "UpdateApiVersion": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "DeleteApiVersion": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "ListApiSpecs": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "GetApiSpec": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "GetApiSpecContents": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "CreateApiSpec": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "UpdateApiSpec": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "DeleteApiSpec": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "TagApiSpecRevision": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "ListApiSpecRevisions": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "RollbackApiSpec": { "timeout_millis": 60000, @@ -129,43 +132,43 @@ }, "DeleteApiSpecRevision": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "ListApiDeployments": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "GetApiDeployment": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "CreateApiDeployment": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "UpdateApiDeployment": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "DeleteApiDeployment": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "TagApiDeploymentRevision": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "ListApiDeploymentRevisions": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "RollbackApiDeployment": { "timeout_millis": 60000, @@ -174,38 +177,38 @@ }, "DeleteApiDeploymentRevision": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "ListArtifacts": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "GetArtifact": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "GetArtifactContents": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "CreateArtifact": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "ReplaceArtifact": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" }, "DeleteArtifact": { "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + "retry_codes_name": "cancelled_deadline_exceeded_aborted_unavailable", + "retry_params_name": "5763d5cb4f40f09b4de469b8a0f10443a7a49d00" } } } From 7bc4073f127e79f0069f019c273b40b3cc2821c5 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 15:56:33 -0700 Subject: [PATCH 17/40] fix: preserve default values in x-goog-request-params header (#18) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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: 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 Co-authored-by: Alexander Fenster --- .../.repo-metadata.json | 4 +- .../google-cloud-apigeeregistry/README.md | 2 +- .../src/v1/provisioning_client.ts | 6 +- .../src/v1/registry_client.ts | 439 +- .../test/gapic_provisioning_v1.ts | 347 +- .../test/gapic_registry_v1.ts | 4025 ++++++++--------- 6 files changed, 2241 insertions(+), 2582 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/.repo-metadata.json b/packages/google-cloud-apigeeregistry/.repo-metadata.json index d080edd6d64..5807bd4162c 100644 --- a/packages/google-cloud-apigeeregistry/.repo-metadata.json +++ b/packages/google-cloud-apigeeregistry/.repo-metadata.json @@ -2,8 +2,8 @@ "name": "apigeeregistry", "name_pretty": "Apigee Registry API", "product_documentation": "https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/apigeeregistry/latest", - "issue_tracker": "https://github.com/googleapis/nodejs-video-transcoder/issues", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/apigee-registry/latest", + "issue_tracker": "https://github.com/googleapis/nodejs-apigee-registry/issues", "release_level": "beta", "language": "nodejs", "repo": "googleapis/nodejs-apigee-registry", diff --git a/packages/google-cloud-apigeeregistry/README.md b/packages/google-cloud-apigeeregistry/README.md index 8dd1af26e79..b41032a1e76 100644 --- a/packages/google-cloud-apigeeregistry/README.md +++ b/packages/google-cloud-apigeeregistry/README.md @@ -117,7 +117,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-apigee-registry/blob/main/LICENSE) -[client-docs]: https://cloud.google.com/nodejs/docs/reference/apigeeregistry/latest +[client-docs]: https://cloud.google.com/nodejs/docs/reference/apigee-registry/latest [product-docs]: https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project diff --git a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts index 122b3c97e78..ecfe3d3a2cf 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts @@ -634,7 +634,7 @@ export class ProvisioningClient { 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.getInstance(request, options, callback); @@ -743,7 +743,7 @@ export class ProvisioningClient { 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.createInstance(request, options, callback); @@ -882,7 +882,7 @@ export class ProvisioningClient { 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.deleteInstance(request, options, callback); diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts index 3bcb8ba9738..11b1bd0579c 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts @@ -23,7 +23,6 @@ import type { CallOptions, Descriptors, ClientOptions, - GrpcClientOptions, PaginationCallback, GaxCall, IamClient, @@ -67,7 +66,6 @@ export class RegistryClient { iamClient: IamClient; locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; registryStub?: Promise<{[name: string]: Function}>; /** @@ -271,167 +269,6 @@ export class RegistryClient { ), }; - 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/*/apis/*}:getIamPolicy', - additional_bindings: [ - { - get: '/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:getIamPolicy', - }, - { - get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*}:getIamPolicy', - }, - { - get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:getIamPolicy', - }, - { - get: '/v1/{resource=projects/*/locations/*/artifacts/*}:getIamPolicy', - }, - { - get: '/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:getIamPolicy', - }, - { - get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getIamPolicy', - }, - { - get: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getIamPolicy', - }, - { - get: '/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy', - }, - {get: '/v1/{resource=projects/*/locations/*/runtime}:getIamPolicy'}, - ], - }, - { - selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', - post: '/v1/{resource=projects/*/locations/*/apis/*}:setIamPolicy', - body: '*', - additional_bindings: [ - { - post: '/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:setIamPolicy', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*}:setIamPolicy', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:setIamPolicy', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/artifacts/*}:setIamPolicy', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:setIamPolicy', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:setIamPolicy', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:setIamPolicy', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/runtime}:setIamPolicy', - body: '*', - }, - ], - }, - { - selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', - post: '/v1/{resource=projects/*/locations/*/apis/*}:testIamPermissions', - body: '*', - additional_bindings: [ - { - post: '/v1/{resource=projects/*/locations/*/apis/*/deployments/*}:testIamPermissions', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*}:testIamPermissions', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*}:testIamPermissions', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/artifacts/*}:testIamPermissions', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/apis/*/artifacts/*}:testIamPermissions', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/artifacts/*}:testIamPermissions', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:testIamPermissions', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions', - body: '*', - }, - { - post: '/v1/{resource=projects/*/locations/*/runtime}: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.apigeeregistry.v1.Registry', @@ -681,7 +518,7 @@ export class RegistryClient { 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.getApi(request, options, callback); @@ -783,7 +620,7 @@ export class RegistryClient { 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.createApi(request, options, callback); @@ -885,7 +722,7 @@ export class RegistryClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'api.name': request.api!.name || '', + 'api.name': request.api!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateApi(request, options, callback); @@ -981,7 +818,7 @@ export class RegistryClient { 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.deleteApi(request, options, callback); @@ -1073,7 +910,7 @@ export class RegistryClient { 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.getApiVersion(request, options, callback); @@ -1181,7 +1018,7 @@ export class RegistryClient { 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.createApiVersion(request, options, callback); @@ -1289,7 +1126,7 @@ export class RegistryClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'api_version.name': request.apiVersion!.name || '', + 'api_version.name': request.apiVersion!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateApiVersion(request, options, callback); @@ -1391,7 +1228,7 @@ export class RegistryClient { 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.deleteApiVersion(request, options, callback); @@ -1483,7 +1320,7 @@ export class RegistryClient { 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.getApiSpec(request, options, callback); @@ -1584,7 +1421,7 @@ export class RegistryClient { 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.getApiSpecContents(request, options, callback); @@ -1686,7 +1523,7 @@ export class RegistryClient { 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.createApiSpec(request, options, callback); @@ -1788,7 +1625,7 @@ export class RegistryClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'api_spec.name': request.apiSpec!.name || '', + 'api_spec.name': request.apiSpec!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateApiSpec(request, options, callback); @@ -1884,7 +1721,7 @@ export class RegistryClient { 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.deleteApiSpec(request, options, callback); @@ -1984,7 +1821,7 @@ export class RegistryClient { 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.tagApiSpecRevision(request, options, callback); @@ -2081,7 +1918,7 @@ export class RegistryClient { 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.rollbackApiSpec(request, options, callback); @@ -2182,7 +2019,7 @@ export class RegistryClient { 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.deleteApiSpecRevision(request, options, callback); @@ -2280,7 +2117,7 @@ export class RegistryClient { 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.getApiDeployment(request, options, callback); @@ -2388,7 +2225,7 @@ export class RegistryClient { 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.createApiDeployment(request, options, callback); @@ -2496,7 +2333,7 @@ export class RegistryClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'api_deployment.name': request.apiDeployment!.name || '', + 'api_deployment.name': request.apiDeployment!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateApiDeployment(request, options, callback); @@ -2598,7 +2435,7 @@ export class RegistryClient { 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.deleteApiDeployment(request, options, callback); @@ -2699,7 +2536,7 @@ export class RegistryClient { 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.tagApiDeploymentRevision( @@ -2806,7 +2643,7 @@ export class RegistryClient { 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.rollbackApiDeployment(request, options, callback); @@ -2907,7 +2744,7 @@ export class RegistryClient { 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.deleteApiDeploymentRevision( @@ -3003,7 +2840,7 @@ export class RegistryClient { 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.getArtifact(request, options, callback); @@ -3104,7 +2941,7 @@ export class RegistryClient { 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.getArtifactContents(request, options, callback); @@ -3206,7 +3043,7 @@ export class RegistryClient { 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.createArtifact(request, options, callback); @@ -3300,7 +3137,7 @@ export class RegistryClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'artifact.name': request.artifact!.name || '', + 'artifact.name': request.artifact!.name ?? '', }); this.initialize(); return this.innerApiCalls.replaceArtifact(request, options, callback); @@ -3392,7 +3229,7 @@ export class RegistryClient { 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.deleteArtifact(request, options, callback); @@ -3502,7 +3339,7 @@ export class RegistryClient { 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.listApis(request, options, callback); @@ -3551,7 +3388,7 @@ export class RegistryClient { 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['listApis']; const callSettings = defaultCallSettings.merge(options); @@ -3609,7 +3446,7 @@ export class RegistryClient { 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['listApis']; const callSettings = defaultCallSettings.merge(options); @@ -3724,7 +3561,7 @@ export class RegistryClient { 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.listApiVersions(request, options, callback); @@ -3773,7 +3610,7 @@ export class RegistryClient { 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['listApiVersions']; const callSettings = defaultCallSettings.merge(options); @@ -3831,7 +3668,7 @@ export class RegistryClient { 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['listApiVersions']; const callSettings = defaultCallSettings.merge(options); @@ -3946,7 +3783,7 @@ export class RegistryClient { 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.listApiSpecs(request, options, callback); @@ -3995,7 +3832,7 @@ export class RegistryClient { 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['listApiSpecs']; const callSettings = defaultCallSettings.merge(options); @@ -4053,7 +3890,7 @@ export class RegistryClient { 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['listApiSpecs']; const callSettings = defaultCallSettings.merge(options); @@ -4159,7 +3996,7 @@ export class RegistryClient { 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.listApiSpecRevisions(request, options, callback); @@ -4198,7 +4035,7 @@ export class RegistryClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['listApiSpecRevisions']; const callSettings = defaultCallSettings.merge(options); @@ -4246,7 +4083,7 @@ export class RegistryClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['listApiSpecRevisions']; const callSettings = defaultCallSettings.merge(options); @@ -4361,7 +4198,7 @@ export class RegistryClient { 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.listApiDeployments(request, options, callback); @@ -4410,7 +4247,7 @@ export class RegistryClient { 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['listApiDeployments']; const callSettings = defaultCallSettings.merge(options); @@ -4468,7 +4305,7 @@ export class RegistryClient { 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['listApiDeployments']; const callSettings = defaultCallSettings.merge(options); @@ -4574,7 +4411,7 @@ export class RegistryClient { 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.listApiDeploymentRevisions( @@ -4617,7 +4454,7 @@ export class RegistryClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['listApiDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); @@ -4665,7 +4502,7 @@ export class RegistryClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['listApiDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); @@ -4780,7 +4617,7 @@ export class RegistryClient { 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.listArtifacts(request, options, callback); @@ -4829,7 +4666,7 @@ export class RegistryClient { 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['listArtifacts']; const callSettings = defaultCallSettings.merge(options); @@ -4887,7 +4724,7 @@ export class RegistryClient { 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['listArtifacts']; const callSettings = defaultCallSettings.merge(options); @@ -5118,183 +4955,6 @@ export class RegistryClient { 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 -- // -------------------- @@ -6166,7 +5826,6 @@ export class RegistryClient { stub.close(); this.iamClient.close(); this.locationsClient.close(); - this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts b/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts index 29286290b92..a87c8a62631 100644 --- a/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts +++ b/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts @@ -31,6 +31,21 @@ import { 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 = ( instance.constructor as typeof protobuf.Message @@ -218,26 +233,26 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetInstanceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Instance() ); client.innerApiCalls.getInstance = stubSimpleCall(expectedResponse); const [response] = await client.getInstance(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getInstance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInstance without error using callback', async () => { @@ -249,15 +264,12 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetInstanceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Instance() ); @@ -280,11 +292,14 @@ describe('v1.ProvisioningClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getInstance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInstance with error', async () => { @@ -296,26 +311,26 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetInstanceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getInstance = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getInstance(request), expectedError); - assert( - (client.innerApiCalls.getInstance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInstance with closed client', async () => { @@ -327,7 +342,11 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetInstanceRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getInstance(request), expectedError); @@ -344,15 +363,12 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateInstanceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -361,11 +377,14 @@ describe('v1.ProvisioningClient', () => { const [operation] = await client.createInstance(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createInstance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createInstance without error using callback', async () => { @@ -377,15 +396,12 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateInstanceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -415,11 +431,14 @@ describe('v1.ProvisioningClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createInstance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createInstance with call error', async () => { @@ -431,26 +450,26 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateInstanceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createInstance = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createInstance(request), expectedError); - assert( - (client.innerApiCalls.createInstance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createInstance with LRO error', async () => { @@ -462,15 +481,12 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateInstanceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createInstance = stubLongRunningCall( undefined, @@ -479,11 +495,14 @@ describe('v1.ProvisioningClient', () => { ); const [operation] = await client.createInstance(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createInstance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateInstanceProgress without error', async () => { @@ -538,15 +557,12 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteInstanceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -555,11 +571,14 @@ describe('v1.ProvisioningClient', () => { const [operation] = await client.deleteInstance(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteInstance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteInstance without error using callback', async () => { @@ -571,15 +590,12 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteInstanceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -609,11 +625,14 @@ describe('v1.ProvisioningClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteInstance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteInstance with call error', async () => { @@ -625,26 +644,26 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteInstanceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteInstance = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteInstance(request), expectedError); - assert( - (client.innerApiCalls.deleteInstance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteInstance with LRO error', async () => { @@ -656,15 +675,12 @@ describe('v1.ProvisioningClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteInstanceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteInstance = stubLongRunningCall( undefined, @@ -673,11 +689,14 @@ describe('v1.ProvisioningClient', () => { ); const [operation] = await client.deleteInstance(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteInstance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteInstance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteInstanceProgress without error', async () => { @@ -1192,12 +1211,15 @@ describe('v1.ProvisioningClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.locationsClient.descriptors.page.listLocations .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 + ) ); }); it('uses async iteration with listLocations with error', async () => { @@ -1228,12 +1250,15 @@ describe('v1.ProvisioningClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.locationsClient.descriptors.page.listLocations .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 + ) ); }); }); diff --git a/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts b/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts index 5b982c4f039..369b42c1075 100644 --- a/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts +++ b/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts @@ -25,12 +25,22 @@ import * as registryModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - operationsProtos, - IamProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, IamProtos, 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 = ( @@ -225,26 +235,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Api() ); client.innerApiCalls.getApi = stubSimpleCall(expectedResponse); const [response] = await client.getApi(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getApi as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApi without error using callback', async () => { @@ -256,15 +266,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Api() ); @@ -287,11 +294,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = (client.innerApiCalls.getApi as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApi with error', async () => { @@ -303,23 +313,23 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getApi = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getApi(request), expectedError); - assert( - (client.innerApiCalls.getApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getApi as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApi with closed client', async () => { @@ -331,7 +341,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getApi(request), expectedError); @@ -348,26 +362,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Api() ); client.innerApiCalls.createApi = stubSimpleCall(expectedResponse); const [response] = await client.createApi(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createApi as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApi without error using callback', async () => { @@ -379,15 +393,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Api() ); @@ -410,11 +421,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createApi as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApi with error', async () => { @@ -426,23 +440,23 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createApi = stubSimpleCall(undefined, expectedError); await assert.rejects(client.createApi(request), expectedError); - assert( - (client.innerApiCalls.createApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createApi as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApi with closed client', async () => { @@ -454,7 +468,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createApi(request), expectedError); @@ -471,27 +489,27 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() ); - request.api = {}; - request.api.name = ''; - const expectedHeaderRequestParams = 'api.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.api ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiRequest', + ['api', 'name'] + ); + request.api.name = defaultValue1; + const expectedHeaderRequestParams = `api.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Api() ); client.innerApiCalls.updateApi = stubSimpleCall(expectedResponse); const [response] = await client.updateApi(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateApi as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApi without error using callback', async () => { @@ -503,16 +521,13 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() ); - request.api = {}; - request.api.name = ''; - const expectedHeaderRequestParams = 'api.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.api ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiRequest', + ['api', 'name'] + ); + request.api.name = defaultValue1; + const expectedHeaderRequestParams = `api.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Api() ); @@ -535,11 +550,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateApi as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApi with error', async () => { @@ -551,24 +569,24 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() ); - request.api = {}; - request.api.name = ''; - const expectedHeaderRequestParams = 'api.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.api ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiRequest', + ['api', 'name'] + ); + request.api.name = defaultValue1; + const expectedHeaderRequestParams = `api.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateApi = stubSimpleCall(undefined, expectedError); await assert.rejects(client.updateApi(request), expectedError); - assert( - (client.innerApiCalls.updateApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateApi as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApi with closed client', async () => { @@ -580,8 +598,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() ); - request.api = {}; - request.api.name = ''; + request.api ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiRequest', + ['api', 'name'] + ); + request.api.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateApi(request), expectedError); @@ -598,26 +620,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteApi = stubSimpleCall(expectedResponse); const [response] = await client.deleteApi(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApi as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApi without error using callback', async () => { @@ -629,15 +651,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -660,11 +679,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteApi as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApi with error', async () => { @@ -676,23 +698,23 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteApi = stubSimpleCall(undefined, expectedError); await assert.rejects(client.deleteApi(request), expectedError); - assert( - (client.innerApiCalls.deleteApi as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApi as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApi as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApi with closed client', async () => { @@ -704,7 +726,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteApi(request), expectedError); @@ -721,26 +747,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiVersionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiVersion() ); client.innerApiCalls.getApiVersion = stubSimpleCall(expectedResponse); const [response] = await client.getApiVersion(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiVersion without error using callback', async () => { @@ -752,15 +778,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiVersionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiVersion() ); @@ -783,11 +806,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiVersion with error', async () => { @@ -799,26 +825,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiVersionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getApiVersion = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getApiVersion(request), expectedError); - assert( - (client.innerApiCalls.getApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiVersion with closed client', async () => { @@ -830,7 +856,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiVersionRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getApiVersion(request), expectedError); @@ -847,26 +877,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiVersionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiVersion() ); client.innerApiCalls.createApiVersion = stubSimpleCall(expectedResponse); const [response] = await client.createApiVersion(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApiVersion without error using callback', async () => { @@ -878,15 +908,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiVersionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiVersion() ); @@ -909,11 +936,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApiVersion with error', async () => { @@ -925,26 +955,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiVersionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createApiVersion = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createApiVersion(request), expectedError); - assert( - (client.innerApiCalls.createApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApiVersion with closed client', async () => { @@ -956,7 +986,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiVersionRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createApiVersion(request), expectedError); @@ -973,27 +1007,27 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() ); - request.apiVersion = {}; - request.apiVersion.name = ''; - const expectedHeaderRequestParams = 'api_version.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.apiVersion ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest', + ['apiVersion', 'name'] + ); + request.apiVersion.name = defaultValue1; + const expectedHeaderRequestParams = `api_version.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiVersion() ); client.innerApiCalls.updateApiVersion = stubSimpleCall(expectedResponse); const [response] = await client.updateApiVersion(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApiVersion without error using callback', async () => { @@ -1005,16 +1039,13 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() ); - request.apiVersion = {}; - request.apiVersion.name = ''; - const expectedHeaderRequestParams = 'api_version.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.apiVersion ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest', + ['apiVersion', 'name'] + ); + request.apiVersion.name = defaultValue1; + const expectedHeaderRequestParams = `api_version.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiVersion() ); @@ -1037,11 +1068,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApiVersion with error', async () => { @@ -1053,27 +1087,27 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() ); - request.apiVersion = {}; - request.apiVersion.name = ''; - const expectedHeaderRequestParams = 'api_version.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.apiVersion ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest', + ['apiVersion', 'name'] + ); + request.apiVersion.name = defaultValue1; + const expectedHeaderRequestParams = `api_version.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateApiVersion = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateApiVersion(request), expectedError); - assert( - (client.innerApiCalls.updateApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApiVersion with closed client', async () => { @@ -1085,8 +1119,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() ); - request.apiVersion = {}; - request.apiVersion.name = ''; + request.apiVersion ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest', + ['apiVersion', 'name'] + ); + request.apiVersion.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateApiVersion(request), expectedError); @@ -1103,26 +1141,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteApiVersion = stubSimpleCall(expectedResponse); const [response] = await client.deleteApiVersion(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiVersion without error using callback', async () => { @@ -1134,15 +1172,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1165,11 +1200,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiVersion with error', async () => { @@ -1181,26 +1219,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteApiVersion = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteApiVersion(request), expectedError); - assert( - (client.innerApiCalls.deleteApiVersion as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiVersion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiVersion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiVersion with closed client', async () => { @@ -1212,7 +1250,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteApiVersion(request), expectedError); @@ -1229,26 +1271,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); client.innerApiCalls.getApiSpec = stubSimpleCall(expectedResponse); const [response] = await client.getApiSpec(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiSpec without error using callback', async () => { @@ -1260,15 +1302,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); @@ -1291,11 +1330,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiSpec with error', async () => { @@ -1307,26 +1349,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getApiSpec = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getApiSpec(request), expectedError); - assert( - (client.innerApiCalls.getApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiSpec with closed client', async () => { @@ -1338,7 +1380,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getApiSpec(request), expectedError); @@ -1355,15 +1401,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -1371,11 +1414,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getApiSpecContents(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getApiSpecContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getApiSpecContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiSpecContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiSpecContents without error using callback', async () => { @@ -1387,15 +1433,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -1415,11 +1458,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getApiSpecContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getApiSpecContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiSpecContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiSpecContents with error', async () => { @@ -1431,26 +1477,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getApiSpecContents = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getApiSpecContents(request), expectedError); - assert( - (client.innerApiCalls.getApiSpecContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getApiSpecContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiSpecContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiSpecContents with closed client', async () => { @@ -1462,7 +1508,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getApiSpecContents(request), expectedError); @@ -1479,26 +1529,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiSpecRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); client.innerApiCalls.createApiSpec = stubSimpleCall(expectedResponse); const [response] = await client.createApiSpec(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApiSpec without error using callback', async () => { @@ -1510,15 +1560,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiSpecRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); @@ -1541,11 +1588,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApiSpec with error', async () => { @@ -1557,26 +1607,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiSpecRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createApiSpec = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createApiSpec(request), expectedError); - assert( - (client.innerApiCalls.createApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApiSpec with closed client', async () => { @@ -1588,7 +1638,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiSpecRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createApiSpec(request), expectedError); @@ -1605,27 +1659,27 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() ); - request.apiSpec = {}; - request.apiSpec.name = ''; - const expectedHeaderRequestParams = 'api_spec.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.apiSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest', + ['apiSpec', 'name'] + ); + request.apiSpec.name = defaultValue1; + const expectedHeaderRequestParams = `api_spec.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); client.innerApiCalls.updateApiSpec = stubSimpleCall(expectedResponse); const [response] = await client.updateApiSpec(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApiSpec without error using callback', async () => { @@ -1637,16 +1691,13 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() ); - request.apiSpec = {}; - request.apiSpec.name = ''; - const expectedHeaderRequestParams = 'api_spec.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.apiSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest', + ['apiSpec', 'name'] + ); + request.apiSpec.name = defaultValue1; + const expectedHeaderRequestParams = `api_spec.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); @@ -1669,11 +1720,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApiSpec with error', async () => { @@ -1685,27 +1739,27 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() ); - request.apiSpec = {}; - request.apiSpec.name = ''; - const expectedHeaderRequestParams = 'api_spec.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.apiSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest', + ['apiSpec', 'name'] + ); + request.apiSpec.name = defaultValue1; + const expectedHeaderRequestParams = `api_spec.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateApiSpec = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateApiSpec(request), expectedError); - assert( - (client.innerApiCalls.updateApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApiSpec with closed client', async () => { @@ -1717,8 +1771,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() ); - request.apiSpec = {}; - request.apiSpec.name = ''; + request.apiSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest', + ['apiSpec', 'name'] + ); + request.apiSpec.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateApiSpec(request), expectedError); @@ -1735,26 +1793,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteApiSpec = stubSimpleCall(expectedResponse); const [response] = await client.deleteApiSpec(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiSpec without error using callback', async () => { @@ -1766,15 +1824,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -1797,11 +1852,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiSpec with error', async () => { @@ -1813,26 +1871,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteApiSpec = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteApiSpec(request), expectedError); - assert( - (client.innerApiCalls.deleteApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiSpec with closed client', async () => { @@ -1844,7 +1902,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteApiSpec(request), expectedError); @@ -1861,15 +1923,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); @@ -1877,11 +1936,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.tagApiSpecRevision(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.tagApiSpecRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.tagApiSpecRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.tagApiSpecRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes tagApiSpecRevision without error using callback', async () => { @@ -1893,15 +1955,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); @@ -1924,11 +1983,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.tagApiSpecRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.tagApiSpecRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.tagApiSpecRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes tagApiSpecRevision with error', async () => { @@ -1940,26 +2002,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.tagApiSpecRevision = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.tagApiSpecRevision(request), expectedError); - assert( - (client.innerApiCalls.tagApiSpecRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.tagApiSpecRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.tagApiSpecRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes tagApiSpecRevision with closed client', async () => { @@ -1971,7 +2033,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.tagApiSpecRevision(request), expectedError); @@ -1988,26 +2054,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); client.innerApiCalls.rollbackApiSpec = stubSimpleCall(expectedResponse); const [response] = await client.rollbackApiSpec(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.rollbackApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.rollbackApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes rollbackApiSpec without error using callback', async () => { @@ -2019,15 +2085,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); @@ -2050,11 +2113,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.rollbackApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.rollbackApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes rollbackApiSpec with error', async () => { @@ -2066,26 +2132,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.rollbackApiSpec = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.rollbackApiSpec(request), expectedError); - assert( - (client.innerApiCalls.rollbackApiSpec as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.rollbackApiSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackApiSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes rollbackApiSpec with closed client', async () => { @@ -2097,7 +2163,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.rollbackApiSpec(request), expectedError); @@ -2114,15 +2184,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); @@ -2130,11 +2197,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.deleteApiSpecRevision(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApiSpecRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiSpecRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiSpecRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiSpecRevision without error using callback', async () => { @@ -2146,15 +2216,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() ); @@ -2177,11 +2244,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApiSpecRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiSpecRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiSpecRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiSpecRevision with error', async () => { @@ -2193,15 +2263,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteApiSpecRevision = stubSimpleCall( undefined, @@ -2211,11 +2278,14 @@ describe('v1.RegistryClient', () => { client.deleteApiSpecRevision(request), expectedError ); - assert( - (client.innerApiCalls.deleteApiSpecRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiSpecRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiSpecRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiSpecRevision with closed client', async () => { @@ -2227,7 +2297,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -2247,26 +2321,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); client.innerApiCalls.getApiDeployment = stubSimpleCall(expectedResponse); const [response] = await client.getApiDeployment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiDeployment without error using callback', async () => { @@ -2278,15 +2352,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); @@ -2309,11 +2380,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiDeployment with error', async () => { @@ -2325,26 +2399,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getApiDeployment = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getApiDeployment(request), expectedError); - assert( - (client.innerApiCalls.getApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getApiDeployment with closed client', async () => { @@ -2356,7 +2430,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getApiDeployment(request), expectedError); @@ -2373,15 +2451,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); @@ -2389,11 +2464,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.createApiDeployment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApiDeployment without error using callback', async () => { @@ -2405,15 +2483,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); @@ -2436,11 +2511,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApiDeployment with error', async () => { @@ -2452,26 +2530,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createApiDeployment = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createApiDeployment(request), expectedError); - assert( - (client.innerApiCalls.createApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createApiDeployment with closed client', async () => { @@ -2483,7 +2561,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createApiDeployment(request), expectedError); @@ -2500,16 +2582,13 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() ); - request.apiDeployment = {}; - request.apiDeployment.name = ''; - const expectedHeaderRequestParams = 'api_deployment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.apiDeployment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest', + ['apiDeployment', 'name'] + ); + request.apiDeployment.name = defaultValue1; + const expectedHeaderRequestParams = `api_deployment.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); @@ -2517,11 +2596,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.updateApiDeployment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApiDeployment without error using callback', async () => { @@ -2533,16 +2615,13 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() ); - request.apiDeployment = {}; - request.apiDeployment.name = ''; - const expectedHeaderRequestParams = 'api_deployment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.apiDeployment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest', + ['apiDeployment', 'name'] + ); + request.apiDeployment.name = defaultValue1; + const expectedHeaderRequestParams = `api_deployment.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); @@ -2565,11 +2644,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApiDeployment with error', async () => { @@ -2581,27 +2663,27 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() ); - request.apiDeployment = {}; - request.apiDeployment.name = ''; - const expectedHeaderRequestParams = 'api_deployment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.apiDeployment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest', + ['apiDeployment', 'name'] + ); + request.apiDeployment.name = defaultValue1; + const expectedHeaderRequestParams = `api_deployment.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateApiDeployment = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateApiDeployment(request), expectedError); - assert( - (client.innerApiCalls.updateApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateApiDeployment with closed client', async () => { @@ -2613,8 +2695,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() ); - request.apiDeployment = {}; - request.apiDeployment.name = ''; + request.apiDeployment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest', + ['apiDeployment', 'name'] + ); + request.apiDeployment.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateApiDeployment(request), expectedError); @@ -2631,15 +2717,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -2647,11 +2730,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.deleteApiDeployment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiDeployment without error using callback', async () => { @@ -2663,15 +2749,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -2694,11 +2777,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiDeployment with error', async () => { @@ -2710,26 +2796,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteApiDeployment = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteApiDeployment(request), expectedError); - assert( - (client.innerApiCalls.deleteApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiDeployment with closed client', async () => { @@ -2741,7 +2827,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteApiDeployment(request), expectedError); @@ -2758,15 +2848,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); @@ -2774,11 +2861,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.tagApiDeploymentRevision(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.tagApiDeploymentRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.tagApiDeploymentRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.tagApiDeploymentRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes tagApiDeploymentRevision without error using callback', async () => { @@ -2790,15 +2880,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); @@ -2821,11 +2908,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.tagApiDeploymentRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.tagApiDeploymentRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.tagApiDeploymentRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes tagApiDeploymentRevision with error', async () => { @@ -2837,15 +2927,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.tagApiDeploymentRevision = stubSimpleCall( undefined, @@ -2855,11 +2942,14 @@ describe('v1.RegistryClient', () => { client.tagApiDeploymentRevision(request), expectedError ); - assert( - (client.innerApiCalls.tagApiDeploymentRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.tagApiDeploymentRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.tagApiDeploymentRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes tagApiDeploymentRevision with closed client', async () => { @@ -2871,7 +2961,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -2891,15 +2985,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); @@ -2907,11 +2998,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.rollbackApiDeployment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.rollbackApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.rollbackApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes rollbackApiDeployment without error using callback', async () => { @@ -2923,15 +3017,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); @@ -2954,11 +3045,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.rollbackApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.rollbackApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes rollbackApiDeployment with error', async () => { @@ -2970,15 +3064,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.rollbackApiDeployment = stubSimpleCall( undefined, @@ -2988,11 +3079,14 @@ describe('v1.RegistryClient', () => { client.rollbackApiDeployment(request), expectedError ); - assert( - (client.innerApiCalls.rollbackApiDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.rollbackApiDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackApiDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes rollbackApiDeployment with closed client', async () => { @@ -3004,7 +3098,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3024,15 +3122,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); @@ -3040,11 +3135,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.deleteApiDeploymentRevision(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApiDeploymentRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiDeploymentRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiDeploymentRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiDeploymentRevision without error using callback', async () => { @@ -3056,15 +3154,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() ); @@ -3087,11 +3182,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteApiDeploymentRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiDeploymentRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiDeploymentRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiDeploymentRevision with error', async () => { @@ -3103,15 +3201,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteApiDeploymentRevision = stubSimpleCall( undefined, @@ -3121,11 +3216,14 @@ describe('v1.RegistryClient', () => { client.deleteApiDeploymentRevision(request), expectedError ); - assert( - (client.innerApiCalls.deleteApiDeploymentRevision as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteApiDeploymentRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteApiDeploymentRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteApiDeploymentRevision with closed client', async () => { @@ -3137,7 +3235,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -3157,26 +3259,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetArtifactRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Artifact() ); client.innerApiCalls.getArtifact = stubSimpleCall(expectedResponse); const [response] = await client.getArtifact(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getArtifact without error using callback', async () => { @@ -3188,15 +3290,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetArtifactRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Artifact() ); @@ -3219,11 +3318,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getArtifact with error', async () => { @@ -3235,26 +3337,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetArtifactRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getArtifact = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getArtifact(request), expectedError); - assert( - (client.innerApiCalls.getArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getArtifact with closed client', async () => { @@ -3266,7 +3368,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetArtifactRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getArtifact(request), expectedError); @@ -3283,15 +3389,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -3299,11 +3402,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getArtifactContents(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getArtifactContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getArtifactContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getArtifactContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getArtifactContents without error using callback', async () => { @@ -3315,15 +3421,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -3343,11 +3446,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getArtifactContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getArtifactContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getArtifactContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getArtifactContents with error', async () => { @@ -3359,26 +3465,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getArtifactContents = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getArtifactContents(request), expectedError); - assert( - (client.innerApiCalls.getArtifactContents as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getArtifactContents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getArtifactContents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getArtifactContents with closed client', async () => { @@ -3390,7 +3496,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getArtifactContents(request), expectedError); @@ -3407,46 +3517,43 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateArtifactRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Artifact() ); client.innerApiCalls.createArtifact = stubSimpleCall(expectedResponse); const [response] = await client.createArtifact(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createArtifact without error using callback', async () => { const client = new registryModule.v1.RegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateArtifactRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Artifact() ); @@ -3469,11 +3576,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createArtifact with error', async () => { @@ -3485,26 +3595,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateArtifactRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createArtifact = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createArtifact(request), expectedError); - assert( - (client.innerApiCalls.createArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createArtifact with closed client', async () => { @@ -3516,7 +3626,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.CreateArtifactRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createArtifact(request), expectedError); @@ -3533,27 +3647,27 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() ); - request.artifact = {}; - request.artifact.name = ''; - const expectedHeaderRequestParams = 'artifact.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.artifact ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest', + ['artifact', 'name'] + ); + request.artifact.name = defaultValue1; + const expectedHeaderRequestParams = `artifact.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Artifact() ); client.innerApiCalls.replaceArtifact = stubSimpleCall(expectedResponse); const [response] = await client.replaceArtifact(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.replaceArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.replaceArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.replaceArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes replaceArtifact without error using callback', async () => { @@ -3565,16 +3679,13 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() ); - request.artifact = {}; - request.artifact.name = ''; - const expectedHeaderRequestParams = 'artifact.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.artifact ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest', + ['artifact', 'name'] + ); + request.artifact.name = defaultValue1; + const expectedHeaderRequestParams = `artifact.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Artifact() ); @@ -3597,11 +3708,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.replaceArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.replaceArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.replaceArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes replaceArtifact with error', async () => { @@ -3613,27 +3727,27 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() ); - request.artifact = {}; - request.artifact.name = ''; - const expectedHeaderRequestParams = 'artifact.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.artifact ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest', + ['artifact', 'name'] + ); + request.artifact.name = defaultValue1; + const expectedHeaderRequestParams = `artifact.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.replaceArtifact = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.replaceArtifact(request), expectedError); - assert( - (client.innerApiCalls.replaceArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.replaceArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.replaceArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes replaceArtifact with closed client', async () => { @@ -3645,8 +3759,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() ); - request.artifact = {}; - request.artifact.name = ''; + request.artifact ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest', + ['artifact', 'name'] + ); + request.artifact.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.replaceArtifact(request), expectedError); @@ -3663,26 +3781,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteArtifactRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteArtifact = stubSimpleCall(expectedResponse); const [response] = await client.deleteArtifact(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteArtifact without error using callback', async () => { @@ -3694,15 +3812,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteArtifactRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -3725,11 +3840,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteArtifact with error', async () => { @@ -3741,26 +3859,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteArtifactRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteArtifact = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteArtifact(request), expectedError); - assert( - (client.innerApiCalls.deleteArtifact as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteArtifact as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteArtifact as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteArtifact with closed client', async () => { @@ -3772,7 +3890,11 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.DeleteArtifactRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteArtifact(request), expectedError); @@ -3789,15 +3911,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), @@ -3806,11 +3925,14 @@ describe('v1.RegistryClient', () => { client.innerApiCalls.listApis = stubSimpleCall(expectedResponse); const [response] = await client.listApis(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApis as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApis without error using callback', async () => { @@ -3822,15 +3944,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), @@ -3855,11 +3974,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApis as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listApis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApis with error', async () => { @@ -3871,23 +3993,23 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listApis = stubSimpleCall(undefined, expectedError); await assert.rejects(client.listApis(request), expectedError); - assert( - (client.innerApiCalls.listApis as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApisStream without error', async () => { @@ -3899,8 +4021,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), @@ -3931,10 +4057,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApis, request) ); - assert.strictEqual( - (client.descriptors.page.listApis.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApis.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3947,8 +4075,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApis.createStream = stubPageStreamingCall( undefined, @@ -3976,10 +4108,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApis, request) ); - assert.strictEqual( - (client.descriptors.page.listApis.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApis.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3992,8 +4126,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), generateSampleMessage(new protos.google.cloud.apigeeregistry.v1.Api()), @@ -4012,10 +4150,12 @@ describe('v1.RegistryClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listApis.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApis.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4028,8 +4168,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApis.asyncIterate = stubAsyncIterationCall( undefined, @@ -4047,10 +4191,12 @@ describe('v1.RegistryClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listApis.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApis.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4065,15 +4211,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiVersionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiVersion() @@ -4088,11 +4231,14 @@ describe('v1.RegistryClient', () => { client.innerApiCalls.listApiVersions = stubSimpleCall(expectedResponse); const [response] = await client.listApiVersions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApiVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApiVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiVersions without error using callback', async () => { @@ -4104,15 +4250,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiVersionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiVersion() @@ -4143,11 +4286,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApiVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listApiVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiVersions with error', async () => { @@ -4159,26 +4305,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiVersionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listApiVersions = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listApiVersions(request), expectedError); - assert( - (client.innerApiCalls.listApiVersions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApiVersions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiVersions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiVersionsStream without error', async () => { @@ -4190,8 +4336,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiVersionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiVersion() @@ -4229,11 +4379,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApiVersions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listApiVersions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiVersions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4246,8 +4397,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiVersionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApiVersions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4274,11 +4429,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApiVersions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listApiVersions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiVersions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4291,8 +4447,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiVersionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiVersion() @@ -4318,11 +4478,12 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listApiVersions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiVersions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4335,8 +4496,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiVersionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApiVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4354,11 +4519,12 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listApiVersions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiVersions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4373,15 +4539,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() @@ -4396,11 +4559,14 @@ describe('v1.RegistryClient', () => { client.innerApiCalls.listApiSpecs = stubSimpleCall(expectedResponse); const [response] = await client.listApiSpecs(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApiSpecs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApiSpecs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiSpecs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiSpecs without error using callback', async () => { @@ -4412,15 +4578,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() @@ -4451,11 +4614,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApiSpecs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listApiSpecs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiSpecs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiSpecs with error', async () => { @@ -4467,26 +4633,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listApiSpecs = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listApiSpecs(request), expectedError); - assert( - (client.innerApiCalls.listApiSpecs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApiSpecs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiSpecs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiSpecsStream without error', async () => { @@ -4498,8 +4664,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() @@ -4536,11 +4706,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApiSpecs, request) ); - assert.strictEqual( - ( - client.descriptors.page.listApiSpecs.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiSpecs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4553,8 +4724,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApiSpecs.createStream = stubPageStreamingCall( undefined, @@ -4582,11 +4757,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApiSpecs, request) ); - assert.strictEqual( - ( - client.descriptors.page.listApiSpecs.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiSpecs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4599,8 +4775,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() @@ -4626,11 +4806,12 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listApiSpecs.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiSpecs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4643,8 +4824,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApiSpecs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4661,11 +4846,12 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listApiSpecs.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiSpecs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4680,15 +4866,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() @@ -4704,11 +4887,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listApiSpecRevisions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApiSpecRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApiSpecRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiSpecRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiSpecRevisions without error using callback', async () => { @@ -4720,15 +4906,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() @@ -4759,11 +4942,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApiSpecRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listApiSpecRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiSpecRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiSpecRevisions with error', async () => { @@ -4775,26 +4961,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listApiSpecRevisions = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listApiSpecRevisions(request), expectedError); - assert( - (client.innerApiCalls.listApiSpecRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApiSpecRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiSpecRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiSpecRevisionsStream without error', async () => { @@ -4806,8 +4992,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() @@ -4844,11 +5034,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApiSpecRevisions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listApiSpecRevisions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiSpecRevisions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4861,8 +5052,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApiSpecRevisions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4888,11 +5083,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApiSpecRevisions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listApiSpecRevisions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiSpecRevisions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4905,8 +5101,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiSpec() @@ -4932,11 +5132,12 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listApiSpecRevisions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiSpecRevisions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4949,8 +5150,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApiSpecRevisions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4967,11 +5172,12 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listApiSpecRevisions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiSpecRevisions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4986,15 +5192,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() @@ -5010,11 +5213,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listApiDeployments(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApiDeployments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApiDeployments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiDeployments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiDeployments without error using callback', async () => { @@ -5026,15 +5232,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() @@ -5067,11 +5270,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApiDeployments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listApiDeployments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiDeployments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiDeployments with error', async () => { @@ -5083,26 +5289,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listApiDeployments = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listApiDeployments(request), expectedError); - assert( - (client.innerApiCalls.listApiDeployments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApiDeployments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiDeployments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiDeploymentsStream without error', async () => { @@ -5114,8 +5320,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() @@ -5153,11 +5363,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApiDeployments, request) ); - assert.strictEqual( - ( - client.descriptors.page.listApiDeployments.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiDeployments.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5170,8 +5381,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApiDeployments.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5198,11 +5413,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApiDeployments, request) ); - assert.strictEqual( - ( - client.descriptors.page.listApiDeployments.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiDeployments.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5215,8 +5431,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() @@ -5243,11 +5463,12 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listApiDeployments.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiDeployments.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5260,8 +5481,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApiDeployments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5279,11 +5504,12 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listApiDeployments.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listApiDeployments.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5298,15 +5524,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() @@ -5322,11 +5545,14 @@ describe('v1.RegistryClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listApiDeploymentRevisions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApiDeploymentRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApiDeploymentRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiDeploymentRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiDeploymentRevisions without error using callback', async () => { @@ -5338,15 +5564,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() @@ -5379,11 +5602,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listApiDeploymentRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listApiDeploymentRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiDeploymentRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiDeploymentRevisions with error', async () => { @@ -5395,15 +5621,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listApiDeploymentRevisions = stubSimpleCall( undefined, @@ -5413,11 +5636,14 @@ describe('v1.RegistryClient', () => { client.listApiDeploymentRevisions(request), expectedError ); - assert( - (client.innerApiCalls.listApiDeploymentRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listApiDeploymentRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listApiDeploymentRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listApiDeploymentRevisionsStream without error', async () => { @@ -5429,8 +5655,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() @@ -5471,12 +5701,15 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApiDeploymentRevisions, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listApiDeploymentRevisions .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 + ) ); }); @@ -5489,8 +5722,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApiDeploymentRevisions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5520,12 +5757,15 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listApiDeploymentRevisions, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listApiDeploymentRevisions .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 + ) ); }); @@ -5538,8 +5778,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ApiDeployment() @@ -5567,12 +5811,15 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listApiDeploymentRevisions .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 + ) ); }); @@ -5585,8 +5832,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listApiDeploymentRevisions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5605,12 +5856,15 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listApiDeploymentRevisions .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 + ) ); }); }); @@ -5625,15 +5879,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListArtifactsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Artifact() @@ -5648,11 +5899,14 @@ describe('v1.RegistryClient', () => { client.innerApiCalls.listArtifacts = stubSimpleCall(expectedResponse); const [response] = await client.listArtifacts(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listArtifacts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listArtifacts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listArtifacts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listArtifacts without error using callback', async () => { @@ -5664,15 +5918,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListArtifactsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Artifact() @@ -5703,11 +5954,14 @@ describe('v1.RegistryClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listArtifacts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listArtifacts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listArtifacts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listArtifacts with error', async () => { @@ -5719,26 +5973,26 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListArtifactsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listArtifacts = stubSimpleCall( undefined, - expectedError - ); - await assert.rejects(client.listArtifacts(request), expectedError); - assert( - (client.innerApiCalls.listArtifacts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) + expectedError ); + await assert.rejects(client.listArtifacts(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listArtifacts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listArtifacts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listArtifactsStream without error', async () => { @@ -5750,8 +6004,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListArtifactsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Artifact() @@ -5788,11 +6046,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listArtifacts, request) ); - assert.strictEqual( - ( - client.descriptors.page.listArtifacts.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listArtifacts.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5805,8 +6064,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListArtifactsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listArtifacts.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5832,11 +6095,12 @@ describe('v1.RegistryClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listArtifacts, request) ); - assert.strictEqual( - ( - client.descriptors.page.listArtifacts.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listArtifacts.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5849,8 +6113,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListArtifactsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.Artifact() @@ -5876,11 +6144,12 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listArtifacts.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listArtifacts.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5893,8 +6162,12 @@ describe('v1.RegistryClient', () => { const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.apigeeregistry.v1.ListArtifactsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listArtifacts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5911,11 +6184,12 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listArtifacts.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listArtifacts.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -6390,12 +6664,15 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.locationsClient.descriptors.page.listLocations .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 + ) ); }); it('uses async iteration with listLocations with error', async () => { @@ -6426,317 +6703,15 @@ describe('v1.RegistryClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.locationsClient.descriptors.page.listLocations .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new registryModule.v1.RegistryClient({ - 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 registryModule.v1.RegistryClient({ - 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 registryModule.v1.RegistryClient({ - 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 registryModule.v1.RegistryClient({ - 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 registryModule.v1.RegistryClient({ - 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 registryModule.v1.RegistryClient({ - 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 registryModule.v1.RegistryClient({ - 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 registryModule.v1.RegistryClient({ - 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 registryModule.v1.RegistryClient({ - 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 registryModule.v1.RegistryClient({ - 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 registryModule.v1.RegistryClient({ - 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 + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From d87f81a3f0982a52293fb7fb0689d8c91d9facb2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 15:44:19 +0000 Subject: [PATCH 18/40] chore(main): release 0.2.1 (#17) :robot: I have created a release *beep* *boop* --- ## [0.2.1](https://github.com/googleapis/nodejs-apigee-registry/compare/v0.2.0...v0.2.1) (2022-09-21) ### Bug Fixes * Additional error codes added to service configuration for retry ([#16](https://github.com/googleapis/nodejs-apigee-registry/issues/16)) ([4be826d](https://github.com/googleapis/nodejs-apigee-registry/commit/4be826ddc63cd21391a7c204fc361156c5c0b673)) * Preserve default values in x-goog-request-params header ([#18](https://github.com/googleapis/nodejs-apigee-registry/issues/18)) ([19c2bf9](https://github.com/googleapis/nodejs-apigee-registry/commit/19c2bf9e6bc00d99fd3b07c9c71ca946ece94695)) --- 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-apigeeregistry/CHANGELOG.md | 8 ++++++++ packages/google-cloud-apigeeregistry/package.json | 2 +- .../snippet_metadata.google.cloud.apigeeregistry.v1.json | 2 +- packages/google-cloud-apigeeregistry/samples/package.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/CHANGELOG.md b/packages/google-cloud-apigeeregistry/CHANGELOG.md index 347e84b1f03..083282c244b 100644 --- a/packages/google-cloud-apigeeregistry/CHANGELOG.md +++ b/packages/google-cloud-apigeeregistry/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.2.1](https://github.com/googleapis/nodejs-apigee-registry/compare/v0.2.0...v0.2.1) (2022-09-21) + + +### Bug Fixes + +* Additional error codes added to service configuration for retry ([#16](https://github.com/googleapis/nodejs-apigee-registry/issues/16)) ([4be826d](https://github.com/googleapis/nodejs-apigee-registry/commit/4be826ddc63cd21391a7c204fc361156c5c0b673)) +* Preserve default values in x-goog-request-params header ([#18](https://github.com/googleapis/nodejs-apigee-registry/issues/18)) ([19c2bf9](https://github.com/googleapis/nodejs-apigee-registry/commit/19c2bf9e6bc00d99fd3b07c9c71ca946ece94695)) + ## [0.2.0](https://github.com/googleapis/nodejs-apigee-registry/compare/v0.1.0...v0.2.0) (2022-08-30) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index ebc3b07aef0..e7048b61868 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/apigee-registry", - "version": "0.2.0", + "version": "0.2.1", "description": "apigeeregistry client for Node.js", "repository": "googleapis/nodejs-apigee-registry", "license": "Apache-2.0", diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json index d8d7ae21c78..9c2a700af1c 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeregistry", - "version": "0.2.0", + "version": "0.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeregistry/samples/package.json b/packages/google-cloud-apigeeregistry/samples/package.json index 545bafcb2d9..e6379d87df8 100644 --- a/packages/google-cloud-apigeeregistry/samples/package.json +++ b/packages/google-cloud-apigeeregistry/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/apigee-registry": "^0.2.0" + "@google-cloud/apigee-registry": "^0.2.1" }, "devDependencies": { "c8": "^7.1.0", From afcfac281501717e9607c354dd6bba5700972128 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 3 Nov 2022 23:39:24 -0700 Subject: [PATCH 19/40] fix(deps): use google-gax v3.5.2 (#25) --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index e7048b61868..e79a11ea98f 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^3.3.0" + "google-gax": "^3.5.2" }, "devDependencies": { "@types/mocha": "^9.0.0", From 4589653d5fd961dec050f782076fbd931695d43f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:24:32 +0100 Subject: [PATCH 20/40] chore(deps): update dependency @types/node to v18 (#23) 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 | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`^16.0.0` -> `^18.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/16.18.3/18.11.9) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/compatibility-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/confidence-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### 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, check this box --- 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-apigee-registry). --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index e79a11ea98f..48c1f9993e6 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@types/mocha": "^9.0.0", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", "gts": "^3.1.0", From 1320b0177ead2761c72216ed31b112bfa544cb80 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:54:21 +0100 Subject: [PATCH 21/40] chore(deps): update dependency jsdoc to v4 (#28) 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](https://togithub.com/jsdoc/jsdoc) | [`^3.6.6` -> `^4.0.0`](https://renovatebot.com/diffs/npm/jsdoc/3.6.11/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/compatibility-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/confidence-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
jsdoc/jsdoc ### [`v4.0.0`](https://togithub.com/jsdoc/jsdoc/blob/HEAD/CHANGES.md#​400-November-2022) [Compare Source](https://togithub.com/jsdoc/jsdoc/compare/3.6.11...084218523a7d69fec14a852ce680f374f526af28) - JSDoc releases now use [semantic versioning](https://semver.org/). If JSDoc makes backwards-incompatible changes in the future, the major version will be incremented. - JSDoc no longer uses the [`taffydb`](https://taffydb.com/) package. If your JSDoc template or plugin uses the `taffydb` package, see the [instructions for replacing `taffydb` with `@jsdoc/salty`](https://togithub.com/jsdoc/jsdoc/tree/main/packages/jsdoc-salty#use-salty-in-a-jsdoc-template). - JSDoc now supports Node.js 12.0.0 and later.
--- ### 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, check this box --- 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-apigee-registry). --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 48c1f9993e6..e4511ee4bd7 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -47,7 +47,7 @@ "@types/sinon": "^10.0.0", "c8": "^7.7.2", "gts": "^3.1.0", - "jsdoc": "^3.6.6", + "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", From 0b664b735e4475519dc8691e206623695bcb7fb1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 23:44:35 +0000 Subject: [PATCH 22/40] build: have Kokoro grab service account credentials from secret that will be rotated (#34) * build: have Kokoro grab service account credentials from secret that will be rotated Source-Link: https://togithub.com/googleapis/synthtool/commit/4a0230eb8dc497f36fd3839e6144982131f30a9d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:f59941869d508c6825deeffce180579545fd528f359f549a80a18ec0458d7094 --- .../protos/protos.d.ts | 2 +- .../protos/protos.js | 84 ++++++++++++++++--- 2 files changed, 74 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/protos/protos.d.ts b/packages/google-cloud-apigeeregistry/protos/protos.d.ts index 33e60bf4c81..868a014e66c 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.d.ts +++ b/packages/google-cloud-apigeeregistry/protos/protos.d.ts @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import Long = require("long"); import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-apigeeregistry/protos/protos.js b/packages/google-cloud-apigeeregistry/protos/protos.js index f6406258392..d5fec73fd3e 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.js +++ b/packages/google-cloud-apigeeregistry/protos/protos.js @@ -1481,6 +1481,12 @@ message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -1548,7 +1554,7 @@ if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.apigeeregistry.v1.Instance.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.apigeeregistry.v1.Instance.State[message.state] === undefined ? message.state : $root.google.cloud.apigeeregistry.v1.Instance.State[message.state] : message.state; if (message.stateMessage != null && message.hasOwnProperty("stateMessage")) object.stateMessage = message.stateMessage; if (message.config != null && message.hasOwnProperty("config")) @@ -16793,6 +16799,12 @@ if (object.nameField != null) message.nameField = String(object.nameField); switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; case "HISTORY_UNSPECIFIED": case 0: message.history = 0; @@ -16817,6 +16829,10 @@ for (var i = 0; i < object.style.length; ++i) switch (object.style[i]) { default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } case "STYLE_UNSPECIFIED": case 0: message.style[i] = 0; @@ -16864,7 +16880,7 @@ 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; + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $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")) @@ -16872,7 +16888,7 @@ 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]; + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } return object; }; @@ -19964,6 +19980,12 @@ if (object.number != null) message.number = object.number | 0; switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; case "LABEL_OPTIONAL": case 1: message.label = 1; @@ -19978,6 +20000,12 @@ break; } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_DOUBLE": case 1: message.type = 1; @@ -20104,9 +20132,9 @@ 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; + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $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; + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $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")) @@ -22453,6 +22481,12 @@ if (object.javaStringCheckUtf8 != null) message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; case "SPEED": case 1: message.optimizeFor = 1; @@ -22561,7 +22595,7 @@ 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; + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $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")) @@ -23363,6 +23397,12 @@ return object; var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; case "STRING": case 0: message.ctype = 0; @@ -23379,6 +23419,12 @@ if (object.packed != null) message.packed = Boolean(object.packed); switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; case "JS_NORMAL": case 0: message.jstype = 0; @@ -23417,6 +23463,10 @@ for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) switch (object[".google.api.fieldBehavior"][i]) { default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } case "FIELD_BEHAVIOR_UNSPECIFIED": case 0: message[".google.api.fieldBehavior"][i] = 0; @@ -23487,7 +23537,7 @@ 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; + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $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")) @@ -23495,7 +23545,7 @@ 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; + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $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")) @@ -23508,7 +23558,7 @@ 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]; + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $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); @@ -24885,6 +24935,12 @@ if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; case "IDEMPOTENCY_UNKNOWN": case 0: message.idempotencyLevel = 0; @@ -24954,7 +25010,7 @@ 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; + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $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) @@ -26709,6 +26765,12 @@ if (object.end != null) message.end = object.end | 0; switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; case "NONE": case 0: message.semantic = 0; @@ -26758,7 +26820,7 @@ 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; + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; From d89465bbd6b06cd2b86db4161c8cbf4d341350b3 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 9 Feb 2023 19:50:35 +0000 Subject: [PATCH 23/40] chore(deps): update dependency sinon to v15 (#31) --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index e4511ee4bd7..a94880d0fee 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -54,7 +54,7 @@ "mocha": "^10.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^14.0.0", + "sinon": "^15.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From bd00c70e4ac4528f285ff2a1749dc7bd8034fe7c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 9 Feb 2023 19:58:14 +0000 Subject: [PATCH 24/40] chore(gitignore): only ignore folders in the top level (#33) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 507603203 Source-Link: https://togithub.com/googleapis/googleapis/commit/a4f2de456480c0a4ed9feeeaa1f8ee620bbef23a Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/dcf882154e7c710ecf2a1abc77b35c95f9062371 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGNmODgyMTU0ZTdjNzEwZWNmMmExYWJjNzdiMzVjOTVmOTA2MjM3MSJ9 BEGIN_NESTED_COMMIT chore: update .gitignore to always include protos folder Use gapic-generator-typescript v3.0.0. PiperOrigin-RevId: 507004755 Source-Link: https://togithub.com/googleapis/googleapis/commit/d784f3c1043616fc0646e9ce7afa1b9161cc02de Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/5e64ba8615f65fdedb1fcd6ac792e5ea621027e4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWU2NGJhODYxNWY2NWZkZWRiMWZjZDZhYzc5MmU1ZWE2MjEwMjdlNCJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT chore: update import paths for Go targets to match open source location chore: update go_package in protos to match open source location chore: add explicit release levels to Go gapic targets PiperOrigin-RevId: 506711567 Source-Link: https://togithub.com/googleapis/googleapis/commit/d02e58244db5d01607ec2ad52a47e7edce8612f0 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/7f1c54153125eb5abd60a32de58cfda6a798a70a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2YxYzU0MTUzMTI1ZWI1YWJkNjBhMzJkZTU4Y2ZkYTZhNzk4YTcwYSJ9 END_NESTED_COMMITBEGIN_NESTED_COMMITfeat: Added SuggestConversationSummary RPC docs: updated go library package PiperOrigin-RevId: 501862436 Source-Link: https://togithub.com/googleapis/googleapis/commit/155e0f4123ba003055587768944a47498c48926b Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/3051f617a991c274c88d27064e803095e4ef9d39 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzA1MWY2MTdhOTkxYzI3NGM4OGQyNzA2NGU4MDMwOTVlNGVmOWQzOSJ9 END_NESTED_COMMITBEGIN_NESTED_COMMITchore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java) PiperOrigin-RevId: 493113566 Source-Link: https://togithub.com/googleapis/googleapis/commit/758f0d1217d9c7fe398aa5efb1057ce4b6409e55 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/78bd8f05e1276363eb14eae70e91fe4bc20703ab Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9 END_NESTED_COMMIT --- packages/google-cloud-apigeeregistry/.gitignore | 12 ++++++------ packages/google-cloud-apigeeregistry/.jsdoc.js | 4 ++-- .../apigeeregistry/v1/provisioning_service.proto | 2 +- .../cloud/apigeeregistry/v1/registry_models.proto | 2 +- .../cloud/apigeeregistry/v1/registry_service.proto | 2 +- .../google-cloud-apigeeregistry/protos/protos.d.ts | 2 +- .../google-cloud-apigeeregistry/protos/protos.js | 2 +- .../google-cloud-apigeeregistry/protos/protos.json | 2 +- .../generated/v1/provisioning.create_instance.js | 2 +- .../generated/v1/provisioning.delete_instance.js | 2 +- .../generated/v1/provisioning.get_instance.js | 2 +- .../samples/generated/v1/registry.create_api.js | 2 +- .../generated/v1/registry.create_api_deployment.js | 2 +- .../samples/generated/v1/registry.create_api_spec.js | 2 +- .../generated/v1/registry.create_api_version.js | 2 +- .../samples/generated/v1/registry.create_artifact.js | 2 +- .../samples/generated/v1/registry.delete_api.js | 2 +- .../generated/v1/registry.delete_api_deployment.js | 2 +- .../v1/registry.delete_api_deployment_revision.js | 2 +- .../samples/generated/v1/registry.delete_api_spec.js | 2 +- .../v1/registry.delete_api_spec_revision.js | 2 +- .../generated/v1/registry.delete_api_version.js | 2 +- .../samples/generated/v1/registry.delete_artifact.js | 2 +- .../samples/generated/v1/registry.get_api.js | 2 +- .../generated/v1/registry.get_api_deployment.js | 2 +- .../samples/generated/v1/registry.get_api_spec.js | 2 +- .../generated/v1/registry.get_api_spec_contents.js | 2 +- .../samples/generated/v1/registry.get_api_version.js | 2 +- .../samples/generated/v1/registry.get_artifact.js | 2 +- .../generated/v1/registry.get_artifact_contents.js | 2 +- .../v1/registry.list_api_deployment_revisions.js | 2 +- .../generated/v1/registry.list_api_deployments.js | 2 +- .../generated/v1/registry.list_api_spec_revisions.js | 2 +- .../samples/generated/v1/registry.list_api_specs.js | 2 +- .../generated/v1/registry.list_api_versions.js | 2 +- .../samples/generated/v1/registry.list_apis.js | 2 +- .../samples/generated/v1/registry.list_artifacts.js | 2 +- .../generated/v1/registry.replace_artifact.js | 2 +- .../generated/v1/registry.rollback_api_deployment.js | 2 +- .../generated/v1/registry.rollback_api_spec.js | 2 +- .../v1/registry.tag_api_deployment_revision.js | 2 +- .../generated/v1/registry.tag_api_spec_revision.js | 2 +- .../samples/generated/v1/registry.update_api.js | 2 +- .../generated/v1/registry.update_api_deployment.js | 2 +- .../samples/generated/v1/registry.update_api_spec.js | 2 +- .../generated/v1/registry.update_api_version.js | 2 +- packages/google-cloud-apigeeregistry/src/v1/index.ts | 2 +- .../src/v1/provisioning_client.ts | 5 ++++- .../src/v1/registry_client.ts | 5 ++++- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../system-test/install.ts | 2 +- .../test/gapic_provisioning_v1.ts | 2 +- .../test/gapic_registry_v1.ts | 2 +- 54 files changed, 66 insertions(+), 60 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/.gitignore b/packages/google-cloud-apigeeregistry/.gitignore index 5d32b23782f..d4f03a0df2e 100644 --- a/packages/google-cloud-apigeeregistry/.gitignore +++ b/packages/google-cloud-apigeeregistry/.gitignore @@ -1,11 +1,11 @@ **/*.log **/node_modules -.coverage -coverage -.nyc_output -docs/ -out/ -build/ +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ system-test/secrets.js system-test/*key.json *.lock diff --git a/packages/google-cloud-apigeeregistry/.jsdoc.js b/packages/google-cloud-apigeeregistry/.jsdoc.js index 2efe6c2e060..671ff23ae00 100644 --- a/packages/google-cloud-apigeeregistry/.jsdoc.js +++ b/packages/google-cloud-apigeeregistry/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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 2022 Google LLC', + copyright: 'Copyright 2023 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/apigee-registry', diff --git a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto index 9e7baee5866..cca6753c6bc 100644 --- a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto +++ b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/provisioning_service.proto @@ -24,7 +24,7 @@ import "google/longrunning/operations.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; +option go_package = "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb;apigeeregistrypb"; option java_multiple_files = true; option java_outer_classname = "ProvisioningServiceProto"; option java_package = "com.google.cloud.apigeeregistry.v1"; diff --git a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto index 8411f9ecf7f..a1c29b4d5b9 100644 --- a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto +++ b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_models.proto @@ -21,7 +21,7 @@ import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; +option go_package = "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb;apigeeregistrypb"; option java_multiple_files = true; option java_outer_classname = "RegistryModelsProto"; option java_package = "com.google.cloud.apigeeregistry.v1"; diff --git a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto index 1eec64e8b8f..041796be41f 100644 --- a/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto +++ b/packages/google-cloud-apigeeregistry/protos/google/cloud/apigeeregistry/v1/registry_service.proto @@ -26,7 +26,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry"; +option go_package = "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb;apigeeregistrypb"; option java_multiple_files = true; option java_outer_classname = "RegistryServiceProto"; option java_package = "com.google.cloud.apigeeregistry.v1"; diff --git a/packages/google-cloud-apigeeregistry/protos/protos.d.ts b/packages/google-cloud-apigeeregistry/protos/protos.d.ts index 868a014e66c..91b85bbe01d 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.d.ts +++ b/packages/google-cloud-apigeeregistry/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/protos/protos.js b/packages/google-cloud-apigeeregistry/protos/protos.js index d5fec73fd3e..18d5ced6125 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.js +++ b/packages/google-cloud-apigeeregistry/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/protos/protos.json b/packages/google-cloud-apigeeregistry/protos/protos.json index 75e89aa2795..935d02b6b50 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.json +++ b/packages/google-cloud-apigeeregistry/protos/protos.json @@ -9,7 +9,7 @@ "v1": { "options": { "csharp_namespace": "Google.Cloud.ApigeeRegistry.V1", - "go_package": "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry", + "go_package": "cloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb;apigeeregistrypb", "java_multiple_files": true, "java_outer_classname": "RegistryServiceProto", "java_package": "com.google.cloud.apigeeregistry.v1", diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.js index 4f84cd15fd5..b4ca96bdb74 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js index 9e1d2269b9f..74e702d5023 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/provisioning.get_instance.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js index 4a4355c5cb4..9724a92c2d8 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.create_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.js index ebce3b4b148..113640e2ec6 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js index 1d0c276c167..7a4c1c845c6 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.create_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.js index 44c0e0504ea..58b8584700b 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.create_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.js index dd7182a62cd..1a5dc3f12dc 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.create_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.js index 565ba5f32a0..e9052fe1b2e 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.delete_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js index 440f84654e5..917b1dd3399 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js index 47100ad20a7..863cd8ce339 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js index b46ffa35c3e..369deb1856c 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js index bf1dfe8e0db..15fc88e824c 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js index 21fb81322ae..fa2a1e8df18 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.delete_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js index 9c59f0b03df..7c4454a1053 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.delete_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js index d3e2b7c0fd9..99da99af3e5 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.get_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js index 79568c883d7..235120454ad 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js index 2c0d9d10a90..1414dc571b9 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.get_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js index 364e0d10852..e6440349af4 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js index 419e495e98b..d3f17e4d094 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.get_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js index 384f458072c..2a288b39beb 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.get_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js index fd8cf0468b0..67eaf70c3fa 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js index 983ab0fa0b0..ea2d32d2855 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js index 0f9fa672264..21685cd096a 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js index 10a7f19821d..6412a285fb9 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js index 1ee59f01749..c6726ae8423 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.list_api_specs.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js index ed3c4e98ef2..396e72470f5 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.list_api_versions.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js index 01a63148e1f..2b077b508ae 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.list_apis.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js index 9280a5300a3..ea225496745 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.list_artifacts.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js index c5d2c3e251a..ca9a2c07339 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.replace_artifact.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js index af41ce89ac3..91f3904ff6d 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js index 022b8dcbca2..41317e3c670 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js index d8acd2542c1..bc7a521df81 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js index 5c386cc579b..29cb0bd9fb6 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js index 838836c8c5a..e76171edb5f 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.update_api.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js index 8cb7e3d0fe5..a4dd8524d30 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js index 2858dd4dff8..90166532846 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.update_api_spec.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js index 563ac37f695..a3f50379171 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/samples/generated/v1/registry.update_api_version.js b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js index 59fb2f515c0..38b633ed179 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/src/v1/index.ts b/packages/google-cloud-apigeeregistry/src/v1/index.ts index 03a07e1f982..6032a7e3443 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/index.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/src/v1/provisioning_client.ts b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts index ecfe3d3a2cf..62c72eadd28 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -128,6 +128,9 @@ export class ProvisioningClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // 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; diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts index 11b1bd0579c..f4d8b0c84e9 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -126,6 +126,9 @@ export class RegistryClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // 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; diff --git a/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.js b/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.js index 463c19fc6ee..113a4716508 100644 --- a/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.ts index e6e0661b7e9..9a94f4bec58 100644 --- a/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-apigeeregistry/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/system-test/install.ts b/packages/google-cloud-apigeeregistry/system-test/install.ts index 6dd1eaadafa..f61fe236476 100644 --- a/packages/google-cloud-apigeeregistry/system-test/install.ts +++ b/packages/google-cloud-apigeeregistry/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/test/gapic_provisioning_v1.ts b/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts index a87c8a62631..50e41b6b3e9 100644 --- a/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts +++ b/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-apigeeregistry/test/gapic_registry_v1.ts b/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts index 369b42c1075..ab87ec86793 100644 --- a/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts +++ b/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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 2de4cebf52d36b5e7a3a5b4062f6a2c9e5b6cc25 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 9 Feb 2023 21:00:19 +0000 Subject: [PATCH 25/40] chore(deps): update dependency @types/mocha to v10 (#22) 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 | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mocha) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`^9.0.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/9.1.1/10.0.1) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/10.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/10.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/10.0.1/compatibility-slim/9.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/10.0.1/confidence-slim/9.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### 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, check this box --- 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-apigee-registry). --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index a94880d0fee..fc3c621072d 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -42,7 +42,7 @@ "google-gax": "^3.5.2" }, "devDependencies": { - "@types/mocha": "^9.0.0", + "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", From 88c89eb6b21b14d9a1d207bf6cf5d644d1200cc2 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 9 Feb 2023 22:52:12 +0000 Subject: [PATCH 26/40] chore(deps): update dependency webpack-cli to v5 (#30) 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 | |---|---|---|---|---|---| | [webpack-cli](https://togithub.com/webpack/webpack-cli/tree/master/packages/webpack-cli) ([source](https://togithub.com/webpack/webpack-cli)) | [`^4.7.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/webpack-cli/4.10.0/5.0.1) | [![age](https://badges.renovateapi.com/packages/npm/webpack-cli/5.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/webpack-cli/5.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/webpack-cli/5.0.1/compatibility-slim/4.10.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/webpack-cli/5.0.1/confidence-slim/4.10.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
webpack/webpack-cli ### [`v5.0.1`](https://togithub.com/webpack/webpack-cli/blob/HEAD/CHANGELOG.md#​501-httpsgithubcomwebpackwebpack-clicomparewebpack-cli500webpack-cli501-2022-12-05) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/webpack-cli@5.0.0...webpack-cli@5.0.1) ##### Bug Fixes - make `define-process-env-node-env` alias `node-env` ([#​3514](https://togithub.com/webpack/webpack-cli/issues/3514)) ([346a518](https://togithub.com/webpack/webpack-cli/commit/346a518dd7423a726810ef1012031f92d318c9c5)) ### [`v5.0.0`](https://togithub.com/webpack/webpack-cli/blob/HEAD/CHANGELOG.md#​500-httpsgithubcomwebpackwebpack-clicomparewebpack-cli4100webpack-cli500-2022-11-17) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/webpack-cli@4.10.0...webpack-cli@5.0.0) ##### Bug Fixes - improve description of the `--disable-interpret` option ([#​3364](https://togithub.com/webpack/webpack-cli/issues/3364)) ([bdb7e20](https://togithub.com/webpack/webpack-cli/commit/bdb7e20a3fc5a676bf5ba9912c091a2c9b3a1cfd)) - remove the redundant `utils` export ([#​3343](https://togithub.com/webpack/webpack-cli/issues/3343)) ([a9ce5d0](https://togithub.com/webpack/webpack-cli/commit/a9ce5d077f90492558e2d5c14841b3b5b85f1186)) - respect `NODE_PATH` env variable ([#​3411](https://togithub.com/webpack/webpack-cli/issues/3411)) ([83d1f58](https://togithub.com/webpack/webpack-cli/commit/83d1f58fb52d9dcfa3499efb342dfc47d0cca73a)) - show all CLI specific flags in the minimum help output ([#​3354](https://togithub.com/webpack/webpack-cli/issues/3354)) ([35843e8](https://togithub.com/webpack/webpack-cli/commit/35843e87c61fd27be92afce11bd66ebf4f9519ae)) ##### Features - failOnWarnings option ([#​3317](https://togithub.com/webpack/webpack-cli/issues/3317)) ([c48c848](https://togithub.com/webpack/webpack-cli/commit/c48c848c6c84eb73fbd829dc41bee301b0b7e2de)) - update commander to v9 ([#​3460](https://togithub.com/webpack/webpack-cli/issues/3460)) ([6621c02](https://togithub.com/webpack/webpack-cli/commit/6621c023ab59cc510a5f76e262f2c81676d1920b)) - added the `--define-process-env-node-env` option - update `interpret` to v3 and `rechoir` to v0.8 - add an option for preventing interpret ([#​3329](https://togithub.com/webpack/webpack-cli/issues/3329)) ([c737383](https://togithub.com/webpack/webpack-cli/commit/c7373832b96af499ad0813e07d114bdc927afdf4)) ##### BREAKING CHANGES - the minimum supported webpack version is v5.0.0 ([#​3342](https://togithub.com/webpack/webpack-cli/issues/3342)) ([b1af0dc](https://togithub.com/webpack/webpack-cli/commit/b1af0dc7ebcdf746bc37889e4c1f978c65acc4a5)), closes [#​3342](https://togithub.com/webpack/webpack-cli/issues/3342) - webpack-cli no longer supports webpack v4, the minimum supported version is webpack v5.0.0 - webpack-cli no longer supports webpack-dev-server v3, the minimum supported version is webpack-dev-server v4.0.0 - remove the `migrate` command ([#​3291](https://togithub.com/webpack/webpack-cli/issues/3291)) ([56b43e4](https://togithub.com/webpack/webpack-cli/commit/56b43e4baf76c166ade3b282b40ad9d007cc52b6)), closes [#​3291](https://togithub.com/webpack/webpack-cli/issues/3291) - remove the `--prefetch` option in favor the `PrefetchPlugin` plugin - remove the `--node-env` option in favor `--define-process-env-node-env` - remove the `--hot` option in favor of directly using the `HotModuleReplacement` plugin (only for `build` command, for `serve` it will work) - the behavior logic of the `--entry` option has been changed - previously it replaced your entries, now the option adds a specified entry, if you want to return the previous behavior please use ` webpack --entry-reset --entry './src/my-entry.js' `
--- ### 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, check this box --- 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-apigee-registry). --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index fc3c621072d..451b7c53e2f 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -58,7 +58,7 @@ "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", - "webpack-cli": "^4.7.0" + "webpack-cli": "^5.0.0" }, "engines": { "node": ">=v12.0.0" From c9f0f5288d2f966202a5f54262fdbac08e4dce1c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 9 Feb 2023 15:40:52 -0800 Subject: [PATCH 27/40] chore(main): release 0.3.0 (#27) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 0.3.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 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-apigeeregistry/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-apigeeregistry/package.json | 2 +- ...ppet_metadata.google.cloud.apigeeregistry.v1.json | 2 +- .../google-cloud-apigeeregistry/samples/package.json | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/CHANGELOG.md b/packages/google-cloud-apigeeregistry/CHANGELOG.md index 083282c244b..b540348625e 100644 --- a/packages/google-cloud-apigeeregistry/CHANGELOG.md +++ b/packages/google-cloud-apigeeregistry/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [0.3.0](https://github.com/googleapis/nodejs-apigee-registry/compare/v0.2.1...v0.3.0) (2023-02-09) + + +### Features + +* Added SuggestConversationSummary RPC ([8110940](https://github.com/googleapis/nodejs-apigee-registry/commit/8110940e67c72bd94776c17863fa52d714b270ae)) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#25](https://github.com/googleapis/nodejs-apigee-registry/issues/25)) ([1ee9a1d](https://github.com/googleapis/nodejs-apigee-registry/commit/1ee9a1d07a6cd4930c07651a0e17bb41c0663777)) + ## [0.2.1](https://github.com/googleapis/nodejs-apigee-registry/compare/v0.2.0...v0.2.1) (2022-09-21) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 451b7c53e2f..a643fbb88af 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/apigee-registry", - "version": "0.2.1", + "version": "0.3.0", "description": "apigeeregistry client for Node.js", "repository": "googleapis/nodejs-apigee-registry", "license": "Apache-2.0", diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json index 9c2a700af1c..38ec89987ce 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeregistry", - "version": "0.2.1", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeregistry/samples/package.json b/packages/google-cloud-apigeeregistry/samples/package.json index e6379d87df8..d376b45e524 100644 --- a/packages/google-cloud-apigeeregistry/samples/package.json +++ b/packages/google-cloud-apigeeregistry/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/apigee-registry": "^0.2.1" + "@google-cloud/apigee-registry": "^0.3.0" }, "devDependencies": { "c8": "^7.1.0", From f7e76a43080c61d8e750f9c123115f4b6c64dfbd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 21 Feb 2023 21:23:45 -0800 Subject: [PATCH 28/40] docs: changing format of the jsdoc links (#36) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: changing format of the jsdoc links PiperOrigin-RevId: 509352615 Source-Link: https://github.com/googleapis/googleapis/commit/b737d30dae27222d86fa340ecb99292df4585762 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8efadf3d58780ea1c550268d46a3dc701ba37fcf Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGVmYWRmM2Q1ODc4MGVhMWM1NTAyNjhkNDZhM2RjNzAxYmEzN2ZjZiJ9 * 🦉 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/provisioning_client.ts | 58 ++++---- .../src/v1/registry_client.ts | 124 +++++++++--------- 2 files changed, 90 insertions(+), 92 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts index 62c72eadd28..b37c240ad6d 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts @@ -561,7 +561,7 @@ export class ProvisioningClient { * @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 [Instance]{@link google.cloud.apigeeregistry.v1.Instance}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.Instance | Instance}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -938,16 +938,16 @@ export class ProvisioningClient { * 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} + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | 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. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.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 [Policy]{@link google.iam.v1.Policy}. + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | 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 first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. * The promise has a method named "cancel" which cancels the ongoing API call. */ getIamPolicy( @@ -989,13 +989,13 @@ export class ProvisioningClient { * [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. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | 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 first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. */ setIamPolicy( @@ -1037,13 +1037,13 @@ export class ProvisioningClient { * [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. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | 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 first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. * */ @@ -1073,9 +1073,9 @@ export class ProvisioningClient { * @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. + * 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}. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1125,7 +1125,7 @@ export class ProvisioningClient { * @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, + * {@link google.cloud.location.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) @@ -1154,20 +1154,18 @@ export class ProvisioningClient { * @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. + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.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"}. + * {@link google.longrunning.Operation | 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. + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * ``` @@ -1211,11 +1209,11 @@ export class ProvisioningClient { * 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 + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.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. + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. * * @example * ``` @@ -1246,8 +1244,8 @@ export class ProvisioningClient { * @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 + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the * details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. @@ -1289,9 +1287,9 @@ export class ProvisioningClient { * @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. + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.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. diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts index f4d8b0c84e9..886af81d0ff 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts @@ -451,7 +451,7 @@ export class RegistryClient { * @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 [Api]{@link google.cloud.apigeeregistry.v1.Api}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.Api | Api}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -547,7 +547,7 @@ export class RegistryClient { * @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 [Api]{@link google.cloud.apigeeregistry.v1.Api}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.Api | Api}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -649,7 +649,7 @@ export class RegistryClient { * @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 [Api]{@link google.cloud.apigeeregistry.v1.Api}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.Api | Api}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -745,7 +745,7 @@ export class RegistryClient { * @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}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -837,7 +837,7 @@ export class RegistryClient { * @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 [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -939,7 +939,7 @@ export class RegistryClient { * @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 [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1047,7 +1047,7 @@ export class RegistryClient { * @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 [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1149,7 +1149,7 @@ export class RegistryClient { * @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}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1247,7 +1247,7 @@ export class RegistryClient { * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1342,7 +1342,7 @@ export class RegistryClient { * @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}. + * The first element of the array is an object representing {@link google.api.HttpBody | HttpBody}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1450,7 +1450,7 @@ export class RegistryClient { * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1552,7 +1552,7 @@ export class RegistryClient { * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1648,7 +1648,7 @@ export class RegistryClient { * @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}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1742,7 +1742,7 @@ export class RegistryClient { * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1845,7 +1845,7 @@ export class RegistryClient { * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -1940,7 +1940,7 @@ export class RegistryClient { * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2038,7 +2038,7 @@ export class RegistryClient { * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2146,7 +2146,7 @@ export class RegistryClient { * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2254,7 +2254,7 @@ export class RegistryClient { * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2356,7 +2356,7 @@ export class RegistryClient { * @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}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2457,7 +2457,7 @@ export class RegistryClient { * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2564,7 +2564,7 @@ export class RegistryClient { * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2665,7 +2665,7 @@ export class RegistryClient { * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2767,7 +2767,7 @@ export class RegistryClient { * @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 [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.Artifact | Artifact}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2862,7 +2862,7 @@ export class RegistryClient { * @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}. + * The first element of the array is an object representing {@link google.api.HttpBody | HttpBody}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -2970,7 +2970,7 @@ export class RegistryClient { * @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 [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.Artifact | Artifact}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -3064,7 +3064,7 @@ export class RegistryClient { * @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 [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact}. + * The first element of the array is an object representing {@link google.cloud.apigeeregistry.v1.Artifact | Artifact}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -3156,7 +3156,7 @@ export class RegistryClient { * @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}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -3263,7 +3263,7 @@ export class RegistryClient { * @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 [Api]{@link google.cloud.apigeeregistry.v1.Api}. + * The first element of the array is Array of {@link google.cloud.apigeeregistry.v1.Api | Api}. * 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. @@ -3372,7 +3372,7 @@ export class RegistryClient { * @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 [Api]{@link google.cloud.apigeeregistry.v1.Api} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.apigeeregistry.v1.Api | Api} 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 `listApisAsync()` @@ -3431,7 +3431,7 @@ export class RegistryClient { * @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 - * [Api]{@link google.cloud.apigeeregistry.v1.Api}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.apigeeregistry.v1.Api | Api}. 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) @@ -3485,7 +3485,7 @@ export class RegistryClient { * @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 [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion}. + * The first element of the array is Array of {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion}. * 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. @@ -3594,7 +3594,7 @@ export class RegistryClient { * @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 [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion} 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 `listApiVersionsAsync()` @@ -3653,7 +3653,7 @@ export class RegistryClient { * @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 - * [ApiVersion]{@link google.cloud.apigeeregistry.v1.ApiVersion}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion}. 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) @@ -3707,7 +3707,7 @@ export class RegistryClient { * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * The first element of the array is Array of {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. * 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. @@ -3816,7 +3816,7 @@ export class RegistryClient { * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec} 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 `listApiSpecsAsync()` @@ -3875,7 +3875,7 @@ export class RegistryClient { * @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 - * [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. 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) @@ -3920,7 +3920,7 @@ export class RegistryClient { * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. + * The first element of the array is Array of {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. * 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. @@ -4019,7 +4019,7 @@ export class RegistryClient { * @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 [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec} 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 `listApiSpecRevisionsAsync()` @@ -4068,7 +4068,7 @@ export class RegistryClient { * @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 - * [ApiSpec]{@link google.cloud.apigeeregistry.v1.ApiSpec}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. 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) @@ -4122,7 +4122,7 @@ export class RegistryClient { * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * The first element of the array is Array of {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. * 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. @@ -4231,7 +4231,7 @@ export class RegistryClient { * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment} 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 `listApiDeploymentsAsync()` @@ -4290,7 +4290,7 @@ export class RegistryClient { * @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 - * [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. 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) @@ -4335,7 +4335,7 @@ export class RegistryClient { * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. + * The first element of the array is Array of {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. * 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. @@ -4438,7 +4438,7 @@ export class RegistryClient { * @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 [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment} 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 `listApiDeploymentRevisionsAsync()` @@ -4487,7 +4487,7 @@ export class RegistryClient { * @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 - * [ApiDeployment]{@link google.cloud.apigeeregistry.v1.ApiDeployment}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. 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) @@ -4541,7 +4541,7 @@ export class RegistryClient { * @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 [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact}. + * The first element of the array is Array of {@link google.cloud.apigeeregistry.v1.Artifact | Artifact}. * 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. @@ -4650,7 +4650,7 @@ export class RegistryClient { * @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 [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.apigeeregistry.v1.Artifact | Artifact} 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 `listArtifactsAsync()` @@ -4709,7 +4709,7 @@ export class RegistryClient { * @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 - * [Artifact]{@link google.cloud.apigeeregistry.v1.Artifact}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.apigeeregistry.v1.Artifact | Artifact}. 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) @@ -4751,16 +4751,16 @@ export class RegistryClient { * 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} + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | 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. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.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 [Policy]{@link google.iam.v1.Policy}. + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | 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 first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. * The promise has a method named "cancel" which cancels the ongoing API call. */ getIamPolicy( @@ -4802,13 +4802,13 @@ export class RegistryClient { * [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. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | 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 first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. */ setIamPolicy( @@ -4850,13 +4850,13 @@ export class RegistryClient { * [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. + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | 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 first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. * */ @@ -4886,9 +4886,9 @@ export class RegistryClient { * @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. + * 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}. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. @@ -4938,7 +4938,7 @@ export class RegistryClient { * @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, + * {@link google.cloud.location.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) From dd0b0ee14e4a8bbcb1e40f659a1b3f55472be5b9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 23:59:36 -0700 Subject: [PATCH 29/40] build: update Node.js version and base Debian version (#49) * build: update Node.js version and base Debian version * build: update Node.js version and base Debian version * test: update Python and Node versions in container test YAMLs Source-Link: https://github.com/googleapis/synthtool/commit/f54a720df6ece8ead2bf2a888df1194d7a339fb6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:aeccbef8061fc122542e8f381c4e7b66b32e23dda522e94c68346585dc408f0d * update gts --------- Co-authored-by: Owl Bot Co-authored-by: Sofia Leon --- .../google-cloud-apigeeregistry/package.json | 2 +- .../protos/protos.d.ts | 1645 ++++++- .../protos/protos.js | 4351 ++++++++++++++++- .../protos/protos.json | 312 +- .../src/v1/provisioning_client.ts | 12 +- .../src/v1/registry_client.ts | 140 +- 6 files changed, 6050 insertions(+), 412 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index a643fbb88af..b1f0ff6961e 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -46,7 +46,7 @@ "@types/node": "^18.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", - "gts": "^3.1.0", + "gts": "^5.0.0", "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", diff --git a/packages/google-cloud-apigeeregistry/protos/protos.d.ts b/packages/google-cloud-apigeeregistry/protos/protos.d.ts index 91b85bbe01d..8a72b619b04 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.d.ts +++ b/packages/google-cloud-apigeeregistry/protos/protos.d.ts @@ -7077,6 +7077,1448 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not 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.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload 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.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not 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.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload 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.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not 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.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload 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.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not 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.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload 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.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not 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.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload 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.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not 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.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload 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.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not 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.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload 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.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not 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.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload 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.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not 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.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload 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.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not 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.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload 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.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not 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.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload 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.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not 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.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload 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.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not 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.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload 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.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + /** FieldBehavior enum. */ enum FieldBehavior { FIELD_BEHAVIOR_UNSPECIFIED = 0, @@ -9292,6 +10734,9 @@ export namespace google { /** MessageOptions mapEntry */ mapEntry?: (boolean|null); + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** MessageOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -9320,6 +10765,9 @@ export namespace google { /** MessageOptions mapEntry. */ public mapEntry: boolean; + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + /** MessageOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -9425,6 +10873,15 @@ export namespace google { /** FieldOptions weak */ weak?: (boolean|null); + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions target */ + target?: (google.protobuf.FieldOptions.OptionTargetType|keyof typeof google.protobuf.FieldOptions.OptionTargetType|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -9465,6 +10922,15 @@ export namespace google { /** FieldOptions weak. */ public weak: boolean; + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions target. */ + public target: (google.protobuf.FieldOptions.OptionTargetType|keyof typeof google.protobuf.FieldOptions.OptionTargetType); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -9561,6 +11027,27 @@ export namespace google { JS_STRING = 1, JS_NUMBER = 2 } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } } /** Properties of an OneofOptions. */ @@ -9669,6 +11156,9 @@ export namespace google { /** EnumOptions deprecated */ deprecated?: (boolean|null); + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** EnumOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -9688,6 +11178,9 @@ export namespace google { /** EnumOptions deprecated. */ public deprecated: boolean; + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + /** EnumOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -10800,206 +12293,206 @@ export namespace google { } } - /** Properties of an Any. */ - interface IAny { + /** Properties of a Duration. */ + interface IDuration { - /** Any type_url */ - type_url?: (string|null); + /** Duration seconds */ + seconds?: (number|Long|string|null); - /** Any value */ - value?: (Uint8Array|string|null); + /** Duration nanos */ + nanos?: (number|null); } - /** Represents an Any. */ - class Any implements IAny { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new Any. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IAny); + constructor(properties?: google.protobuf.IDuration); - /** Any type_url. */ - public type_url: string; + /** Duration seconds. */ + public seconds: (number|Long|string); - /** Any value. */ - public value: (Uint8Array|string); + /** Duration nanos. */ + public nanos: number; /** - * Creates a new Any instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns Any instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, 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 + * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Any message from the specified reader or buffer. + * 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 Any + * @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.Any; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Any + * @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.Any; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies an Any message. + * 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 an Any message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Any + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any + * 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.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Any to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for 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 Duration. */ - interface IDuration { + /** Properties of an Any. */ + interface IAny { - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** Any type_url */ + type_url?: (string|null); - /** Duration nanos */ - nanos?: (number|null); + /** Any value */ + value?: (Uint8Array|string|null); } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new Duration. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); + constructor(properties?: google.protobuf.IAny); - /** Duration seconds. */ - public seconds: (number|Long|string); + /** Any type_url. */ + public type_url: string; - /** Duration nanos. */ - public nanos: number; + /** Any value. */ + public value: (Uint8Array|string); /** - * Creates a new Duration instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns Any instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, 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 + * 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration message from the specified reader or buffer. + * 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 Duration + * @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.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Duration + * @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.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a Duration message. + * 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 a Duration message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Duration + * Gets the default type url for Any * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/packages/google-cloud-apigeeregistry/protos/protos.js b/packages/google-cloud-apigeeregistry/protos/protos.js index 18d5ced6125..c2c9af179f4 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.js +++ b/packages/google-cloud-apigeeregistry/protos/protos.js @@ -16469,6 +16469,3615 @@ return CustomHttpPattern; })(); + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function 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.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.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.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function 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.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.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.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function 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.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function 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.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + 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.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function 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.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function 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.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function 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.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function 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.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function 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.DotnetSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function 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.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function 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.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.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.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function 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.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function 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.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + /** * FieldBehavior enum. * @name google.api.FieldBehavior @@ -22698,6 +26307,7 @@ * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor * @property {boolean|null} [deprecated] MessageOptions deprecated * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource */ @@ -22750,6 +26360,14 @@ */ MessageOptions.prototype.mapEntry = false; + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + /** * MessageOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -22798,6 +26416,8 @@ 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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); 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(); @@ -22853,6 +26473,10 @@ message.mapEntry = reader.bool(); break; } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -22910,6 +26534,9 @@ if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) if (typeof message.mapEntry !== "boolean") return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -22947,6 +26574,8 @@ message.deprecated = Boolean(object.deprecated); if (object.mapEntry != null) message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); @@ -22985,6 +26614,7 @@ object.noStandardDescriptorAccessor = false; object.deprecated = false; object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; object[".google.api.resource"] = null; } if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) @@ -22995,6 +26625,8 @@ object.deprecated = message.deprecated; if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -23047,6 +26679,9 @@ * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {google.protobuf.FieldOptions.OptionTargetType|null} [target] FieldOptions target * @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 @@ -23125,6 +26760,30 @@ */ FieldOptions.prototype.weak = false; + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions target. + * @member {google.protobuf.FieldOptions.OptionTargetType} target + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.target = 0; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -23187,6 +26846,12 @@ 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.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 18, wireType 0 =*/144).int32(message.target); 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(); @@ -23260,6 +26925,18 @@ message.weak = reader.bool(); break; } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 18: { + message.target = reader.int32(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -23349,6 +27026,34 @@ if (message.weak != null && message.hasOwnProperty("weak")) if (typeof message.weak !== "boolean") return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -23438,14 +27143,84 @@ message.jstype = 2; break; } - 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) - message.weak = Boolean(object.weak); + 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) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_TYPE_UNKNOWN": + case 0: + message.target = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.target = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.target = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.target = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.target = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.target = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.target = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.target = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.target = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.target = 9; + break; + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -23534,6 +27309,9 @@ object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.target = options.enums === String ? "TARGET_TYPE_UNKNOWN" : 0; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -23550,6 +27328,12 @@ object.weak = message.weak; if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.target] === undefined ? message.target : $root.google.protobuf.FieldOptions.OptionTargetType[message.target] : message.target; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -23623,6 +27407,52 @@ return values; })(); + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + return FieldOptions; })(); @@ -23858,6 +27688,7 @@ * @interface IEnumOptions * @property {boolean|null} [allowAlias] EnumOptions allowAlias * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ @@ -23893,6 +27724,14 @@ */ EnumOptions.prototype.deprecated = false; + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + /** * EnumOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -23929,6 +27768,8 @@ 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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); 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(); @@ -23974,6 +27815,10 @@ message.deprecated = reader.bool(); break; } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -24021,6 +27866,9 @@ if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -24049,6 +27897,8 @@ message.allowAlias = Boolean(object.allowAlias); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); @@ -24080,11 +27930,14 @@ if (options.defaults) { object.allowAlias = false; object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -26863,249 +30716,13 @@ values[valuesById[0] = "NONE"] = 0; values[valuesById[1] = "SET"] = 1; values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - 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 >= 0) - 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 values; + })(); - /** - * 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 Annotation; + })(); - return Any; + return GeneratedCodeInfo; })(); protobuf.Duration = (function() { @@ -27349,6 +30966,242 @@ return Duration; })(); + 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 >= 0) + 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); + }; + + /** + * 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; + })(); + protobuf.Empty = (function() { /** diff --git a/packages/google-cloud-apigeeregistry/protos/protos.json b/packages/google-cloud-apigeeregistry/protos/protos.json index 935d02b6b50..d8be1933690 100644 --- a/packages/google-cloud-apigeeregistry/protos/protos.json +++ b/packages/google-cloud-apigeeregistry/protos/protos.json @@ -2175,6 +2175,248 @@ "id": 1050, "extend": "google.protobuf.ServiceOptions" }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, "fieldBehavior": { "rule": "repeated", "type": "google.api.FieldBehavior", @@ -2841,6 +3083,13 @@ "type": "bool", "id": 7 }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -2924,6 +3173,21 @@ "default": false } }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "target": { + "type": "OptionTargetType", + "id": 18 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -2956,6 +3220,27 @@ "JS_STRING": 1, "JS_NUMBER": 2 } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } } } }, @@ -2987,6 +3272,13 @@ "default": false } }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -3220,26 +3512,26 @@ } } }, - "Any": { + "Duration": { "fields": { - "type_url": { - "type": "string", + "seconds": { + "type": "int64", "id": 1 }, - "value": { - "type": "bytes", + "nanos": { + "type": "int32", "id": 2 } } }, - "Duration": { + "Any": { "fields": { - "seconds": { - "type": "int64", + "type_url": { + "type": "string", "id": 1 }, - "nanos": { - "type": "int32", + "value": { + "type": "bytes", "id": 2 } } diff --git a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts index b37c240ad6d..203d9f285c7 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts @@ -575,7 +575,7 @@ export class ProvisioningClient { [ protos.google.cloud.apigeeregistry.v1.IInstance, protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest | undefined, - {} | undefined + {} | undefined, ] >; getInstance( @@ -621,7 +621,7 @@ export class ProvisioningClient { [ protos.google.cloud.apigeeregistry.v1.IInstance, protos.google.cloud.apigeeregistry.v1.IGetInstanceRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -677,7 +677,7 @@ export class ProvisioningClient { protos.google.cloud.apigeeregistry.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; createInstance( @@ -730,7 +730,7 @@ export class ProvisioningClient { protos.google.cloud.apigeeregistry.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -816,7 +816,7 @@ export class ProvisioningClient { protos.google.cloud.apigeeregistry.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; deleteInstance( @@ -869,7 +869,7 @@ export class ProvisioningClient { protos.google.cloud.apigeeregistry.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts index 886af81d0ff..7e9535c1ab2 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts @@ -465,7 +465,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApi, protos.google.cloud.apigeeregistry.v1.IGetApiRequest | undefined, - {} | undefined + {} | undefined, ] >; getApi( @@ -505,7 +505,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApi, protos.google.cloud.apigeeregistry.v1.IGetApiRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -561,7 +561,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApi, protos.google.cloud.apigeeregistry.v1.ICreateApiRequest | undefined, - {} | undefined + {} | undefined, ] >; createApi( @@ -607,7 +607,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApi, protos.google.cloud.apigeeregistry.v1.ICreateApiRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -663,7 +663,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApi, protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest | undefined, - {} | undefined + {} | undefined, ] >; updateApi( @@ -709,7 +709,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApi, protos.google.cloud.apigeeregistry.v1.IUpdateApiRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -759,7 +759,7 @@ export class RegistryClient { [ protos.google.protobuf.IEmpty, protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteApi( @@ -805,7 +805,7 @@ export class RegistryClient { [ protos.google.protobuf.IEmpty, protos.google.cloud.apigeeregistry.v1.IDeleteApiRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -851,7 +851,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiVersion, protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest | undefined, - {} | undefined + {} | undefined, ] >; getApiVersion( @@ -897,7 +897,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiVersion, protos.google.cloud.apigeeregistry.v1.IGetApiVersionRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -956,7 +956,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest | undefined ), - {} | undefined + {} | undefined, ] >; createApiVersion( @@ -1005,7 +1005,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.ICreateApiVersionRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1064,7 +1064,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest | undefined ), - {} | undefined + {} | undefined, ] >; updateApiVersion( @@ -1113,7 +1113,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IUpdateApiVersionRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1166,7 +1166,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest | undefined ), - {} | undefined + {} | undefined, ] >; deleteApiVersion( @@ -1215,7 +1215,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IDeleteApiVersionRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1261,7 +1261,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec, protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest | undefined, - {} | undefined + {} | undefined, ] >; getApiSpec( @@ -1307,7 +1307,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec, protos.google.cloud.apigeeregistry.v1.IGetApiSpecRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1359,7 +1359,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest | undefined ), - {} | undefined + {} | undefined, ] >; getApiSpecContents( @@ -1408,7 +1408,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IGetApiSpecContentsRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1464,7 +1464,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec, protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest | undefined, - {} | undefined + {} | undefined, ] >; createApiSpec( @@ -1510,7 +1510,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec, protos.google.cloud.apigeeregistry.v1.ICreateApiSpecRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1566,7 +1566,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec, protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest | undefined, - {} | undefined + {} | undefined, ] >; updateApiSpec( @@ -1612,7 +1612,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec, protos.google.cloud.apigeeregistry.v1.IUpdateApiSpecRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1662,7 +1662,7 @@ export class RegistryClient { [ protos.google.protobuf.IEmpty, protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteApiSpec( @@ -1708,7 +1708,7 @@ export class RegistryClient { [ protos.google.protobuf.IEmpty, protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1759,7 +1759,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest | undefined ), - {} | undefined + {} | undefined, ] >; tagApiSpecRevision( @@ -1808,7 +1808,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.ITagApiSpecRevisionRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1859,7 +1859,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec, protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest | undefined, - {} | undefined + {} | undefined, ] >; rollbackApiSpec( @@ -1905,7 +1905,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec, protos.google.cloud.apigeeregistry.v1.IRollbackApiSpecRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1957,7 +1957,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest | undefined ), - {} | undefined + {} | undefined, ] >; deleteApiSpecRevision( @@ -2006,7 +2006,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IDeleteApiSpecRevisionRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2055,7 +2055,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest | undefined ), - {} | undefined + {} | undefined, ] >; getApiDeployment( @@ -2104,7 +2104,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IGetApiDeploymentRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2163,7 +2163,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest | undefined ), - {} | undefined + {} | undefined, ] >; createApiDeployment( @@ -2212,7 +2212,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.ICreateApiDeploymentRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2271,7 +2271,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest | undefined ), - {} | undefined + {} | undefined, ] >; updateApiDeployment( @@ -2320,7 +2320,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IUpdateApiDeploymentRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2373,7 +2373,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest | undefined ), - {} | undefined + {} | undefined, ] >; deleteApiDeployment( @@ -2422,7 +2422,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2474,7 +2474,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest | undefined ), - {} | undefined + {} | undefined, ] >; tagApiDeploymentRevision( @@ -2523,7 +2523,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.ITagApiDeploymentRevisionRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2581,7 +2581,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest | undefined ), - {} | undefined + {} | undefined, ] >; rollbackApiDeployment( @@ -2630,7 +2630,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IRollbackApiDeploymentRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2682,7 +2682,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest | undefined ), - {} | undefined + {} | undefined, ] >; deleteApiDeploymentRevision( @@ -2731,7 +2731,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IDeleteApiDeploymentRevisionRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2781,7 +2781,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IArtifact, protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest | undefined, - {} | undefined + {} | undefined, ] >; getArtifact( @@ -2827,7 +2827,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IArtifact, protos.google.cloud.apigeeregistry.v1.IGetArtifactRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2879,7 +2879,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest | undefined ), - {} | undefined + {} | undefined, ] >; getArtifactContents( @@ -2928,7 +2928,7 @@ export class RegistryClient { | protos.google.cloud.apigeeregistry.v1.IGetArtifactContentsRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2984,7 +2984,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IArtifact, protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest | undefined, - {} | undefined + {} | undefined, ] >; createArtifact( @@ -3030,7 +3030,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IArtifact, protos.google.cloud.apigeeregistry.v1.ICreateArtifactRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -3078,7 +3078,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IArtifact, protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest | undefined, - {} | undefined + {} | undefined, ] >; replaceArtifact( @@ -3124,7 +3124,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IArtifact, protos.google.cloud.apigeeregistry.v1.IReplaceArtifactRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -3170,7 +3170,7 @@ export class RegistryClient { [ protos.google.protobuf.IEmpty, protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteArtifact( @@ -3216,7 +3216,7 @@ export class RegistryClient { [ protos.google.protobuf.IEmpty, protos.google.cloud.apigeeregistry.v1.IDeleteArtifactRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -3280,7 +3280,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApi[], protos.google.cloud.apigeeregistry.v1.IListApisRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApisResponse + protos.google.cloud.apigeeregistry.v1.IListApisResponse, ] >; listApis( @@ -3326,7 +3326,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApi[], protos.google.cloud.apigeeregistry.v1.IListApisRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApisResponse + protos.google.cloud.apigeeregistry.v1.IListApisResponse, ] > | void { request = request || {}; @@ -3502,7 +3502,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiVersion[], protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApiVersionsResponse + protos.google.cloud.apigeeregistry.v1.IListApiVersionsResponse, ] >; listApiVersions( @@ -3548,7 +3548,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiVersion[], protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApiVersionsResponse + protos.google.cloud.apigeeregistry.v1.IListApiVersionsResponse, ] > | void { request = request || {}; @@ -3724,7 +3724,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec[], protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApiSpecsResponse + protos.google.cloud.apigeeregistry.v1.IListApiSpecsResponse, ] >; listApiSpecs( @@ -3770,7 +3770,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec[], protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApiSpecsResponse + protos.google.cloud.apigeeregistry.v1.IListApiSpecsResponse, ] > | void { request = request || {}; @@ -3937,7 +3937,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec[], protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse + protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse, ] >; listApiSpecRevisions( @@ -3983,7 +3983,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiSpec[], protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse + protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsResponse, ] > | void { request = request || {}; @@ -4139,7 +4139,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiDeployment[], protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse, ] >; listApiDeployments( @@ -4185,7 +4185,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiDeployment[], protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsResponse, ] > | void { request = request || {}; @@ -4352,7 +4352,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiDeployment[], protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse, ] >; listApiDeploymentRevisions( @@ -4398,7 +4398,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IApiDeployment[], protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse + protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsResponse, ] > | void { request = request || {}; @@ -4558,7 +4558,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IArtifact[], protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListArtifactsResponse + protos.google.cloud.apigeeregistry.v1.IListArtifactsResponse, ] >; listArtifacts( @@ -4604,7 +4604,7 @@ export class RegistryClient { [ protos.google.cloud.apigeeregistry.v1.IArtifact[], protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest | null, - protos.google.cloud.apigeeregistry.v1.IListArtifactsResponse + protos.google.cloud.apigeeregistry.v1.IListArtifactsResponse, ] > | void { request = request || {}; From fdcff5151b08a74e6ca4e2eaf551d14a2af364ef Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 12:51:56 -0700 Subject: [PATCH 30/40] test: disable retry-request for streaming tests (#46) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: fix typings for IAM methods docs: fixed links in the generated Markdown documentation PiperOrigin-RevId: 551610576 Source-Link: https://github.com/googleapis/googleapis/commit/73b1313cbd1fd0cc1e22684bc89ee1b1a416cfe0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8bec066492a6da2855b1b8ce562664c0a6b30b01 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGJlYzA2NjQ5MmE2ZGEyODU1YjFiOGNlNTYyNjY0YzBhNmIzMGIwMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: disable retry-request for streaming tests PiperOrigin-RevId: 554648220 Source-Link: https://github.com/googleapis/googleapis/commit/53cd9ad1b48e40cdd44e0c13e96ac0281b32828f Source-Link: https://github.com/googleapis/googleapis-gen/commit/7e8867efbed7dbfe5ef6ec3c2c92a4bce4280f7a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2U4ODY3ZWZiZWQ3ZGJmZTVlZjZlYzNjMmM5MmE0YmNlNDI4MGY3YSJ9 * 🦉 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: sofisl <55454395+sofisl@users.noreply.github.com> --- ...tadata_google.cloud.apigeeregistry.v1.json | 1723 +++++++++++++++++ .../src/v1/provisioning_client.ts | 37 +- .../src/v1/registry_client.ts | 293 ++- 3 files changed, 1857 insertions(+), 196 deletions(-) create mode 100644 packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json new file mode 100644 index 00000000000..38ec89987ce --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json @@ -0,0 +1,1723 @@ +{ + "clientLibrary": { + "name": "nodejs-apigeeregistry", + "version": "0.3.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.apigeeregistry.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "apigeeregistry_v1_generated_Provisioning_CreateInstance_async", + "title": "Provisioning createInstance Sample", + "origin": "API_DEFINITION", + "description": " Provisions instance resources for the Registry.", + "canonical": true, + "file": "provisioning.create_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.CreateInstance", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "instance_id", + "type": "TYPE_STRING" + }, + { + "name": "instance", + "type": ".google.cloud.apigeeregistry.v1.Instance" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ProvisioningClient", + "fullName": "google.cloud.apigeeregistry.v1.ProvisioningClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.CreateInstance", + "service": { + "shortName": "Provisioning", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Provisioning_DeleteInstance_async", + "title": "Provisioning deleteInstance Sample", + "origin": "API_DEFINITION", + "description": " Deletes the Registry instance.", + "canonical": true, + "file": "provisioning.delete_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.DeleteInstance", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ProvisioningClient", + "fullName": "google.cloud.apigeeregistry.v1.ProvisioningClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.DeleteInstance", + "service": { + "shortName": "Provisioning", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Provisioning_GetInstance_async", + "title": "Provisioning getInstance Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Instance.", + "canonical": true, + "file": "provisioning.get_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.GetInstance", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Instance", + "client": { + "shortName": "ProvisioningClient", + "fullName": "google.cloud.apigeeregistry.v1.ProvisioningClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning.GetInstance", + "service": { + "shortName": "Provisioning", + "fullName": "google.cloud.apigeeregistry.v1.Provisioning" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApis_async", + "title": "Provisioning listApis Sample", + "origin": "API_DEFINITION", + "description": " Returns matching APIs.", + "canonical": true, + "file": "registry.list_apis.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApis", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApis", + "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.apigeeregistry.v1.ListApisResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApis", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApis", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetApi_async", + "title": "Provisioning getApi Sample", + "origin": "API_DEFINITION", + "description": " Returns a specified API.", + "canonical": true, + "file": "registry.get_api.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApi", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Api", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApi", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApi_async", + "title": "Provisioning createApi Sample", + "origin": "API_DEFINITION", + "description": " Creates a specified API.", + "canonical": true, + "file": "registry.create_api.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApi", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "api", + "type": ".google.cloud.apigeeregistry.v1.Api" + }, + { + "name": "api_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Api", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "CreateApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApi", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApi_async", + "title": "Provisioning updateApi Sample", + "origin": "API_DEFINITION", + "description": " Used to modify a specified API.", + "canonical": true, + "file": "registry.update_api.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApi", + "async": true, + "parameters": [ + { + "name": "api", + "type": ".google.cloud.apigeeregistry.v1.Api" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Api", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "UpdateApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApi", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApi_async", + "title": "Provisioning deleteApi Sample", + "origin": "API_DEFINITION", + "description": " Removes a specified API and all of the resources that it owns.", + "canonical": true, + "file": "registry.delete_api.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApi", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApi", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApi", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiVersions_async", + "title": "Provisioning listApiVersions Sample", + "origin": "API_DEFINITION", + "description": " Returns matching versions.", + "canonical": true, + "file": "registry.list_api_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApiVersions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiVersions", + "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.apigeeregistry.v1.ListApiVersionsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApiVersions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiVersions", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiVersion_async", + "title": "Provisioning getApiVersion Sample", + "origin": "API_DEFINITION", + "description": " Returns a specified version.", + "canonical": true, + "file": "registry.get_api_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiVersion", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiVersion", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiVersion_async", + "title": "Provisioning createApiVersion Sample", + "origin": "API_DEFINITION", + "description": " Creates a specified version.", + "canonical": true, + "file": "registry.create_api_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiVersion", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "api_version", + "type": ".google.cloud.apigeeregistry.v1.ApiVersion" + }, + { + "name": "api_version_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiVersion", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "CreateApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiVersion", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiVersion_async", + "title": "Provisioning updateApiVersion Sample", + "origin": "API_DEFINITION", + "description": " Used to modify a specified version.", + "canonical": true, + "file": "registry.update_api_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiVersion", + "async": true, + "parameters": [ + { + "name": "api_version", + "type": ".google.cloud.apigeeregistry.v1.ApiVersion" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiVersion", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "UpdateApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiVersion", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiVersion_async", + "title": "Provisioning deleteApiVersion Sample", + "origin": "API_DEFINITION", + "description": " Removes a specified version and all of the resources that it owns.", + "canonical": true, + "file": "registry.delete_api_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApiVersion", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiVersion", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiSpecs_async", + "title": "Provisioning listApiSpecs Sample", + "origin": "API_DEFINITION", + "description": " Returns matching specs.", + "canonical": true, + "file": "registry.list_api_specs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApiSpecs", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecs", + "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.apigeeregistry.v1.ListApiSpecsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApiSpecs", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecs", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiSpec_async", + "title": "Provisioning getApiSpec Sample", + "origin": "API_DEFINITION", + "description": " Returns a specified spec.", + "canonical": true, + "file": "registry.get_api_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpec", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpec", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiSpecContents_async", + "title": "Provisioning getApiSpecContents Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a specified spec. If specs are stored with GZip compression, the default behavior is to return the spec uncompressed (the mime_type response field indicates the exact format returned).", + "canonical": true, + "file": "registry.get_api_spec_contents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetApiSpecContents", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpecContents", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetApiSpecContents", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiSpecContents", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiSpec_async", + "title": "Provisioning createApiSpec Sample", + "origin": "API_DEFINITION", + "description": " Creates a specified spec.", + "canonical": true, + "file": "registry.create_api_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiSpec", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "api_spec", + "type": ".google.cloud.apigeeregistry.v1.ApiSpec" + }, + { + "name": "api_spec_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "CreateApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiSpec", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiSpec_async", + "title": "Provisioning updateApiSpec Sample", + "origin": "API_DEFINITION", + "description": " Used to modify a specified spec.", + "canonical": true, + "file": "registry.update_api_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiSpec", + "async": true, + "parameters": [ + { + "name": "api_spec", + "type": ".google.cloud.apigeeregistry.v1.ApiSpec" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "UpdateApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiSpec", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiSpec_async", + "title": "Provisioning deleteApiSpec Sample", + "origin": "API_DEFINITION", + "description": " Removes a specified spec, all revisions, and all child resources (e.g., artifacts).", + "canonical": true, + "file": "registry.delete_api_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpec", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpec", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_TagApiSpecRevision_async", + "title": "Provisioning tagApiSpecRevision Sample", + "origin": "API_DEFINITION", + "description": " Adds a tag to a specified revision of a spec.", + "canonical": true, + "file": "registry.tag_api_spec_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TagApiSpecRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiSpecRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "tag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "TagApiSpecRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiSpecRevision", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_async", + "title": "Provisioning listApiSpecRevisions Sample", + "origin": "API_DEFINITION", + "description": " Lists all revisions of a spec. Revisions are returned in descending order of revision creation time.", + "canonical": true, + "file": "registry.list_api_spec_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApiSpecRevisions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecRevisions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApiSpecRevisions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecRevisions", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_RollbackApiSpec_async", + "title": "Provisioning rollbackApiSpec Sample", + "origin": "API_DEFINITION", + "description": " Sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.", + "canonical": true, + "file": "registry.rollback_api_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RollbackApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiSpec", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "revision_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "RollbackApiSpec", + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiSpec", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_async", + "title": "Provisioning deleteApiSpecRevision Sample", + "origin": "API_DEFINITION", + "description": " Deletes a revision of a spec.", + "canonical": true, + "file": "registry.delete_api_spec_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApiSpecRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiSpec", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApiSpecRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecRevision", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiDeployments_async", + "title": "Provisioning listApiDeployments Sample", + "origin": "API_DEFINITION", + "description": " Returns matching deployments.", + "canonical": true, + "file": "registry.list_api_deployments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApiDeployments", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeployments", + "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.apigeeregistry.v1.ListApiDeploymentsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApiDeployments", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeployments", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetApiDeployment_async", + "title": "Provisioning getApiDeployment Sample", + "origin": "API_DEFINITION", + "description": " Returns a specified deployment.", + "canonical": true, + "file": "registry.get_api_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetApiDeployment", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_CreateApiDeployment_async", + "title": "Provisioning createApiDeployment Sample", + "origin": "API_DEFINITION", + "description": " Creates a specified deployment.", + "canonical": true, + "file": "registry.create_api_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiDeployment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "api_deployment", + "type": ".google.cloud.apigeeregistry.v1.ApiDeployment" + }, + { + "name": "api_deployment_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "CreateApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateApiDeployment", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_UpdateApiDeployment_async", + "title": "Provisioning updateApiDeployment Sample", + "origin": "API_DEFINITION", + "description": " Used to modify a specified deployment.", + "canonical": true, + "file": "registry.update_api_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiDeployment", + "async": true, + "parameters": [ + { + "name": "api_deployment", + "type": ".google.cloud.apigeeregistry.v1.ApiDeployment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "UpdateApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.UpdateApiDeployment", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiDeployment_async", + "title": "Provisioning deleteApiDeployment Sample", + "origin": "API_DEFINITION", + "description": " Removes a specified deployment, all revisions, and all child resources (e.g., artifacts).", + "canonical": true, + "file": "registry.delete_api_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeployment", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_async", + "title": "Provisioning tagApiDeploymentRevision Sample", + "origin": "API_DEFINITION", + "description": " Adds a tag to a specified revision of a deployment.", + "canonical": true, + "file": "registry.tag_api_deployment_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TagApiDeploymentRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiDeploymentRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "tag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "TagApiDeploymentRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.TagApiDeploymentRevision", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_async", + "title": "Provisioning listApiDeploymentRevisions Sample", + "origin": "API_DEFINITION", + "description": " Lists all revisions of a deployment. Revisions are returned in descending order of revision creation time.", + "canonical": true, + "file": "registry.list_api_deployment_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListApiDeploymentRevisions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentRevisions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListApiDeploymentRevisions", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentRevisions", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_RollbackApiDeployment_async", + "title": "Provisioning rollbackApiDeployment Sample", + "origin": "API_DEFINITION", + "description": " Sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.", + "canonical": true, + "file": "registry.rollback_api_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RollbackApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "revision_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "RollbackApiDeployment", + "fullName": "google.cloud.apigeeregistry.v1.Registry.RollbackApiDeployment", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_async", + "title": "Provisioning deleteApiDeploymentRevision Sample", + "origin": "API_DEFINITION", + "description": " Deletes a revision of a deployment.", + "canonical": true, + "file": "registry.delete_api_deployment_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteApiDeploymentRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.ApiDeployment", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteApiDeploymentRevision", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentRevision", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ListArtifacts_async", + "title": "Provisioning listArtifacts Sample", + "origin": "API_DEFINITION", + "description": " Returns matching artifacts.", + "canonical": true, + "file": "registry.list_artifacts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListArtifacts", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListArtifacts", + "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.apigeeregistry.v1.ListArtifactsResponse", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ListArtifacts", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ListArtifacts", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetArtifact_async", + "title": "Provisioning getArtifact Sample", + "origin": "API_DEFINITION", + "description": " Returns a specified artifact.", + "canonical": true, + "file": "registry.get_artifact.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifact", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Artifact", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifact", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_GetArtifactContents_async", + "title": "Provisioning getArtifactContents Sample", + "origin": "API_DEFINITION", + "description": " Returns the contents of a specified artifact. If artifacts are stored with GZip compression, the default behavior is to return the artifact uncompressed (the mime_type response field indicates the exact format returned).", + "canonical": true, + "file": "registry.get_artifact_contents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetArtifactContents", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifactContents", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "GetArtifactContents", + "fullName": "google.cloud.apigeeregistry.v1.Registry.GetArtifactContents", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_CreateArtifact_async", + "title": "Provisioning createArtifact Sample", + "origin": "API_DEFINITION", + "description": " Creates a specified artifact.", + "canonical": true, + "file": "registry.create_artifact.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateArtifact", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "artifact", + "type": ".google.cloud.apigeeregistry.v1.Artifact" + }, + { + "name": "artifact_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Artifact", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "CreateArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.CreateArtifact", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_ReplaceArtifact_async", + "title": "Provisioning replaceArtifact Sample", + "origin": "API_DEFINITION", + "description": " Used to replace a specified artifact.", + "canonical": true, + "file": "registry.replace_artifact.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReplaceArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ReplaceArtifact", + "async": true, + "parameters": [ + { + "name": "artifact", + "type": ".google.cloud.apigeeregistry.v1.Artifact" + } + ], + "resultType": ".google.cloud.apigeeregistry.v1.Artifact", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "ReplaceArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.ReplaceArtifact", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + }, + { + "regionTag": "apigeeregistry_v1_generated_Registry_DeleteArtifact_async", + "title": "Provisioning deleteArtifact Sample", + "origin": "API_DEFINITION", + "description": " Removes a specified artifact.", + "canonical": true, + "file": "registry.delete_artifact.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteArtifact", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "RegistryClient", + "fullName": "google.cloud.apigeeregistry.v1.RegistryClient" + }, + "method": { + "shortName": "DeleteArtifact", + "fullName": "google.cloud.apigeeregistry.v1.Registry.DeleteArtifact", + "service": { + "shortName": "Registry", + "fullName": "google.cloud.apigeeregistry.v1.Registry" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts index 203d9f285c7..7fd22c4dc95 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts @@ -561,9 +561,8 @@ export class ProvisioningClient { * @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 {@link google.cloud.apigeeregistry.v1.Instance | Instance}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.Instance|Instance}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/provisioning.get_instance.js * region_tag:apigeeregistry_v1_generated_Provisioning_GetInstance_async @@ -661,8 +660,7 @@ export class ProvisioningClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/provisioning.create_instance.js * region_tag:apigeeregistry_v1_generated_Provisioning_CreateInstance_async @@ -757,8 +755,7 @@ export class ProvisioningClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/provisioning.create_instance.js * region_tag:apigeeregistry_v1_generated_Provisioning_CreateInstance_async @@ -800,8 +797,7 @@ export class ProvisioningClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/provisioning.delete_instance.js * region_tag:apigeeregistry_v1_generated_Provisioning_DeleteInstance_async @@ -896,8 +892,7 @@ export class ProvisioningClient { * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/provisioning.delete_instance.js * region_tag:apigeeregistry_v1_generated_Provisioning_DeleteInstance_async @@ -964,7 +959,7 @@ export class ProvisioningClient { IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined > - ): Promise { + ): Promise<[IamProtos.google.iam.v1.Policy]> { return this.iamClient.getIamPolicy(request, options, callback); } @@ -985,8 +980,7 @@ export class ProvisioningClient { * @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). + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. @@ -1012,7 +1006,7 @@ export class ProvisioningClient { IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined > - ): Promise { + ): Promise<[IamProtos.google.iam.v1.Policy]> { return this.iamClient.setIamPolicy(request, options, callback); } @@ -1033,8 +1027,7 @@ export class ProvisioningClient { * @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). + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. @@ -1061,7 +1054,7 @@ export class ProvisioningClient { IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined > - ): Promise { + ): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { return this.iamClient.testIamPermissions(request, options, callback); } @@ -1076,8 +1069,7 @@ export class ProvisioningClient { * 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 {@link google.cloud.location.Location | Location}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example * ``` @@ -1123,12 +1115,11 @@ export class ProvisioningClient { * @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). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing * {@link google.cloud.location.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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example * ``` diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts index 7e9535c1ab2..ff869c6bae1 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts @@ -451,9 +451,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.Api | Api}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.Api|Api}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.get_api.js * region_tag:apigeeregistry_v1_generated_Registry_GetApi_async @@ -541,15 +540,14 @@ export class RegistryClient { * the API's resource name. * * This value should be 4-63 characters, and valid characters - * are /{@link 0-9|a-z}-/. + * are /{@link protos.0-9|a-z}-/. * * Following AIP-162, IDs must not have the form of a UUID. * @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 {@link google.cloud.apigeeregistry.v1.Api | Api}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.Api|Api}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.create_api.js * region_tag:apigeeregistry_v1_generated_Registry_CreateApi_async @@ -649,9 +647,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.Api | Api}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.Api|Api}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.update_api.js * region_tag:apigeeregistry_v1_generated_Registry_UpdateApi_async @@ -745,9 +742,8 @@ export class RegistryClient { * @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 {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.delete_api.js * region_tag:apigeeregistry_v1_generated_Registry_DeleteApi_async @@ -837,9 +833,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiVersion|ApiVersion}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.get_api_version.js * region_tag:apigeeregistry_v1_generated_Registry_GetApiVersion_async @@ -933,15 +928,14 @@ export class RegistryClient { * the version's resource name. * * This value should be 1-63 characters, and valid characters - * are /{@link 0-9|a-z}-/. + * are /{@link protos.0-9|a-z}-/. * * Following AIP-162, IDs must not have the form of a UUID. * @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 {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiVersion|ApiVersion}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.create_api_version.js * region_tag:apigeeregistry_v1_generated_Registry_CreateApiVersion_async @@ -1047,9 +1041,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiVersion|ApiVersion}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.update_api_version.js * region_tag:apigeeregistry_v1_generated_Registry_UpdateApiVersion_async @@ -1149,9 +1142,8 @@ export class RegistryClient { * @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 {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.delete_api_version.js * region_tag:apigeeregistry_v1_generated_Registry_DeleteApiVersion_async @@ -1247,9 +1239,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.get_api_spec.js * region_tag:apigeeregistry_v1_generated_Registry_GetApiSpec_async @@ -1342,9 +1333,8 @@ export class RegistryClient { * @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 {@link google.api.HttpBody | HttpBody}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.api.HttpBody|HttpBody}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.get_api_spec_contents.js * region_tag:apigeeregistry_v1_generated_Registry_GetApiSpecContents_async @@ -1444,15 +1434,14 @@ export class RegistryClient { * the spec's resource name. * * This value should be 4-63 characters, and valid characters - * are /{@link 0-9|a-z}-/. + * are /{@link protos.0-9|a-z}-/. * * Following AIP-162, IDs must not have the form of a UUID. * @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 {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.create_api_spec.js * region_tag:apigeeregistry_v1_generated_Registry_CreateApiSpec_async @@ -1552,9 +1541,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.update_api_spec.js * region_tag:apigeeregistry_v1_generated_Registry_UpdateApiSpec_async @@ -1648,9 +1636,8 @@ export class RegistryClient { * @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 {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.delete_api_spec.js * region_tag:apigeeregistry_v1_generated_Registry_DeleteApiSpec_async @@ -1738,13 +1725,12 @@ export class RegistryClient { * Required. The name of the spec to be tagged, including the revision ID. * @param {string} request.tag * Required. The tag to apply. - * The tag should be at most 40 characters, and match `{@link a-z0-9-|a-z}{3,39}`. + * The tag should be at most 40 characters, and match `{@link protos.a-z0-9-|a-z}{3,39}`. * @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 {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.tag_api_spec_revision.js * region_tag:apigeeregistry_v1_generated_Registry_TagApiSpecRevision_async @@ -1845,9 +1831,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.rollback_api_spec.js * region_tag:apigeeregistry_v1_generated_Registry_RollbackApiSpec_async @@ -1940,9 +1925,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.delete_api_spec_revision.js * region_tag:apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_async @@ -2038,9 +2022,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.get_api_deployment.js * region_tag:apigeeregistry_v1_generated_Registry_GetApiDeployment_async @@ -2140,15 +2123,14 @@ export class RegistryClient { * the deployment's resource name. * * This value should be 4-63 characters, and valid characters - * are /{@link 0-9|a-z}-/. + * are /{@link protos.0-9|a-z}-/. * * Following AIP-162, IDs must not have the form of a UUID. * @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 {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.create_api_deployment.js * region_tag:apigeeregistry_v1_generated_Registry_CreateApiDeployment_async @@ -2254,9 +2236,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.update_api_deployment.js * region_tag:apigeeregistry_v1_generated_Registry_UpdateApiDeployment_async @@ -2356,9 +2337,8 @@ export class RegistryClient { * @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 {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.delete_api_deployment.js * region_tag:apigeeregistry_v1_generated_Registry_DeleteApiDeployment_async @@ -2453,13 +2433,12 @@ export class RegistryClient { * Required. The name of the deployment to be tagged, including the revision ID. * @param {string} request.tag * Required. The tag to apply. - * The tag should be at most 40 characters, and match `{@link a-z0-9-|a-z}{3,39}`. + * The tag should be at most 40 characters, and match `{@link protos.a-z0-9-|a-z}{3,39}`. * @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 {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.tag_api_deployment_revision.js * region_tag:apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_async @@ -2564,9 +2543,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.rollback_api_deployment.js * region_tag:apigeeregistry_v1_generated_Registry_RollbackApiDeployment_async @@ -2665,9 +2643,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.delete_api_deployment_revision.js * region_tag:apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_async @@ -2767,9 +2744,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.Artifact | Artifact}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.Artifact|Artifact}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.get_artifact.js * region_tag:apigeeregistry_v1_generated_Registry_GetArtifact_async @@ -2862,9 +2838,8 @@ export class RegistryClient { * @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 {@link google.api.HttpBody | HttpBody}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.api.HttpBody|HttpBody}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.get_artifact_contents.js * region_tag:apigeeregistry_v1_generated_Registry_GetArtifactContents_async @@ -2964,15 +2939,14 @@ export class RegistryClient { * the artifact's resource name. * * This value should be 4-63 characters, and valid characters - * are /{@link 0-9|a-z}-/. + * are /{@link protos.0-9|a-z}-/. * * Following AIP-162, IDs must not have the form of a UUID. * @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 {@link google.cloud.apigeeregistry.v1.Artifact | Artifact}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.Artifact|Artifact}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.create_artifact.js * region_tag:apigeeregistry_v1_generated_Registry_CreateArtifact_async @@ -3064,9 +3038,8 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.Artifact | Artifact}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.cloud.apigeeregistry.v1.Artifact|Artifact}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.replace_artifact.js * region_tag:apigeeregistry_v1_generated_Registry_ReplaceArtifact_async @@ -3156,9 +3129,8 @@ export class RegistryClient { * @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 {@link google.protobuf.Empty | Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.delete_artifact.js * region_tag:apigeeregistry_v1_generated_Registry_DeleteArtifact_async @@ -3263,14 +3235,13 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.Api | Api}. + * The first element of the array is Array of {@link protos.google.cloud.apigeeregistry.v1.Api|Api}. * 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 `listApisAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApis( @@ -3372,13 +3343,12 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.Api | Api} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.apigeeregistry.v1.Api|Api} 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 `listApisAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApisStream( @@ -3429,12 +3399,11 @@ export class RegistryClient { * @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). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.apigeeregistry.v1.Api | Api}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.apigeeregistry.v1.Api|Api}. 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.list_apis.js * region_tag:apigeeregistry_v1_generated_Registry_ListApis_async @@ -3485,14 +3454,13 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion}. + * The first element of the array is Array of {@link protos.google.cloud.apigeeregistry.v1.ApiVersion|ApiVersion}. * 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 `listApiVersionsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApiVersions( @@ -3594,13 +3562,12 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiVersion|ApiVersion} 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 `listApiVersionsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApiVersionsStream( @@ -3651,12 +3618,11 @@ export class RegistryClient { * @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). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.apigeeregistry.v1.ApiVersion | ApiVersion}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.apigeeregistry.v1.ApiVersion|ApiVersion}. 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.list_api_versions.js * region_tag:apigeeregistry_v1_generated_Registry_ListApiVersions_async @@ -3707,14 +3673,13 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. + * The first element of the array is Array of {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec}. * 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 `listApiSpecsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApiSpecs( @@ -3816,13 +3781,12 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec} 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 `listApiSpecsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApiSpecsStream( @@ -3873,12 +3837,11 @@ export class RegistryClient { * @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). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec}. 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.list_api_specs.js * region_tag:apigeeregistry_v1_generated_Registry_ListApiSpecs_async @@ -3920,14 +3883,13 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. + * The first element of the array is Array of {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec}. * 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 `listApiSpecRevisionsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApiSpecRevisions( @@ -4019,13 +3981,12 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec} 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 `listApiSpecRevisionsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApiSpecRevisionsStream( @@ -4066,12 +4027,11 @@ export class RegistryClient { * @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). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.apigeeregistry.v1.ApiSpec | ApiSpec}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.apigeeregistry.v1.ApiSpec|ApiSpec}. 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.list_api_spec_revisions.js * region_tag:apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_async @@ -4122,14 +4082,13 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. + * The first element of the array is Array of {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment}. * 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 `listApiDeploymentsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApiDeployments( @@ -4231,13 +4190,12 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment} 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 `listApiDeploymentsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApiDeploymentsStream( @@ -4288,12 +4246,11 @@ export class RegistryClient { * @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). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment}. 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.list_api_deployments.js * region_tag:apigeeregistry_v1_generated_Registry_ListApiDeployments_async @@ -4335,14 +4292,13 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. + * The first element of the array is Array of {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment}. * 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 `listApiDeploymentRevisionsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApiDeploymentRevisions( @@ -4438,13 +4394,12 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment} 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 `listApiDeploymentRevisionsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listApiDeploymentRevisionsStream( @@ -4485,12 +4440,11 @@ export class RegistryClient { * @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). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.apigeeregistry.v1.ApiDeployment | ApiDeployment}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.apigeeregistry.v1.ApiDeployment|ApiDeployment}. 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.list_api_deployment_revisions.js * region_tag:apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_async @@ -4541,14 +4495,13 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.Artifact | Artifact}. + * The first element of the array is Array of {@link protos.google.cloud.apigeeregistry.v1.Artifact|Artifact}. * 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 `listArtifactsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listArtifacts( @@ -4650,13 +4603,12 @@ export class RegistryClient { * @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 {@link google.cloud.apigeeregistry.v1.Artifact | Artifact} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.apigeeregistry.v1.Artifact|Artifact} 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 `listArtifactsAsync()` * 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listArtifactsStream( @@ -4707,12 +4659,11 @@ export class RegistryClient { * @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). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.apigeeregistry.v1.Artifact | Artifact}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.apigeeregistry.v1.Artifact|Artifact}. 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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example include:samples/generated/v1/registry.list_artifacts.js * region_tag:apigeeregistry_v1_generated_Registry_ListArtifacts_async @@ -4777,7 +4728,7 @@ export class RegistryClient { IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined > - ): Promise { + ): Promise<[IamProtos.google.iam.v1.Policy]> { return this.iamClient.getIamPolicy(request, options, callback); } @@ -4798,8 +4749,7 @@ export class RegistryClient { * @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). + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. @@ -4825,7 +4775,7 @@ export class RegistryClient { IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined > - ): Promise { + ): Promise<[IamProtos.google.iam.v1.Policy]> { return this.iamClient.setIamPolicy(request, options, callback); } @@ -4846,8 +4796,7 @@ export class RegistryClient { * @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). + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. @@ -4874,7 +4823,7 @@ export class RegistryClient { IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined > - ): Promise { + ): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { return this.iamClient.testIamPermissions(request, options, callback); } @@ -4889,8 +4838,7 @@ export class RegistryClient { * 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 {@link google.cloud.location.Location | Location}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example * ``` @@ -4936,12 +4884,11 @@ export class RegistryClient { * @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). + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing * {@link google.cloud.location.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) + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example * ``` From 5626bd6d792f231823e1f4ffe84b7cef5eb2edc0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 14:08:33 -0700 Subject: [PATCH 31/40] chore!: update to Node 14 (#50) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Source-Link: https://github.com/googleapis/synthtool/commit/f54a720df6ece8ead2bf2a888df1194d7a339fb6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:aeccbef8061fc122542e8f381c4e7b66b32e23dda522e94c68346585dc408f0d * docs: fix node release schedule link Co-authored-by: Jeffrey Rennie Source-Link: https://github.com/googleapis/synthtool/commit/1a2431537d603e95b4b32317fb494542f75a2165 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430 * chore!: upgrade to node 14 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update .OwlBot.lock.yaml * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update .OwlBot.lock.yaml * 🦉 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: Sofia Leon Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../google-cloud-apigeeregistry/README.md | 2 +- .../google-cloud-apigeeregistry/package.json | 129 +++++++++--------- .../samples/package.json | 4 +- 3 files changed, 68 insertions(+), 67 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/README.md b/packages/google-cloud-apigeeregistry/README.md index b41032a1e76..5cbd4f10228 100644 --- a/packages/google-cloud-apigeeregistry/README.md +++ b/packages/google-cloud-apigeeregistry/README.md @@ -62,7 +62,7 @@ also contains samples. ## Supported Node.js Versions -Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). 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 diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index b1f0ff6961e..7d38713a7e0 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -1,66 +1,67 @@ { - "name": "@google-cloud/apigee-registry", - "version": "0.3.0", - "description": "apigeeregistry client for Node.js", - "repository": "googleapis/nodejs-apigee-registry", - "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 apigeeregistry", - "apigeeregistry", - "apigeeregistry 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": "^3.5.2" - }, - "devDependencies": { - "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", - "@types/sinon": "^10.0.0", - "c8": "^7.7.2", - "gts": "^5.0.0", - "jsdoc": "^4.0.0", - "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^2.0.0", - "linkinator": "^4.0.0", - "mocha": "^10.0.0", - "null-loader": "^4.0.1", - "pack-n-play": "^1.0.0-2", - "sinon": "^15.0.0", - "ts-loader": "^9.1.2", - "typescript": "^4.2.4", - "webpack": "^5.36.2", - "webpack-cli": "^5.0.0" - }, - "engines": { - "node": ">=v12.0.0" - } + "name": "@google-cloud/apigee-registry", + "version": "0.3.0", + "description": "apigeeregistry client for Node.js", + "repository": "googleapis/nodejs-apigee-registry", + "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 apigeeregistry", + "apigeeregistry", + "apigeeregistry 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": "^4.0.3" + }, + "devDependencies": { + "@types/mocha": "^10.0.0", + "@types/node": "^20.4.9", + "@types/sinon": "^10.0.0", + "c8": "^8.0.1", + "gapic-tools": "^0.1.8", + "gts": "^5.0.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "linkinator": "^4.0.0", + "mocha": "^10.0.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.0.0", + "ts-loader": "^9.1.2", + "typescript": "^5.1.6", + "webpack": "^5.36.2", + "webpack-cli": "^5.0.0" + }, + "engines": { + "node": ">=14.0.0" + } } diff --git a/packages/google-cloud-apigeeregistry/samples/package.json b/packages/google-cloud-apigeeregistry/samples/package.json index d376b45e524..ce1acf91070 100644 --- a/packages/google-cloud-apigeeregistry/samples/package.json +++ b/packages/google-cloud-apigeeregistry/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=14.0.0" }, "files": [ "*.js" @@ -20,4 +20,4 @@ "chai": "^4.2.0", "mocha": "^10.0.0" } -} +} \ No newline at end of file From 814542d74f1c43bd5acd014f6956198209ed50af Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 15 Aug 2023 23:23:36 +0200 Subject: [PATCH 32/40] chore(deps): update dependency jsdoc-region-tag to v3 (#52) --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 7d38713a7e0..0900c1e21a5 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -50,7 +50,7 @@ "gts": "^5.0.0", "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^2.0.0", + "jsdoc-region-tag": "^3.0.0", "linkinator": "^4.0.0", "mocha": "^10.0.0", "null-loader": "^4.0.1", From 9ed617cab32d27565aef9c7bbc800eeba18192fd Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 15 Aug 2023 23:41:35 +0200 Subject: [PATCH 33/40] chore(deps): update dependency jsdoc-fresh to v3 (#51) --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 0900c1e21a5..607075ac00b 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -49,7 +49,7 @@ "gapic-tools": "^0.1.8", "gts": "^5.0.0", "jsdoc": "^4.0.0", - "jsdoc-fresh": "^2.0.0", + "jsdoc-fresh": "^3.0.0", "jsdoc-region-tag": "^3.0.0", "linkinator": "^4.0.0", "mocha": "^10.0.0", From c2df475a5ceec0f58eef5e00edd1856adc271c07 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 15:20:15 -0700 Subject: [PATCH 34/40] chore(main): release 1.0.0 (#53) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 1.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 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-apigeeregistry/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-apigeeregistry/package.json | 2 +- ...ippet_metadata.google.cloud.apigeeregistry.v1.json | 2 +- ...ippet_metadata_google.cloud.apigeeregistry.v1.json | 2 +- .../google-cloud-apigeeregistry/samples/package.json | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/CHANGELOG.md b/packages/google-cloud-apigeeregistry/CHANGELOG.md index b540348625e..f4c7e4d7c53 100644 --- a/packages/google-cloud-apigeeregistry/CHANGELOG.md +++ b/packages/google-cloud-apigeeregistry/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [1.0.0](https://github.com/googleapis/nodejs-apigee-registry/compare/v0.3.0...v1.0.0) (2023-08-15) + + +### ⚠ BREAKING CHANGES + +* update to Node 14 ([#50](https://github.com/googleapis/nodejs-apigee-registry/issues/50)) + +### Miscellaneous Chores + +* Update to Node 14 ([#50](https://github.com/googleapis/nodejs-apigee-registry/issues/50)) ([ae2c7ea](https://github.com/googleapis/nodejs-apigee-registry/commit/ae2c7ea278d037c3ba020192ab8913b0659191e8)) + ## [0.3.0](https://github.com/googleapis/nodejs-apigee-registry/compare/v0.2.1...v0.3.0) (2023-02-09) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 607075ac00b..a9cb760f14b 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/apigee-registry", - "version": "0.3.0", + "version": "1.0.0", "description": "apigeeregistry client for Node.js", "repository": "googleapis/nodejs-apigee-registry", "license": "Apache-2.0", diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json index 38ec89987ce..dbc72cb4546 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeregistry", - "version": "0.3.0", + "version": "1.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json index 38ec89987ce..dbc72cb4546 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeregistry", - "version": "0.3.0", + "version": "1.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeregistry/samples/package.json b/packages/google-cloud-apigeeregistry/samples/package.json index ce1acf91070..55b81a7f479 100644 --- a/packages/google-cloud-apigeeregistry/samples/package.json +++ b/packages/google-cloud-apigeeregistry/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/apigee-registry": "^0.3.0" + "@google-cloud/apigee-registry": "^1.0.0" }, "devDependencies": { "c8": "^7.1.0", From fca35350061653b3808ec36a0c64b06bc7345660 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 09:55:11 -0400 Subject: [PATCH 35/40] fix: simplify logic for HTTP/1.1 REST fallback option (#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: simplify logic for HTTP/1.1 REST fallback option For the `fallback` parameter, all values considered as `true` in Boolean context will enable HTTP/1.1 REST fallback, since the other fallback transport, proto over HTTP, is removed from `google-gax` v4. PiperOrigin-RevId: 559812260 Source-Link: https://github.com/googleapis/googleapis/commit/6a6fd29a79fe2846001d90d93e79a19fcc303b85 Source-Link: https://github.com/googleapis/googleapis-gen/commit/56c16657e7a59122b1da94771a9ef40989c282c0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTZjMTY2NTdlN2E1OTEyMmIxZGE5NDc3MWE5ZWY0MDk4OWMyODJjMCJ9 * 🦉 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/provisioning_client.ts | 9 ++++----- .../src/v1/registry_client.ts | 7 +++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts index 7fd22c4dc95..c04c0a76b41 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts @@ -98,8 +98,7 @@ export class ProvisioningClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * 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 @@ -107,7 +106,7 @@ export class ProvisioningClient { * 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 ProvisioningClient({fallback: 'rest'}, gax); + * const client = new ProvisioningClient({fallback: true}, gax); * ``` */ constructor( @@ -179,7 +178,7 @@ export class ProvisioningClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -238,7 +237,7 @@ export class ProvisioningClient { auth: this.auth, grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }; - if (opts.fallback === 'rest') { + if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; lroOptions.httpRules = [ { diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts index ff869c6bae1..411181dcd3f 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts @@ -96,8 +96,7 @@ export class RegistryClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * 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 @@ -105,7 +104,7 @@ export class RegistryClient { * 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 RegistryClient({fallback: 'rest'}, gax); + * const client = new RegistryClient({fallback: true}, gax); * ``` */ constructor( @@ -177,7 +176,7 @@ export class RegistryClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { + } else { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { From c58704392401be3804b05f4dc32bbca7e53d6dde Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 20:37:46 -0700 Subject: [PATCH 36/40] chore(main): release 1.0.1 (#56) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 1.0.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-apigeeregistry/CHANGELOG.md | 7 +++++++ packages/google-cloud-apigeeregistry/package.json | 2 +- .../snippet_metadata.google.cloud.apigeeregistry.v1.json | 2 +- .../snippet_metadata_google.cloud.apigeeregistry.v1.json | 2 +- packages/google-cloud-apigeeregistry/samples/package.json | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-apigeeregistry/CHANGELOG.md b/packages/google-cloud-apigeeregistry/CHANGELOG.md index f4c7e4d7c53..7d6ef629a77 100644 --- a/packages/google-cloud-apigeeregistry/CHANGELOG.md +++ b/packages/google-cloud-apigeeregistry/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.1](https://github.com/googleapis/nodejs-apigee-registry/compare/v1.0.0...v1.0.1) (2023-09-07) + + +### Bug Fixes + +* Simplify logic for HTTP/1.1 REST fallback option ([#54](https://github.com/googleapis/nodejs-apigee-registry/issues/54)) ([c873226](https://github.com/googleapis/nodejs-apigee-registry/commit/c87322645e01d1e1cf989aa5f8502876d7b77230)) + ## [1.0.0](https://github.com/googleapis/nodejs-apigee-registry/compare/v0.3.0...v1.0.0) (2023-08-15) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index a9cb760f14b..cdd643c4932 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/apigee-registry", - "version": "1.0.0", + "version": "1.0.1", "description": "apigeeregistry client for Node.js", "repository": "googleapis/nodejs-apigee-registry", "license": "Apache-2.0", diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json index dbc72cb4546..3451f7b1dec 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeregistry", - "version": "1.0.0", + "version": "1.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json index dbc72cb4546..3451f7b1dec 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeregistry", - "version": "1.0.0", + "version": "1.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeregistry/samples/package.json b/packages/google-cloud-apigeeregistry/samples/package.json index 55b81a7f479..ef33dd9b337 100644 --- a/packages/google-cloud-apigeeregistry/samples/package.json +++ b/packages/google-cloud-apigeeregistry/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/apigee-registry": "^1.0.0" + "@google-cloud/apigee-registry": "^1.0.1" }, "devDependencies": { "c8": "^7.1.0", From 79a308733d432c42a611d9e75248391481558390 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 13 Sep 2023 15:22:55 -0700 Subject: [PATCH 37/40] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 35 +- .../{.github => }/.OwlBot.yaml | 6 +- .../google-cloud-apigeeregistry/.mocharc.js | 2 +- .../.prettierrc.js | 2 +- .../.repo-metadata.json | 5 +- .../google-cloud-apigeeregistry/README.md | 59 +- .../google-cloud-apigeeregistry/package.json | 13 +- .../samples/README.md | 734 ++++++++++++++++++ .../google-cloud-apigeeregistry/src/index.ts | 2 +- release-please-config.json | 43 +- 10 files changed, 843 insertions(+), 58 deletions(-) rename packages/google-cloud-apigeeregistry/{.github => }/.OwlBot.yaml (78%) create mode 100644 packages/google-cloud-apigeeregistry/samples/README.md diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c525e12a69d..d79b129c56a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,5 +1,6 @@ { "packages/gapic-node-templating": "0.0.0", + "packages/google-ai-generativelanguage": "1.0.1", "packages/google-analytics-admin": "6.0.0", "packages/google-analytics-data": "4.0.1", "packages/google-api-apikeys": "1.0.1", @@ -9,9 +10,12 @@ "packages/google-appengine": "3.0.1", "packages/google-area120-tables": "3.0.1", "packages/google-cloud-accessapproval": "3.0.1", + "packages/google-cloud-advisorynotifications": "1.0.1", "packages/google-cloud-aiplatform": "3.2.0", + "packages/google-cloud-alloydb": "1.0.1", "packages/google-cloud-apigateway": "3.0.1", "packages/google-cloud-apigeeconnect": "3.0.1", + "packages/google-cloud-apigeeregistry": "1.0.1", "packages/google-cloud-asset": "5.0.2", "packages/google-cloud-assuredworkloads": "4.0.1", "packages/google-cloud-baremetalsolution": "1.1.1", @@ -33,7 +37,10 @@ "packages/google-cloud-certificatemanager": "1.0.1", "packages/google-cloud-channel": "3.1.0", "packages/google-cloud-clouddms": "3.1.0", + "packages/google-cloud-commerce-consumer-procurement": "0.1.1", "packages/google-cloud-compute": "4.0.1", + "packages/google-cloud-confidentialcomputing": "1.1.0", + "packages/google-cloud-config": "0.1.0", "packages/google-cloud-contactcenterinsights": "3.0.1", "packages/google-cloud-contentwarehouse": "1.1.0", "packages/google-cloud-datacatalog": "4.0.1", @@ -65,13 +72,16 @@ "packages/google-cloud-ids": "3.0.1", "packages/google-cloud-iot": "4.0.1", "packages/google-cloud-kms": "4.0.1", + "packages/google-cloud-kms-inventory": "1.0.1", "packages/google-cloud-language": "6.1.0", "packages/google-cloud-lifesciences": "3.0.1", "packages/google-cloud-managedidentities": "3.0.1", "packages/google-cloud-mediatranslation": "4.0.1", "packages/google-cloud-memcache": "3.0.1", "packages/google-cloud-metastore": "4.0.1", + "packages/google-cloud-migrationcenter": "1.0.1", "packages/google-cloud-monitoring": "4.0.0", + "packages/google-cloud-netapp": "0.1.0", "packages/google-cloud-networkconnectivity": "3.0.1", "packages/google-cloud-networkmanagement": "3.1.0", "packages/google-cloud-networksecurity": "2.0.1", @@ -83,7 +93,9 @@ "packages/google-cloud-oslogin": "5.1.0", "packages/google-cloud-phishingprotection": "4.0.1", "packages/google-cloud-policytroubleshooter": "3.1.1", + "packages/google-cloud-policytroubleshooter-iam": "0.2.1", "packages/google-cloud-privatecatalog": "3.0.1", + "packages/google-cloud-rapidmigrationassessment": "1.0.1", "packages/google-cloud-recaptchaenterprise": "4.0.1", "packages/google-cloud-recommender": "6.1.0", "packages/google-cloud-redis": "4.0.1", @@ -99,6 +111,9 @@ "packages/google-cloud-servicedirectory": "5.0.1", "packages/google-cloud-shell": "3.0.1", "packages/google-cloud-speech": "6.0.2", + "packages/google-cloud-sql": "0.1.0", + "packages/google-cloud-storageinsights": "1.0.1", + "packages/google-cloud-support": "1.0.1", "packages/google-cloud-talent": "6.0.1", "packages/google-cloud-tasks": "4.0.1", "packages/google-cloud-texttospeech": "5.0.1", @@ -115,6 +130,7 @@ "packages/google-cloud-webrisk": "4.0.1", "packages/google-cloud-websecurityscanner": "3.0.1", "packages/google-cloud-workflows-executions": "3.1.0", + "packages/google-cloud-workstations": "1.1.0", "packages/google-container": "5.2.0", "packages/google-dataflow": "3.0.1", "packages/google-devtools-artifactregistry": "3.0.1", @@ -125,26 +141,11 @@ "packages/google-identity-accesscontextmanager": "3.0.1", "packages/google-maps-addressvalidation": "2.0.1", "packages/google-maps-mapsplatformdatasets": "1.0.1", + "packages/google-maps-places": "1.0.1", "packages/google-maps-routing": "1.0.1", "packages/google-monitoring-dashboard": "3.0.1", "packages/google-privacy-dlp": "5.0.1", "packages/google-storagetransfer": "3.0.1", "packages/grafeas": "5.0.1", - "packages/typeless-sample-bot": "2.0.0", - "packages/google-cloud-advisorynotifications": "1.0.1", - "packages/google-cloud-kms-inventory": "1.0.1", - "packages/google-cloud-alloydb": "1.0.1", - "packages/google-cloud-workstations": "1.1.0", - "packages/google-cloud-confidentialcomputing": "1.1.0", - "packages/google-ai-generativelanguage": "1.0.1", - "packages/google-cloud-storageinsights": "1.0.1", - "packages/google-maps-places": "1.0.1", - "packages/google-cloud-support": "1.0.1", - "packages/google-cloud-rapidmigrationassessment": "1.0.1", - "packages/google-cloud-migrationcenter": "1.0.1", - "packages/google-cloud-commerce-consumer-procurement": "0.1.1", - "packages/google-cloud-policytroubleshooter-iam": "0.2.1", - "packages/google-cloud-sql": "0.1.0", - "packages/google-cloud-config": "0.1.0", - "packages/google-cloud-netapp": "0.1.0" + "packages/typeless-sample-bot": "2.0.0" } diff --git a/packages/google-cloud-apigeeregistry/.github/.OwlBot.yaml b/packages/google-cloud-apigeeregistry/.OwlBot.yaml similarity index 78% rename from packages/google-cloud-apigeeregistry/.github/.OwlBot.yaml rename to packages/google-cloud-apigeeregistry/.OwlBot.yaml index bc8466cf6d1..2fc15cc2a0b 100644 --- a/packages/google-cloud-apigeeregistry/.github/.OwlBot.yaml +++ b/packages/google-cloud-apigeeregistry/.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/apigeeregistry/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/apigeeregistry/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-apigeeregistry/$1 diff --git a/packages/google-cloud-apigeeregistry/.mocharc.js b/packages/google-cloud-apigeeregistry/.mocharc.js index 0b600509bed..49e7e228701 100644 --- a/packages/google-cloud-apigeeregistry/.mocharc.js +++ b/packages/google-cloud-apigeeregistry/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 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-apigeeregistry/.prettierrc.js b/packages/google-cloud-apigeeregistry/.prettierrc.js index d1b95106f4c..1e6cec783e4 100644 --- a/packages/google-cloud-apigeeregistry/.prettierrc.js +++ b/packages/google-cloud-apigeeregistry/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 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-apigeeregistry/.repo-metadata.json b/packages/google-cloud-apigeeregistry/.repo-metadata.json index 5807bd4162c..71e1696543b 100644 --- a/packages/google-cloud-apigeeregistry/.repo-metadata.json +++ b/packages/google-cloud-apigeeregistry/.repo-metadata.json @@ -3,13 +3,12 @@ "name_pretty": "Apigee Registry API", "product_documentation": "https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/apigee-registry/latest", - "issue_tracker": "https://github.com/googleapis/nodejs-apigee-registry/issues", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", "release_level": "beta", "language": "nodejs", - "repo": "googleapis/nodejs-apigee-registry", + "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/apigee-registry", "api_id": "apigeeregistry.googleapis.com", "default_version": "v1", "requires_billing": true } - diff --git a/packages/google-cloud-apigeeregistry/README.md b/packages/google-cloud-apigeeregistry/README.md index 5cbd4f10228..0a9caf86a87 100644 --- a/packages/google-cloud-apigeeregistry/README.md +++ b/packages/google-cloud-apigeeregistry/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Apigee Registry API: Node.js Client](https://github.com/googleapis/nodejs-apigee-registry) +# [Apigee Registry API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-apigeeregistry) [![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/apigee-registry.svg)](https://www.npmjs.org/package/@google-cloud/apigee-registry) @@ -14,11 +14,11 @@ apigeeregistry client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-apigee-registry/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-apigeeregistry/CHANGELOG.md). * [Apigee Registry API Node.js Client API Reference][client-docs] * [Apigee Registry API Documentation][product-docs] -* [github.com/googleapis/nodejs-apigee-registry](https://github.com/googleapis/nodejs-apigee-registry) +* [github.com/googleapis/google-cloud-node/packages/google-cloud-apigeeregistry](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-apigeeregistry) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -32,7 +32,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - +* [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) @@ -56,6 +56,53 @@ npm install @google-cloud/apigee-registry +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-apigeeregistry/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Provisioning.create_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.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-apigeeregistry/samples/generated/v1/provisioning.create_instance.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Provisioning.delete_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.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-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Provisioning.get_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.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-apigeeregistry/samples/generated/v1/provisioning.get_instance.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.create_api | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.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-apigeeregistry/samples/generated/v1/registry.create_api.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.create_api_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.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-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.create_api_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.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-apigeeregistry/samples/generated/v1/registry.create_api_spec.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.create_api_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.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-apigeeregistry/samples/generated/v1/registry.create_api_version.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.create_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.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-apigeeregistry/samples/generated/v1/registry.create_artifact.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.delete_api | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.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-apigeeregistry/samples/generated/v1/registry.delete_api.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.delete_api_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.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-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.delete_api_deployment_revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.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-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.delete_api_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.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-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.delete_api_spec_revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.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-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.delete_api_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.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-apigeeregistry/samples/generated/v1/registry.delete_api_version.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.delete_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.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-apigeeregistry/samples/generated/v1/registry.delete_artifact.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.get_api | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.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-apigeeregistry/samples/generated/v1/registry.get_api.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.get_api_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.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-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.get_api_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.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-apigeeregistry/samples/generated/v1/registry.get_api_spec.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.get_api_spec_contents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.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-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.get_api_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.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-apigeeregistry/samples/generated/v1/registry.get_api_version.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.get_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.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-apigeeregistry/samples/generated/v1/registry.get_artifact.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.get_artifact_contents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.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-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.list_api_deployment_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.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-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.list_api_deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.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-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.list_api_spec_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.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-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.list_api_specs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.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-apigeeregistry/samples/generated/v1/registry.list_api_specs.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.list_api_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.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-apigeeregistry/samples/generated/v1/registry.list_api_versions.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.list_apis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.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-apigeeregistry/samples/generated/v1/registry.list_apis.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.list_artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.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-apigeeregistry/samples/generated/v1/registry.list_artifacts.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.replace_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.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-apigeeregistry/samples/generated/v1/registry.replace_artifact.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.rollback_api_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.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-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.rollback_api_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.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-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.tag_api_deployment_revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.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-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.tag_api_spec_revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.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-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.update_api | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.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-apigeeregistry/samples/generated/v1/registry.update_api.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.update_api_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.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-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.update_api_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.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-apigeeregistry/samples/generated/v1/registry.update_api_spec.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Registry.update_api_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.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-apigeeregistry/samples/generated/v1/registry.update_api_version.js,packages/google-cloud-apigeeregistry/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/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-apigeeregistry/samples/quickstart.js,packages/google-cloud-apigeeregistry/samples/README.md) | + + The [Apigee Registry API Node.js Client API Reference][client-docs] documentation also contains samples. @@ -103,7 +150,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-apigee-registry/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`) @@ -115,7 +162,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-apigee-registry/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/apigee-registry/latest [product-docs]: https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index cdd643c4932..42f35efcaf8 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -2,7 +2,11 @@ "name": "@google-cloud/apigee-registry", "version": "1.0.1", "description": "apigeeregistry client for Node.js", - "repository": "googleapis/nodejs-apigee-registry", + "repository": { + "type": "git", + "directory": "packages/google-cloud-apigeeregistry", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", @@ -33,9 +37,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": { @@ -63,5 +67,6 @@ }, "engines": { "node": ">=14.0.0" - } + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-apigeeregistry" } diff --git a/packages/google-cloud-apigeeregistry/samples/README.md b/packages/google-cloud-apigeeregistry/samples/README.md new file mode 100644 index 00000000000..4fefc6a6a00 --- /dev/null +++ b/packages/google-cloud-apigeeregistry/samples/README.md @@ -0,0 +1,734 @@ +[//]: # "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 + +# [Apigee Registry API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Provisioning.create_instance](#provisioning.create_instance) + * [Provisioning.delete_instance](#provisioning.delete_instance) + * [Provisioning.get_instance](#provisioning.get_instance) + * [Registry.create_api](#registry.create_api) + * [Registry.create_api_deployment](#registry.create_api_deployment) + * [Registry.create_api_spec](#registry.create_api_spec) + * [Registry.create_api_version](#registry.create_api_version) + * [Registry.create_artifact](#registry.create_artifact) + * [Registry.delete_api](#registry.delete_api) + * [Registry.delete_api_deployment](#registry.delete_api_deployment) + * [Registry.delete_api_deployment_revision](#registry.delete_api_deployment_revision) + * [Registry.delete_api_spec](#registry.delete_api_spec) + * [Registry.delete_api_spec_revision](#registry.delete_api_spec_revision) + * [Registry.delete_api_version](#registry.delete_api_version) + * [Registry.delete_artifact](#registry.delete_artifact) + * [Registry.get_api](#registry.get_api) + * [Registry.get_api_deployment](#registry.get_api_deployment) + * [Registry.get_api_spec](#registry.get_api_spec) + * [Registry.get_api_spec_contents](#registry.get_api_spec_contents) + * [Registry.get_api_version](#registry.get_api_version) + * [Registry.get_artifact](#registry.get_artifact) + * [Registry.get_artifact_contents](#registry.get_artifact_contents) + * [Registry.list_api_deployment_revisions](#registry.list_api_deployment_revisions) + * [Registry.list_api_deployments](#registry.list_api_deployments) + * [Registry.list_api_spec_revisions](#registry.list_api_spec_revisions) + * [Registry.list_api_specs](#registry.list_api_specs) + * [Registry.list_api_versions](#registry.list_api_versions) + * [Registry.list_apis](#registry.list_apis) + * [Registry.list_artifacts](#registry.list_artifacts) + * [Registry.replace_artifact](#registry.replace_artifact) + * [Registry.rollback_api_deployment](#registry.rollback_api_deployment) + * [Registry.rollback_api_spec](#registry.rollback_api_spec) + * [Registry.tag_api_deployment_revision](#registry.tag_api_deployment_revision) + * [Registry.tag_api_spec_revision](#registry.tag_api_spec_revision) + * [Registry.update_api](#registry.update_api) + * [Registry.update_api_deployment](#registry.update_api_deployment) + * [Registry.update_api_spec](#registry.update_api_spec) + * [Registry.update_api_version](#registry.update_api_version) + * [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/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Provisioning.create_instance + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.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-apigeeregistry/samples/generated/v1/provisioning.create_instance.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.create_instance.js` + + +----- + + + + +### Provisioning.delete_instance + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.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-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.delete_instance.js` + + +----- + + + + +### Provisioning.get_instance + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.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-apigeeregistry/samples/generated/v1/provisioning.get_instance.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/provisioning.get_instance.js` + + +----- + + + + +### Registry.create_api + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.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-apigeeregistry/samples/generated/v1/registry.create_api.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api.js` + + +----- + + + + +### Registry.create_api_deployment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.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-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_deployment.js` + + +----- + + + + +### Registry.create_api_spec + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.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-apigeeregistry/samples/generated/v1/registry.create_api_spec.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_spec.js` + + +----- + + + + +### Registry.create_api_version + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.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-apigeeregistry/samples/generated/v1/registry.create_api_version.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_api_version.js` + + +----- + + + + +### Registry.create_artifact + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.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-apigeeregistry/samples/generated/v1/registry.create_artifact.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.create_artifact.js` + + +----- + + + + +### Registry.delete_api + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.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-apigeeregistry/samples/generated/v1/registry.delete_api.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api.js` + + +----- + + + + +### Registry.delete_api_deployment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.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-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment.js` + + +----- + + + + +### Registry.delete_api_deployment_revision + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.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-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_deployment_revision.js` + + +----- + + + + +### Registry.delete_api_spec + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.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-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec.js` + + +----- + + + + +### Registry.delete_api_spec_revision + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.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-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_spec_revision.js` + + +----- + + + + +### Registry.delete_api_version + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.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-apigeeregistry/samples/generated/v1/registry.delete_api_version.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_api_version.js` + + +----- + + + + +### Registry.delete_artifact + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.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-apigeeregistry/samples/generated/v1/registry.delete_artifact.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.delete_artifact.js` + + +----- + + + + +### Registry.get_api + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.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-apigeeregistry/samples/generated/v1/registry.get_api.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api.js` + + +----- + + + + +### Registry.get_api_deployment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.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-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_deployment.js` + + +----- + + + + +### Registry.get_api_spec + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.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-apigeeregistry/samples/generated/v1/registry.get_api_spec.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec.js` + + +----- + + + + +### Registry.get_api_spec_contents + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.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-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_spec_contents.js` + + +----- + + + + +### Registry.get_api_version + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.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-apigeeregistry/samples/generated/v1/registry.get_api_version.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_api_version.js` + + +----- + + + + +### Registry.get_artifact + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.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-apigeeregistry/samples/generated/v1/registry.get_artifact.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact.js` + + +----- + + + + +### Registry.get_artifact_contents + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.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-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.get_artifact_contents.js` + + +----- + + + + +### Registry.list_api_deployment_revisions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.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-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployment_revisions.js` + + +----- + + + + +### Registry.list_api_deployments + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.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-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_deployments.js` + + +----- + + + + +### Registry.list_api_spec_revisions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.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-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_spec_revisions.js` + + +----- + + + + +### Registry.list_api_specs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.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-apigeeregistry/samples/generated/v1/registry.list_api_specs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_specs.js` + + +----- + + + + +### Registry.list_api_versions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.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-apigeeregistry/samples/generated/v1/registry.list_api_versions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_api_versions.js` + + +----- + + + + +### Registry.list_apis + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.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-apigeeregistry/samples/generated/v1/registry.list_apis.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_apis.js` + + +----- + + + + +### Registry.list_artifacts + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.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-apigeeregistry/samples/generated/v1/registry.list_artifacts.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.list_artifacts.js` + + +----- + + + + +### Registry.replace_artifact + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.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-apigeeregistry/samples/generated/v1/registry.replace_artifact.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.replace_artifact.js` + + +----- + + + + +### Registry.rollback_api_deployment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.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-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_deployment.js` + + +----- + + + + +### Registry.rollback_api_spec + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.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-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.rollback_api_spec.js` + + +----- + + + + +### Registry.tag_api_deployment_revision + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.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-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_deployment_revision.js` + + +----- + + + + +### Registry.tag_api_spec_revision + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.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-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.tag_api_spec_revision.js` + + +----- + + + + +### Registry.update_api + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.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-apigeeregistry/samples/generated/v1/registry.update_api.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api.js` + + +----- + + + + +### Registry.update_api_deployment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.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-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_deployment.js` + + +----- + + + + +### Registry.update_api_spec + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.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-apigeeregistry/samples/generated/v1/registry.update_api_spec.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_spec.js` + + +----- + + + + +### Registry.update_api_version + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.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-apigeeregistry/samples/generated/v1/registry.update_api_version.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/samples/generated/v1/registry.update_api_version.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-apigeeregistry/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-apigeeregistry/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-apigeeregistry/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/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api diff --git a/packages/google-cloud-apigeeregistry/src/index.ts b/packages/google-cloud-apigeeregistry/src/index.ts index bfce90b009e..2d705994a3a 100644 --- a/packages/google-cloud-apigeeregistry/src/index.ts +++ b/packages/google-cloud-apigeeregistry/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 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 163156a4f54..03c34c92c0e 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,6 +1,7 @@ { "initial-version": "0.1.0", "packages": { + "packages/google-ai-generativelanguage": {}, "packages/google-analytics-admin": {}, "packages/google-analytics-data": {}, "packages/google-api-apikeys": {}, @@ -10,9 +11,12 @@ "packages/google-appengine": {}, "packages/google-area120-tables": {}, "packages/google-cloud-accessapproval": {}, + "packages/google-cloud-advisorynotifications": {}, "packages/google-cloud-aiplatform": {}, + "packages/google-cloud-alloydb": {}, "packages/google-cloud-apigateway": {}, "packages/google-cloud-apigeeconnect": {}, + "packages/google-cloud-apigeeregistry": {}, "packages/google-cloud-asset": {}, "packages/google-cloud-assuredworkloads": {}, "packages/google-cloud-baremetalsolution": {}, @@ -34,7 +38,10 @@ "packages/google-cloud-certificatemanager": {}, "packages/google-cloud-channel": {}, "packages/google-cloud-clouddms": {}, + "packages/google-cloud-commerce-consumer-procurement": {}, "packages/google-cloud-compute": {}, + "packages/google-cloud-confidentialcomputing": {}, + "packages/google-cloud-config": {}, "packages/google-cloud-contactcenterinsights": {}, "packages/google-cloud-contentwarehouse": {}, "packages/google-cloud-datacatalog": {}, @@ -52,6 +59,7 @@ "packages/google-cloud-discoveryengine": {}, "packages/google-cloud-documentai": {}, "packages/google-cloud-domains": {}, + "packages/google-cloud-edgecontainer": {}, "packages/google-cloud-essentialcontacts": {}, "packages/google-cloud-eventarc": {}, "packages/google-cloud-eventarc-publishing": {}, @@ -66,16 +74,20 @@ "packages/google-cloud-ids": {}, "packages/google-cloud-iot": {}, "packages/google-cloud-kms": {}, + "packages/google-cloud-kms-inventory": {}, "packages/google-cloud-language": {}, "packages/google-cloud-lifesciences": {}, "packages/google-cloud-managedidentities": {}, "packages/google-cloud-mediatranslation": {}, "packages/google-cloud-memcache": {}, "packages/google-cloud-metastore": {}, + "packages/google-cloud-migrationcenter": {}, "packages/google-cloud-monitoring": {}, + "packages/google-cloud-netapp": {}, "packages/google-cloud-networkconnectivity": {}, "packages/google-cloud-networkmanagement": {}, "packages/google-cloud-networksecurity": {}, + "packages/google-cloud-networkservices": {}, "packages/google-cloud-notebooks": {}, "packages/google-cloud-optimization": {}, "packages/google-cloud-orchestration-airflow-service": {}, @@ -83,8 +95,11 @@ "packages/google-cloud-osconfig": {}, "packages/google-cloud-oslogin": {}, "packages/google-cloud-phishingprotection": {}, + "packages/google-cloud-policysimulator": {}, "packages/google-cloud-policytroubleshooter": {}, + "packages/google-cloud-policytroubleshooter-iam": {}, "packages/google-cloud-privatecatalog": {}, + "packages/google-cloud-rapidmigrationassessment": {}, "packages/google-cloud-recaptchaenterprise": {}, "packages/google-cloud-recommender": {}, "packages/google-cloud-redis": {}, @@ -100,6 +115,9 @@ "packages/google-cloud-servicedirectory": {}, "packages/google-cloud-shell": {}, "packages/google-cloud-speech": {}, + "packages/google-cloud-sql": {}, + "packages/google-cloud-storageinsights": {}, + "packages/google-cloud-support": {}, "packages/google-cloud-talent": {}, "packages/google-cloud-tasks": {}, "packages/google-cloud-texttospeech": {}, @@ -116,42 +134,25 @@ "packages/google-cloud-webrisk": {}, "packages/google-cloud-websecurityscanner": {}, "packages/google-cloud-workflows-executions": {}, + "packages/google-cloud-workstations": {}, "packages/google-container": {}, "packages/google-dataflow": {}, "packages/google-devtools-artifactregistry": {}, "packages/google-devtools-cloudbuild": {}, + "packages/google-devtools-cloudprofiler": {}, "packages/google-devtools-containeranalysis": {}, "packages/google-iam": {}, "packages/google-iam-credentials": {}, "packages/google-identity-accesscontextmanager": {}, "packages/google-maps-addressvalidation": {}, "packages/google-maps-mapsplatformdatasets": {}, + "packages/google-maps-places": {}, "packages/google-maps-routing": {}, "packages/google-monitoring-dashboard": {}, "packages/google-privacy-dlp": {}, "packages/google-storagetransfer": {}, "packages/grafeas": {}, - "packages/google-cloud-kms-inventory": {}, - "packages/google-cloud-advisorynotifications": {}, - "packages/typeless-sample-bot": {}, - "packages/google-cloud-alloydb": {}, - "packages/google-cloud-workstations": {}, - "packages/google-cloud-confidentialcomputing": {}, - "packages/google-ai-generativelanguage": {}, - "packages/google-cloud-storageinsights": {}, - "packages/google-cloud-support": {}, - "packages/google-maps-places": {}, - "packages/google-cloud-rapidmigrationassessment": {}, - "packages/google-cloud-migrationcenter": {}, - "packages/google-cloud-sql": {}, - "packages/google-cloud-commerce-consumer-procurement": {}, - "packages/google-cloud-policytroubleshooter-iam": {}, - "packages/google-cloud-config": {}, - "packages/google-cloud-netapp": {}, - "packages/google-cloud-policysimulator": {}, - "packages/google-cloud-edgecontainer": {}, - "packages/google-devtools-cloudprofiler": {}, - "packages/google-cloud-networkservices": {} + "packages/typeless-sample-bot": {} }, "plugins": [ { From 568c49c999e810723ef0395058d05e6d13b3f82b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 13 Sep 2023 22:45:41 +0000 Subject: [PATCH 38/40] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-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 --- release-please-config.json | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/release-please-config.json b/release-please-config.json index c3a891dc11c..6633bf96b5e 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -153,28 +153,7 @@ "packages/google-storagetransfer": {}, "packages/grafeas": {}, "packages/typeless-sample-bot": {}, - "packages/google-cloud-kms-inventory": {}, - "packages/google-cloud-advisorynotifications": {}, - "packages/typeless-sample-bot": {}, - "packages/google-cloud-alloydb": {}, - "packages/google-cloud-workstations": {}, - "packages/google-cloud-confidentialcomputing": {}, - "packages/google-ai-generativelanguage": {}, - "packages/google-cloud-storageinsights": {}, - "packages/google-cloud-support": {}, - "packages/google-maps-places": {}, - "packages/google-cloud-rapidmigrationassessment": {}, - "packages/google-cloud-migrationcenter": {}, - "packages/google-cloud-sql": {}, - "packages/google-cloud-commerce-consumer-procurement": {}, - "packages/google-cloud-policytroubleshooter-iam": {}, - "packages/google-cloud-config": {}, - "packages/google-cloud-netapp": {}, - "packages/google-cloud-connectors": {}, - "packages/google-cloud-policysimulator": {}, - "packages/google-cloud-edgecontainer": {}, - "packages/google-devtools-cloudprofiler": {}, - "packages/google-cloud-networkservices": {} + "packages/google-cloud-connectors": {} }, "plugins": [ { From b7c118f935c813b37e3b10579801eec657035b30 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 13 Sep 2023 21:18:57 -0700 Subject: [PATCH 39/40] add dependency --- packages/google-cloud-apigeeregistry/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 42f35efcaf8..851427d247b 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -56,6 +56,7 @@ "jsdoc-fresh": "^3.0.0", "jsdoc-region-tag": "^3.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^10.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", From 98bf50492bac539ccdb6ac1412d2c513d4f9b250 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 13 Sep 2023 21:25:39 -0700 Subject: [PATCH 40/40] update linkinator --- packages/google-cloud-apigeeregistry/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 851427d247b..784f801f898 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -55,7 +55,7 @@ "jsdoc": "^4.0.0", "jsdoc-fresh": "^3.0.0", "jsdoc-region-tag": "^3.0.0", - "linkinator": "^4.0.0", + "linkinator": "4.1.2", "long": "^5.2.3", "mocha": "^10.0.0", "null-loader": "^4.0.1",