From 253becfcaa8a9007240908618e86609be10df399 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 12 Nov 2020 01:12:45 +0000 Subject: [PATCH 01/85] chore: add initial files for launch --- .../google-api-servicemanagement/synth.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 packages/google-api-servicemanagement/synth.py diff --git a/packages/google-api-servicemanagement/synth.py b/packages/google-api-servicemanagement/synth.py new file mode 100644 index 00000000000..a20bbb78a2d --- /dev/null +++ b/packages/google-api-servicemanagement/synth.py @@ -0,0 +1,35 @@ +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import synthtool.languages.node as node +import subprocess +import logging + +logging.basicConfig(level=logging.DEBUG) + +# run the gapic generator +gapic = gcp.GAPICBazel() +versions = ["v1"] +name = 'servicemanagement' +for version in versions: + library = gapic.node_library( + name, + version, + proto_path = f'google/api/servicemanagement/{version}') + s.copy(library, excludes=[]) + +# Copy common templates +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library( + source_location='build/src', versions=["v1"], default_version="v1") +s.copy(templates, excludes=[]) + +node.postprocess_gapic_library() From 985b20e4afe057417ccfcf1cd5c50eb96e001169 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 4 Dec 2020 08:17:08 +0000 Subject: [PATCH 02/85] chore: add initial files for launch --- packages/google-api-servicemanagement/README.md | 1 + packages/google-api-servicemanagement/synth.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 packages/google-api-servicemanagement/README.md diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md new file mode 100644 index 00000000000..4d8d5ff41b5 --- /dev/null +++ b/packages/google-api-servicemanagement/README.md @@ -0,0 +1 @@ +Servicemanagement: Nodejs Client diff --git a/packages/google-api-servicemanagement/synth.py b/packages/google-api-servicemanagement/synth.py index a20bbb78a2d..cdf84d4c89d 100644 --- a/packages/google-api-servicemanagement/synth.py +++ b/packages/google-api-servicemanagement/synth.py @@ -1,3 +1,9 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software @@ -23,7 +29,7 @@ library = gapic.node_library( name, version, - proto_path = f'google/api/servicemanagement/{version}') + bazel_target=f"//google/api/servicemanagement/{version}:api-servicemanagement-{version}-nodejs") s.copy(library, excludes=[]) # Copy common templates From 55e2299fe8632fe93ed3dfc96c414a1f63ca9bde Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 10 Mar 2021 06:41:25 +0000 Subject: [PATCH 03/85] chore: add initial files for launch --- .../CODE_OF_CONDUCT.md | 94 ++++++++ .../CONTRIBUTING.md | 76 +++++++ packages/google-api-servicemanagement/LICENSE | 202 ++++++++++++++++++ .../google-api-servicemanagement/README.md | 157 +++++++++++++- 4 files changed, 528 insertions(+), 1 deletion(-) create mode 100644 packages/google-api-servicemanagement/CODE_OF_CONDUCT.md create mode 100644 packages/google-api-servicemanagement/CONTRIBUTING.md create mode 100644 packages/google-api-servicemanagement/LICENSE diff --git a/packages/google-api-servicemanagement/CODE_OF_CONDUCT.md b/packages/google-api-servicemanagement/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-api-servicemanagement/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-api-servicemanagement/CONTRIBUTING.md b/packages/google-api-servicemanagement/CONTRIBUTING.md new file mode 100644 index 00000000000..99a0d03ee1c --- /dev/null +++ b/packages/google-api-servicemanagement/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 Service Management API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +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=servicemanagement.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-api-servicemanagement/LICENSE b/packages/google-api-servicemanagement/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-api-servicemanagement/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-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index 4d8d5ff41b5..03fa291cc86 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -1 +1,156 @@ -Servicemanagement: Nodejs Client +[//]: # "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 + +# [Service Management API: Node.js Client](https://github.com/googleapis/nodejs-service-management) + +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/servicemanagement.svg)](https://www.npmjs.org/package/servicemanagement) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-service-management/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-service-management) + + + + +Servicemanagement client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-service-management/blob/master/CHANGELOG.md). + +* [Service Management API Node.js Client API Reference][client-docs] +* [Service Management API Documentation][product-docs] +* [github.com/googleapis/nodejs-service-management](https://github.com/googleapis/nodejs-service-management) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Service Management API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install servicemanagement +``` + + +### Using the client library + +```javascript +// Imports the Google Cloud client library + +// remove this line after package is released +// eslint-disable-next-line node/no-missing-require +const = require('@google-api/service-management'); + +// 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 (); + +//TODO(library generator): write the actual function you will be testing +async function doSomething() { + console.log('Developer! Change this code so that it shows how to use the library! See comments below on structure.') + // const [thing] = await client.methodName({ + // }); + // console.info(thing); +} +doSomething(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-service-management/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-service-management/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-service-management&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | + + + +The [Service Management API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-service-management/blob/master/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its template in this +[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-service-management/blob/master/LICENSE) + +[client-docs]: https://cloud.google.com/service-infrastructure/docs/service-management/reference +[product-docs]: https://cloud.google.com/service-infrastructure/docs/overview/ +[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=servicemanagement.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started From ee805ebf757f987c474d33ec3ff28ca881f1ba72 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Sat, 20 Mar 2021 06:07:05 +0000 Subject: [PATCH 04/85] feat!: initial stub of library --- .../.eslintignore | 6 + .../.eslintrc.json | 3 + .../.gitattributes | 4 + .../google-api-servicemanagement/.gitignore | 14 + .../google-api-servicemanagement/.jsdoc.js | 55 + .../google-api-servicemanagement/.mocharc.js | 29 + packages/google-api-servicemanagement/.nycrc | 24 + .../.prettierignore | 6 + .../.prettierrc.js | 17 + .../.repo-metadata.json | 14 + .../google-api-servicemanagement/README.md | 10 +- .../api-extractor.json | 369 + .../linkinator.config.json | 1 + .../google-api-servicemanagement/package.json | 66 + .../api/servicemanagement/v1/resources.proto | 304 + .../servicemanagement/v1/servicemanager.proto | 560 + .../protos/protos.d.ts | 15529 ++++++ .../protos/protos.js | 39135 ++++++++++++++++ .../protos/protos.json | 3654 ++ .../samples/README.md | 50 + .../samples/package.json | 23 + .../samples/quickstart.js | 51 + .../samples/test/quickstart.js | 50 + .../google-api-servicemanagement/src/index.ts | 27 + .../src/v1/gapic_metadata.json | 185 + .../src/v1/index.ts | 19 + .../src/v1/service_manager_client.ts | 2675 ++ .../src/v1/service_manager_client_config.json | 101 + .../src/v1/service_manager_proto_list.json | 4 + .../synth.metadata | 37 + .../google-api-servicemanagement/synth.py | 2 +- .../system-test/fixtures/sample/src/index.js | 26 + .../system-test/fixtures/sample/src/index.ts | 32 + .../system-test/install.ts | 51 + .../test/gapic_service_manager_v1.ts | 2962 ++ .../tsconfig.json | 19 + .../webpack.config.js | 64 + 37 files changed, 66172 insertions(+), 6 deletions(-) create mode 100644 packages/google-api-servicemanagement/.eslintignore create mode 100644 packages/google-api-servicemanagement/.eslintrc.json create mode 100644 packages/google-api-servicemanagement/.gitattributes create mode 100644 packages/google-api-servicemanagement/.gitignore create mode 100644 packages/google-api-servicemanagement/.jsdoc.js create mode 100644 packages/google-api-servicemanagement/.mocharc.js create mode 100644 packages/google-api-servicemanagement/.nycrc create mode 100644 packages/google-api-servicemanagement/.prettierignore create mode 100644 packages/google-api-servicemanagement/.prettierrc.js create mode 100644 packages/google-api-servicemanagement/.repo-metadata.json create mode 100644 packages/google-api-servicemanagement/api-extractor.json create mode 100644 packages/google-api-servicemanagement/linkinator.config.json create mode 100644 packages/google-api-servicemanagement/package.json create mode 100644 packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto create mode 100644 packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto create mode 100644 packages/google-api-servicemanagement/protos/protos.d.ts create mode 100644 packages/google-api-servicemanagement/protos/protos.js create mode 100644 packages/google-api-servicemanagement/protos/protos.json create mode 100644 packages/google-api-servicemanagement/samples/README.md create mode 100644 packages/google-api-servicemanagement/samples/package.json create mode 100644 packages/google-api-servicemanagement/samples/quickstart.js create mode 100644 packages/google-api-servicemanagement/samples/test/quickstart.js create mode 100644 packages/google-api-servicemanagement/src/index.ts create mode 100644 packages/google-api-servicemanagement/src/v1/gapic_metadata.json create mode 100644 packages/google-api-servicemanagement/src/v1/index.ts create mode 100644 packages/google-api-servicemanagement/src/v1/service_manager_client.ts create mode 100644 packages/google-api-servicemanagement/src/v1/service_manager_client_config.json create mode 100644 packages/google-api-servicemanagement/src/v1/service_manager_proto_list.json create mode 100644 packages/google-api-servicemanagement/synth.metadata create mode 100644 packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-api-servicemanagement/system-test/install.ts create mode 100644 packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts create mode 100644 packages/google-api-servicemanagement/tsconfig.json create mode 100644 packages/google-api-servicemanagement/webpack.config.js diff --git a/packages/google-api-servicemanagement/.eslintignore b/packages/google-api-servicemanagement/.eslintignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-api-servicemanagement/.eslintignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-api-servicemanagement/.eslintrc.json b/packages/google-api-servicemanagement/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-api-servicemanagement/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-api-servicemanagement/.gitattributes b/packages/google-api-servicemanagement/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-api-servicemanagement/.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-api-servicemanagement/.gitignore b/packages/google-api-servicemanagement/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-api-servicemanagement/.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-api-servicemanagement/.jsdoc.js b/packages/google-api-servicemanagement/.jsdoc.js new file mode 100644 index 00000000000..ca63d7a439d --- /dev/null +++ b/packages/google-api-servicemanagement/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2021 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: 'servicemanagement', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-api-servicemanagement/.mocharc.js b/packages/google-api-servicemanagement/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-api-servicemanagement/.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-api-servicemanagement/.nycrc b/packages/google-api-servicemanagement/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-api-servicemanagement/.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-api-servicemanagement/.prettierignore b/packages/google-api-servicemanagement/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-api-servicemanagement/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-api-servicemanagement/.prettierrc.js b/packages/google-api-servicemanagement/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-api-servicemanagement/.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-api-servicemanagement/.repo-metadata.json b/packages/google-api-servicemanagement/.repo-metadata.json new file mode 100644 index 00000000000..b7a466eeb25 --- /dev/null +++ b/packages/google-api-servicemanagement/.repo-metadata.json @@ -0,0 +1,14 @@ +{ + "name": "servicemanagement", + "name_pretty": "Service Management API", + "product_documentation": "https://cloud.google.com/service-infrastructure/docs/overview/", + "client_documentation": "https://cloud.google.com/service-infrastructure/docs/service-management/reference", + "issue_tracker": "https://github.com/googleapis/nodejs-service-management/issues", + "release_level": "GA", + "language": "nodejs", + "repo": "googleapis/nodejs-service-management", + "distribution_name": "", + "api_id": "servicemanagement.googleapis.com", + "requires_billing": true +} + diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index 03fa291cc86..6e79d0414da 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -5,7 +5,7 @@ # [Service Management API: Node.js Client](https://github.com/googleapis/nodejs-service-management) [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/servicemanagement.svg)](https://www.npmjs.org/package/servicemanagement) +[![npm version](https://img.shields.io/npm/v/undefined.svg)](https://www.npmjs.org/package/undefined) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-service-management/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-service-management) @@ -51,7 +51,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Installing the client library ```bash -npm install servicemanagement +npm install undefined ``` @@ -62,18 +62,18 @@ npm install servicemanagement // remove this line after package is released // eslint-disable-next-line node/no-missing-require -const = require('@google-api/service-management'); +const {ServiceManagerClient} = require(''); // 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 (); +const client = new {ServiceManagerClient}(); //TODO(library generator): write the actual function you will be testing async function doSomething() { - console.log('Developer! Change this code so that it shows how to use the library! See comments below on structure.') + 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); diff --git a/packages/google-api-servicemanagement/api-extractor.json b/packages/google-api-servicemanagement/api-extractor.json new file mode 100644 index 00000000000..de228294b23 --- /dev/null +++ b/packages/google-api-servicemanagement/api-extractor.json @@ -0,0 +1,369 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/protos/protos.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [ ], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true, + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true, + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true, + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning", + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + }, + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + }, + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } + +} diff --git a/packages/google-api-servicemanagement/linkinator.config.json b/packages/google-api-servicemanagement/linkinator.config.json new file mode 100644 index 00000000000..0947c2e0e5b --- /dev/null +++ b/packages/google-api-servicemanagement/linkinator.config.json @@ -0,0 +1 @@ +{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":10} \ No newline at end of file diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json new file mode 100644 index 00000000000..e29509d1e01 --- /dev/null +++ b/packages/google-api-servicemanagement/package.json @@ -0,0 +1,66 @@ +{ + "name": "undefined", + "version": "0.1.0", + "description": "Servicemanagement client for Node.js", + "repository": "googleapis/nodejs-servicemanagement", + "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 servicemanagement", + "servicemanagement", + "service manager" + ], + "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.10.3" + }, + "devDependencies": { + "@types/mocha": "^8.2.1", + "@types/node": "^14.14.32", + "@types/sinon": "^9.0.11", + "c8": "^7.6.0", + "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.3.1", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^9.2.4", + "ts-loader": "^8.0.17", + "typescript": "^4.2.3", + "webpack": "^5.24.4", + "webpack-cli": "^4.5.0" + }, + "engines": { + "node": ">=v10.24.0" + } +} diff --git a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto new file mode 100644 index 00000000000..37ac30099d1 --- /dev/null +++ b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto @@ -0,0 +1,304 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.api.servicemanagement.v1; + +import "google/api/annotations.proto"; +import "google/api/config_change.proto"; +import "google/api/field_behavior.proto"; +import "google/api/metric.proto"; +import "google/api/quota.proto"; +import "google/api/service.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ServiceManagement.V1"; +option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.api.servicemanagement.v1"; +option objc_class_prefix = "GASM"; +option php_namespace = "Google\\Cloud\\ServiceManagement\\V1"; +option ruby_package = "Google::Cloud::ServiceManagement::V1"; + +// The full representation of a Service that is managed by +// Google Service Management. +message ManagedService { + // The name of the service. See the [overview](/service-management/overview) + // for naming requirements. + string service_name = 2; + + // ID of the project that produces and owns this service. + string producer_project_id = 3; +} + +// The metadata associated with a long running operation resource. +message OperationMetadata { + // Represents the status of one operation step. + message Step { + // The short description of the step. + string description = 2; + + // The status code. + Status status = 4; + } + + // Code describes the status of the operation (or one of its steps). + enum Status { + // Unspecifed code. + STATUS_UNSPECIFIED = 0; + + // The operation or step has completed without errors. + DONE = 1; + + // The operation or step has not started yet. + NOT_STARTED = 2; + + // The operation or step is in progress. + IN_PROGRESS = 3; + + // The operation or step has completed with errors. If the operation is + // rollbackable, the rollback completed with errors too. + FAILED = 4; + + // The operation or step has completed with cancellation. + CANCELLED = 5; + } + + // The full name of the resources that this operation is directly + // associated with. + repeated string resource_names = 1; + + // Detailed status information for each step. The order is undetermined. + repeated Step steps = 2; + + // Percentage of completion of this operation, ranging from 0 to 100. + int32 progress_percentage = 3; + + // The start time of the operation. + google.protobuf.Timestamp start_time = 4; +} + +// Represents a diagnostic message (error or warning) +message Diagnostic { + // The kind of diagnostic information possible. + enum Kind { + // Warnings and errors + WARNING = 0; + + // Only errors + ERROR = 1; + } + + // File name and line number of the error or warning. + string location = 1; + + // The kind of diagnostic information provided. + Kind kind = 2; + + // Message describing the error or warning. + string message = 3; +} + +// Represents a source file which is used to generate the service configuration +// defined by `google.api.Service`. +message ConfigSource { + // A unique ID for a specific instance of this message, typically assigned + // by the client for tracking purpose. If empty, the server may choose to + // generate one instead. + string id = 5; + + // Set of source configuration files that are used to generate a service + // configuration (`google.api.Service`). + repeated ConfigFile files = 2; +} + +// Generic specification of a source configuration file +message ConfigFile { + enum FileType { + // Unknown file type. + FILE_TYPE_UNSPECIFIED = 0; + + // YAML-specification of service. + SERVICE_CONFIG_YAML = 1; + + // OpenAPI specification, serialized in JSON. + OPEN_API_JSON = 2; + + // OpenAPI specification, serialized in YAML. + OPEN_API_YAML = 3; + + // FileDescriptorSet, generated by protoc. + // + // To generate, use protoc with imports and source info included. + // For an example test.proto file, the following command would put the value + // in a new file named out.pb. + // + // $protoc --include_imports --include_source_info test.proto -o out.pb + FILE_DESCRIPTOR_SET_PROTO = 4; + + // Uncompiled Proto file. Used for storage and display purposes only, + // currently server-side compilation is not supported. Should match the + // inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A + // file of this type can only be included if at least one file of type + // FILE_DESCRIPTOR_SET_PROTO is included. + PROTO_FILE = 6; + } + + // The file name of the configuration file (full or relative path). + string file_path = 1; + + // The bytes that constitute the file. + bytes file_contents = 3; + + // The type of configuration file this represents. + FileType file_type = 4; +} + +// Represents a service configuration with its name and id. +message ConfigRef { + // Resource name of a service config. It must have the following + // format: "services/{service name}/configs/{config id}". + string name = 1; +} + +// Change report associated with a particular service configuration. +// +// It contains a list of ConfigChanges based on the comparison between +// two service configurations. +message ChangeReport { + // List of changes between two service configurations. + // The changes will be alphabetically sorted based on the identifier + // of each change. + // A ConfigChange identifier is a dot separated path to the configuration. + // Example: visibility.rules[selector='LibraryService.CreateBook'].restriction + repeated google.api.ConfigChange config_changes = 1; +} + +// A rollout resource that defines how service configuration versions are pushed +// to control plane systems. Typically, you create a new version of the +// service config, and then create a Rollout to push the service config. +message Rollout { + // Strategy that specifies how clients of Google Service Controller want to + // send traffic to use different config versions. This is generally + // used by API proxy to split traffic based on your configured percentage for + // each config version. + // + // One example of how to gradually rollout a new service configuration using + // this + // strategy: + // Day 1 + // + // Rollout { + // id: "example.googleapis.com/rollout_20160206" + // traffic_percent_strategy { + // percentages: { + // "example.googleapis.com/20160201": 70.00 + // "example.googleapis.com/20160206": 30.00 + // } + // } + // } + // + // Day 2 + // + // Rollout { + // id: "example.googleapis.com/rollout_20160207" + // traffic_percent_strategy: { + // percentages: { + // "example.googleapis.com/20160206": 100.00 + // } + // } + // } + message TrafficPercentStrategy { + // Maps service configuration IDs to their corresponding traffic percentage. + // Key is the service configuration ID, Value is the traffic percentage + // which must be greater than 0.0 and the sum must equal to 100.0. + map percentages = 1; + } + + // Strategy used to delete a service. This strategy is a placeholder only + // used by the system generated rollout to delete a service. + message DeleteServiceStrategy { + + } + + // Status of a Rollout. + enum RolloutStatus { + // No status specified. + ROLLOUT_STATUS_UNSPECIFIED = 0; + + // The Rollout is in progress. + IN_PROGRESS = 1; + + // The Rollout has completed successfully. + SUCCESS = 2; + + // The Rollout has been cancelled. This can happen if you have overlapping + // Rollout pushes, and the previous ones will be cancelled. + CANCELLED = 3; + + // The Rollout has failed and the rollback attempt has failed too. + FAILED = 4; + + // The Rollout has not started yet and is pending for execution. + PENDING = 5; + + // The Rollout has failed and rolled back to the previous successful + // Rollout. + FAILED_ROLLED_BACK = 6; + } + + // Optional. Unique identifier of this Rollout. Must be no longer than 63 characters + // and only lower case letters, digits, '.', '_' and '-' are allowed. + // + // If not specified by client, the server will generate one. The generated id + // will have the form of , where "date" is the create + // date in ISO 8601 format. "revision number" is a monotonically increasing + // positive number that is reset every day for each service. + // An example of the generated rollout_id is '2016-02-16r1' + string rollout_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Creation time of the rollout. Readonly. + google.protobuf.Timestamp create_time = 2; + + // The user who created the Rollout. Readonly. + string created_by = 3; + + // The status of this rollout. Readonly. In case of a failed rollout, + // the system will automatically rollback to the current Rollout + // version. Readonly. + RolloutStatus status = 4; + + // Strategy that defines which versions of service configurations should be + // pushed + // and how they should be used at runtime. + oneof strategy { + // Google Service Control selects service configurations based on + // traffic percentage. + TrafficPercentStrategy traffic_percent_strategy = 5; + + // The strategy associated with a rollout to delete a `ManagedService`. + // Readonly. + DeleteServiceStrategy delete_service_strategy = 200; + } + + // The name of the service associated with this Rollout. + string service_name = 8; +} diff --git a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto new file mode 100644 index 00000000000..f94739fbe37 --- /dev/null +++ b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto @@ -0,0 +1,560 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api.servicemanagement.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/service.proto"; +import "google/api/servicemanagement/v1/resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ServiceManagement.V1"; +option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement"; +option java_multiple_files = true; +option java_outer_classname = "ServiceManagerProto"; +option java_package = "com.google.api.servicemanagement.v1"; +option objc_class_prefix = "GASM"; +option php_namespace = "Google\\Cloud\\ServiceManagement\\V1"; +option ruby_package = "Google::Cloud::ServiceManagement::V1"; + +// [Google Service Management API](/service-management/overview) +service ServiceManager { + option (google.api.default_host) = "servicemanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/service.management," + "https://www.googleapis.com/auth/service.management.readonly"; + + // Lists managed services. + // + // Returns all public services. For authenticated users, also returns all + // services the calling user has "servicemanagement.services.get" permission + // for. + // + // **BETA:** If the caller specifies the `consumer_id`, it returns only the + // services enabled on the consumer. The `consumer_id` must have the format + // of "project:{PROJECT-ID}". + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v1/services" + }; + option (google.api.method_signature) = "producer_project_id,consumer_id"; + } + + // Gets a managed service. Authentication is required unless the service is + // public. + rpc GetService(GetServiceRequest) returns (ManagedService) { + option (google.api.http) = { + get: "/v1/services/{service_name}" + }; + option (google.api.method_signature) = "service_name"; + } + + // Creates a new managed service. + // Please note one producer project can own no more than 20 services. + // + // Operation + rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/services" + body: "service" + }; + option (google.api.method_signature) = "service"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.ManagedService" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Deletes a managed service. This method will change the service to the + // `Soft-Delete` state for 30 days. Within this period, service producers may + // call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service. + // After 30 days, the service will be permanently deleted. + // + // Operation + rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/services/{service_name}" + }; + option (google.api.method_signature) = "service_name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Revives a previously deleted managed service. The method restores the + // service using the configuration at the time the service was deleted. + // The target service must exist and must have been deleted within the + // last 30 days. + // + // Operation + rpc UndeleteService(UndeleteServiceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/services/{service_name}:undelete" + }; + option (google.api.method_signature) = "service_name"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.UndeleteServiceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Lists the history of the service configuration for a managed service, + // from the newest to the oldest. + rpc ListServiceConfigs(ListServiceConfigsRequest) returns (ListServiceConfigsResponse) { + option (google.api.http) = { + get: "/v1/services/{service_name}/configs" + }; + option (google.api.method_signature) = "service_name"; + } + + // Gets a service configuration (version) for a managed service. + rpc GetServiceConfig(GetServiceConfigRequest) returns (google.api.Service) { + option (google.api.http) = { + get: "/v1/services/{service_name}/configs/{config_id}" + additional_bindings { + get: "/v1/services/{service_name}/config" + } + }; + option (google.api.method_signature) = "service_name,config_id,view"; + } + + // Creates a new service configuration (version) for a managed service. + // This method only stores the service configuration. To roll out the service + // configuration to backend systems please call + // [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + // + // Only the 100 most recent service configurations and ones referenced by + // existing rollouts are kept for each service. The rest will be deleted + // eventually. + rpc CreateServiceConfig(CreateServiceConfigRequest) returns (google.api.Service) { + option (google.api.http) = { + post: "/v1/services/{service_name}/configs" + body: "service_config" + }; + option (google.api.method_signature) = "service_name,service_config"; + } + + // Creates a new service configuration (version) for a managed service based + // on + // user-supplied configuration source files (for example: OpenAPI + // Specification). This method stores the source configurations as well as the + // generated service configuration. To rollout the service configuration to + // other services, + // please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + // + // Only the 100 most recent configuration sources and ones referenced by + // existing service configurtions are kept for each service. The rest will be + // deleted eventually. + // + // Operation + rpc SubmitConfigSource(SubmitConfigSourceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/services/{service_name}/configs:submit" + body: "*" + }; + option (google.api.method_signature) = "service_name,config_source,validate_only"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.SubmitConfigSourceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Lists the history of the service configuration rollouts for a managed + // service, from the newest to the oldest. + rpc ListServiceRollouts(ListServiceRolloutsRequest) returns (ListServiceRolloutsResponse) { + option (google.api.http) = { + get: "/v1/services/{service_name}/rollouts" + }; + option (google.api.method_signature) = "service_name,filter"; + } + + // Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout]. + rpc GetServiceRollout(GetServiceRolloutRequest) returns (Rollout) { + option (google.api.http) = { + get: "/v1/services/{service_name}/rollouts/{rollout_id}" + }; + option (google.api.method_signature) = "service_name,rollout_id"; + } + + // Creates a new service configuration rollout. Based on rollout, the + // Google Service Management will roll out the service configurations to + // different backend services. For example, the logging configuration will be + // pushed to Google Cloud Logging. + // + // Please note that any previous pending and running Rollouts and associated + // Operations will be automatically cancelled so that the latest Rollout will + // not be blocked by previous Rollouts. + // + // Only the 100 most recent (in any state) and the last 10 successful (if not + // already part of the set of 100 most recent) rollouts are kept for each + // service. The rest will be deleted eventually. + // + // Operation + rpc CreateServiceRollout(CreateServiceRolloutRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/services/{service_name}/rollouts" + body: "rollout" + }; + option (google.api.method_signature) = "service_name,rollout"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.Rollout" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Generates and returns a report (errors, warnings and changes from + // existing configurations) associated with + // GenerateConfigReportRequest.new_value + // + // If GenerateConfigReportRequest.old_value is specified, + // GenerateConfigReportRequest will contain a single ChangeReport based on the + // comparison between GenerateConfigReportRequest.new_value and + // GenerateConfigReportRequest.old_value. + // If GenerateConfigReportRequest.old_value is not specified, this method + // will compare GenerateConfigReportRequest.new_value with the last pushed + // service configuration. + rpc GenerateConfigReport(GenerateConfigReportRequest) returns (GenerateConfigReportResponse) { + option (google.api.http) = { + post: "/v1/services:generateConfigReport" + body: "*" + }; + option (google.api.method_signature) = "new_config,old_config"; + } + + // Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used + // for the project. See + // [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for + // more information. + // + // Operation + rpc EnableService(EnableServiceRequest) returns (google.longrunning.Operation) { + option deprecated = true; + option (google.api.http) = { + post: "/v1/services/{service_name}:enable" + body: "*" + }; + option (google.api.method_signature) = "service_name,consumer_id"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.EnableServiceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be + // be used for the project. It prevents accidental usage that may cause + // unexpected billing charges or security leaks. + // + // Operation + rpc DisableService(DisableServiceRequest) returns (google.longrunning.Operation) { + option deprecated = true; + option (google.api.http) = { + post: "/v1/services/{service_name}:disable" + body: "*" + }; + option (google.api.method_signature) = "service_name,consumer_id"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.DisableServiceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } +} + +// Request message for `ListServices` method. +message ListServicesRequest { + // Include services produced by the specified project. + string producer_project_id = 1; + + // The max number of items to include in the response list. Page size is 50 + // if not specified. Maximum value is 100. + int32 page_size = 5; + + // Token identifying which result to start with; returned by a previous list + // call. + string page_token = 6; + + // Include services consumed by the specified consumer. + // + // The Google Service Management implementation accepts the following + // forms: + // - project: + string consumer_id = 7 [deprecated = true]; +} + +// Response message for `ListServices` method. +message ListServicesResponse { + // The returned services will only have the name field set. + repeated ManagedService services = 1; + + // Token that can be passed to `ListServices` to resume a paginated query. + string next_page_token = 2; +} + +// Request message for `GetService` method. +message GetServiceRequest { + // Required. The name of the service. See the `ServiceManager` overview for naming + // requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CreateService method. +message CreateServiceRequest { + // Required. Initial values for the service resource. + ManagedService service = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteService method. +message DeleteServiceRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UndeleteService method. +message UndeleteServiceRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for UndeleteService method. +message UndeleteServiceResponse { + // Revived service resource. + ManagedService service = 1; +} + +// Request message for GetServiceConfig method. +message GetServiceConfigRequest { + enum ConfigView { + // Server response includes all fields except SourceInfo. + BASIC = 0; + + // Server response includes all fields including SourceInfo. + // SourceFiles are of type 'google.api.servicemanagement.v1.ConfigFile' + // and are only available for configs created using the + // SubmitConfigSource method. + FULL = 1; + } + + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The id of the service configuration resource. + // + // This field must be specified for the server to return all fields, including + // `SourceInfo`. + string config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Specifies which parts of the Service Config should be returned in the + // response. + ConfigView view = 3; +} + +// Request message for ListServiceConfigs method. +message ListServiceConfigsRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The token of the page to retrieve. + string page_token = 2; + + // The max number of items to include in the response list. Page size is 50 + // if not specified. Maximum value is 100. + int32 page_size = 3; +} + +// Response message for ListServiceConfigs method. +message ListServiceConfigsResponse { + // The list of service configuration resources. + repeated google.api.Service service_configs = 1; + + // The token of the next page of results. + string next_page_token = 2; +} + +// Request message for CreateServiceConfig method. +message CreateServiceConfigRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The service configuration resource. + google.api.Service service_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for SubmitConfigSource method. +message SubmitConfigSourceRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The source configuration for the service. + ConfigSource config_source = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, this will result in the generation of a + // `google.api.Service` configuration based on the `ConfigSource` provided, + // but the generated config and the sources will NOT be persisted. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for SubmitConfigSource method. +message SubmitConfigSourceResponse { + // The generated service configuration. + google.api.Service service_config = 1; +} + +// Request message for 'CreateServiceRollout' +message CreateServiceRolloutRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The rollout resource. The `service_name` field is output only. + Rollout rollout = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for 'ListServiceRollouts' +message ListServiceRolloutsRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The token of the page to retrieve. + string page_token = 2; + + // The max number of items to include in the response list. Page size is 50 + // if not specified. Maximum value is 100. + int32 page_size = 3; + + // Required. Use `filter` to return subset of rollouts. + // The following filters are supported: + // -- To limit the results to only those in + // [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + // use filter='status=SUCCESS' + // -- To limit the results to those in + // [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + // or 'FAILED', use filter='status=CANCELLED OR status=FAILED' + string filter = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for ListServiceRollouts method. +message ListServiceRolloutsResponse { + // The list of rollout resources. + repeated Rollout rollouts = 1; + + // The token of the next page of results. + string next_page_token = 2; +} + +// Request message for GetServiceRollout method. +message GetServiceRolloutRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The id of the rollout resource. + string rollout_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for EnableService method. +message EnableServiceRequest { + // Required. Name of the service to enable. Specifying an unknown service name will + // cause the request to fail. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The identity of consumer resource which service enablement will be + // applied to. + // + // The Google Service Management implementation accepts the following + // forms: + // - "project:" + // + // Note: this is made compatible with + // google.api.servicecontrol.v1.Operation.consumer_id. + string consumer_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Operation payload for EnableService method. +message EnableServiceResponse { + +} + +// Request message for DisableService method. +message DisableServiceRequest { + // Required. Name of the service to disable. Specifying an unknown service name + // will cause the request to fail. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The identity of consumer resource which service disablement will be + // applied to. + // + // The Google Service Management implementation accepts the following + // forms: + // - "project:" + // + // Note: this is made compatible with + // google.api.servicecontrol.v1.Operation.consumer_id. + string consumer_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Operation payload for DisableService method. +message DisableServiceResponse { + +} + +// Request message for GenerateConfigReport method. +message GenerateConfigReportRequest { + // Required. Service configuration for which we want to generate the report. + // For this version of API, the supported types are + // [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef], + // [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource], + // and [google.api.Service][google.api.Service] + google.protobuf.Any new_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Service configuration against which the comparison will be done. + // For this version of API, the supported types are + // [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef], + // [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource], + // and [google.api.Service][google.api.Service] + google.protobuf.Any old_config = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for GenerateConfigReport method. +message GenerateConfigReportResponse { + // Name of the service this report belongs to. + string service_name = 1; + + // ID of the service configuration this report belongs to. + string id = 2; + + // list of ChangeReport, each corresponding to comparison between two + // service configurations. + repeated ChangeReport change_reports = 3; + + // Errors / Linter warnings associated with the service definition this + // report + // belongs to. + repeated Diagnostic diagnostics = 4; +} diff --git a/packages/google-api-servicemanagement/protos/protos.d.ts b/packages/google-api-servicemanagement/protos/protos.d.ts new file mode 100644 index 00000000000..69c7f48618a --- /dev/null +++ b/packages/google-api-servicemanagement/protos/protos.d.ts @@ -0,0 +1,15529 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as Long from "long"; +import {protobuf as $protobuf} from "google-gax"; +/** Namespace google. */ +export namespace google { + + /** Namespace api. */ + namespace api { + + /** Namespace servicemanagement. */ + namespace servicemanagement { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a ManagedService. */ + interface IManagedService { + + /** ManagedService serviceName */ + serviceName?: (string|null); + + /** ManagedService producerProjectId */ + producerProjectId?: (string|null); + } + + /** Represents a ManagedService. */ + class ManagedService implements IManagedService { + + /** + * Constructs a new ManagedService. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IManagedService); + + /** ManagedService serviceName. */ + public serviceName: string; + + /** ManagedService producerProjectId. */ + public producerProjectId: string; + + /** + * Creates a new ManagedService instance using the specified properties. + * @param [properties] Properties to set + * @returns ManagedService instance + */ + public static create(properties?: google.api.servicemanagement.v1.IManagedService): google.api.servicemanagement.v1.ManagedService; + + /** + * Encodes the specified ManagedService message. Does not implicitly {@link google.api.servicemanagement.v1.ManagedService.verify|verify} messages. + * @param message ManagedService message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IManagedService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManagedService message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ManagedService.verify|verify} messages. + * @param message ManagedService message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IManagedService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManagedService message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManagedService + * @throws {Error} If the payload is not 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.servicemanagement.v1.ManagedService; + + /** + * Decodes a ManagedService message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManagedService + * @throws {Error} If the payload 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.servicemanagement.v1.ManagedService; + + /** + * Verifies a ManagedService message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ManagedService message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManagedService + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.ManagedService; + + /** + * Creates a plain object from a ManagedService message. Also converts values to other types if specified. + * @param message ManagedService + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.ManagedService, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManagedService to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata resourceNames */ + resourceNames?: (string[]|null); + + /** OperationMetadata steps */ + steps?: (google.api.servicemanagement.v1.OperationMetadata.IStep[]|null); + + /** OperationMetadata progressPercentage */ + progressPercentage?: (number|null); + + /** OperationMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IOperationMetadata); + + /** OperationMetadata resourceNames. */ + public resourceNames: string[]; + + /** OperationMetadata steps. */ + public steps: google.api.servicemanagement.v1.OperationMetadata.IStep[]; + + /** OperationMetadata progressPercentage. */ + public progressPercentage: number; + + /** OperationMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.api.servicemanagement.v1.IOperationMetadata): google.api.servicemanagement.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.api.servicemanagement.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.api.servicemanagement.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.api.servicemanagement.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.api.servicemanagement.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.api.servicemanagement.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.api.servicemanagement.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.api.servicemanagement.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.api.servicemanagement.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OperationMetadata { + + /** Properties of a Step. */ + interface IStep { + + /** Step description */ + description?: (string|null); + + /** Step status */ + status?: (google.api.servicemanagement.v1.OperationMetadata.Status|keyof typeof google.api.servicemanagement.v1.OperationMetadata.Status|null); + } + + /** Represents a Step. */ + class Step implements IStep { + + /** + * Constructs a new Step. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.OperationMetadata.IStep); + + /** Step description. */ + public description: string; + + /** Step status. */ + public status: (google.api.servicemanagement.v1.OperationMetadata.Status|keyof typeof google.api.servicemanagement.v1.OperationMetadata.Status); + + /** + * Creates a new Step instance using the specified properties. + * @param [properties] Properties to set + * @returns Step instance + */ + public static create(properties?: google.api.servicemanagement.v1.OperationMetadata.IStep): google.api.servicemanagement.v1.OperationMetadata.Step; + + /** + * Encodes the specified Step message. Does not implicitly {@link google.api.servicemanagement.v1.OperationMetadata.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.OperationMetadata.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.OperationMetadata.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.OperationMetadata.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Step message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Step + * @throws {Error} If the payload is not 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.servicemanagement.v1.OperationMetadata.Step; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Step + * @throws {Error} If the payload 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.servicemanagement.v1.OperationMetadata.Step; + + /** + * Verifies a Step message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Step + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.OperationMetadata.Step; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @param message Step + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.OperationMetadata.Step, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Step to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Status enum. */ + enum Status { + STATUS_UNSPECIFIED = 0, + DONE = 1, + NOT_STARTED = 2, + IN_PROGRESS = 3, + FAILED = 4, + CANCELLED = 5 + } + } + + /** Properties of a Diagnostic. */ + interface IDiagnostic { + + /** Diagnostic location */ + location?: (string|null); + + /** Diagnostic kind */ + kind?: (google.api.servicemanagement.v1.Diagnostic.Kind|keyof typeof google.api.servicemanagement.v1.Diagnostic.Kind|null); + + /** Diagnostic message */ + message?: (string|null); + } + + /** Represents a Diagnostic. */ + class Diagnostic implements IDiagnostic { + + /** + * Constructs a new Diagnostic. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IDiagnostic); + + /** Diagnostic location. */ + public location: string; + + /** Diagnostic kind. */ + public kind: (google.api.servicemanagement.v1.Diagnostic.Kind|keyof typeof google.api.servicemanagement.v1.Diagnostic.Kind); + + /** Diagnostic message. */ + public message: string; + + /** + * Creates a new Diagnostic instance using the specified properties. + * @param [properties] Properties to set + * @returns Diagnostic instance + */ + public static create(properties?: google.api.servicemanagement.v1.IDiagnostic): google.api.servicemanagement.v1.Diagnostic; + + /** + * Encodes the specified Diagnostic message. Does not implicitly {@link google.api.servicemanagement.v1.Diagnostic.verify|verify} messages. + * @param message Diagnostic message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IDiagnostic, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Diagnostic message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.Diagnostic.verify|verify} messages. + * @param message Diagnostic message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IDiagnostic, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Diagnostic message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Diagnostic + * @throws {Error} If the payload is not 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.servicemanagement.v1.Diagnostic; + + /** + * Decodes a Diagnostic message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Diagnostic + * @throws {Error} If the payload 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.servicemanagement.v1.Diagnostic; + + /** + * Verifies a Diagnostic message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Diagnostic message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Diagnostic + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.Diagnostic; + + /** + * Creates a plain object from a Diagnostic message. Also converts values to other types if specified. + * @param message Diagnostic + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.Diagnostic, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Diagnostic to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Diagnostic { + + /** Kind enum. */ + enum Kind { + WARNING = 0, + ERROR = 1 + } + } + + /** Properties of a ConfigSource. */ + interface IConfigSource { + + /** ConfigSource id */ + id?: (string|null); + + /** ConfigSource files */ + files?: (google.api.servicemanagement.v1.IConfigFile[]|null); + } + + /** Represents a ConfigSource. */ + class ConfigSource implements IConfigSource { + + /** + * Constructs a new ConfigSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IConfigSource); + + /** ConfigSource id. */ + public id: string; + + /** ConfigSource files. */ + public files: google.api.servicemanagement.v1.IConfigFile[]; + + /** + * Creates a new ConfigSource instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigSource instance + */ + public static create(properties?: google.api.servicemanagement.v1.IConfigSource): google.api.servicemanagement.v1.ConfigSource; + + /** + * Encodes the specified ConfigSource message. Does not implicitly {@link google.api.servicemanagement.v1.ConfigSource.verify|verify} messages. + * @param message ConfigSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IConfigSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfigSource message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ConfigSource.verify|verify} messages. + * @param message ConfigSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IConfigSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfigSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigSource + * @throws {Error} If the payload is not 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.servicemanagement.v1.ConfigSource; + + /** + * Decodes a ConfigSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigSource + * @throws {Error} If the payload 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.servicemanagement.v1.ConfigSource; + + /** + * Verifies a ConfigSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfigSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigSource + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.ConfigSource; + + /** + * Creates a plain object from a ConfigSource message. Also converts values to other types if specified. + * @param message ConfigSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.ConfigSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ConfigFile. */ + interface IConfigFile { + + /** ConfigFile filePath */ + filePath?: (string|null); + + /** ConfigFile fileContents */ + fileContents?: (Uint8Array|string|null); + + /** ConfigFile fileType */ + fileType?: (google.api.servicemanagement.v1.ConfigFile.FileType|keyof typeof google.api.servicemanagement.v1.ConfigFile.FileType|null); + } + + /** Represents a ConfigFile. */ + class ConfigFile implements IConfigFile { + + /** + * Constructs a new ConfigFile. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IConfigFile); + + /** ConfigFile filePath. */ + public filePath: string; + + /** ConfigFile fileContents. */ + public fileContents: (Uint8Array|string); + + /** ConfigFile fileType. */ + public fileType: (google.api.servicemanagement.v1.ConfigFile.FileType|keyof typeof google.api.servicemanagement.v1.ConfigFile.FileType); + + /** + * Creates a new ConfigFile instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigFile instance + */ + public static create(properties?: google.api.servicemanagement.v1.IConfigFile): google.api.servicemanagement.v1.ConfigFile; + + /** + * Encodes the specified ConfigFile message. Does not implicitly {@link google.api.servicemanagement.v1.ConfigFile.verify|verify} messages. + * @param message ConfigFile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IConfigFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfigFile message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ConfigFile.verify|verify} messages. + * @param message ConfigFile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IConfigFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfigFile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigFile + * @throws {Error} If the payload is not 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.servicemanagement.v1.ConfigFile; + + /** + * Decodes a ConfigFile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigFile + * @throws {Error} If the payload 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.servicemanagement.v1.ConfigFile; + + /** + * Verifies a ConfigFile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfigFile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigFile + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.ConfigFile; + + /** + * Creates a plain object from a ConfigFile message. Also converts values to other types if specified. + * @param message ConfigFile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.ConfigFile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigFile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ConfigFile { + + /** FileType enum. */ + enum FileType { + FILE_TYPE_UNSPECIFIED = 0, + SERVICE_CONFIG_YAML = 1, + OPEN_API_JSON = 2, + OPEN_API_YAML = 3, + FILE_DESCRIPTOR_SET_PROTO = 4, + PROTO_FILE = 6 + } + } + + /** Properties of a ConfigRef. */ + interface IConfigRef { + + /** ConfigRef name */ + name?: (string|null); + } + + /** Represents a ConfigRef. */ + class ConfigRef implements IConfigRef { + + /** + * Constructs a new ConfigRef. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IConfigRef); + + /** ConfigRef name. */ + public name: string; + + /** + * Creates a new ConfigRef instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigRef instance + */ + public static create(properties?: google.api.servicemanagement.v1.IConfigRef): google.api.servicemanagement.v1.ConfigRef; + + /** + * Encodes the specified ConfigRef message. Does not implicitly {@link google.api.servicemanagement.v1.ConfigRef.verify|verify} messages. + * @param message ConfigRef message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IConfigRef, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfigRef message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ConfigRef.verify|verify} messages. + * @param message ConfigRef message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IConfigRef, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfigRef message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigRef + * @throws {Error} If the payload is not 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.servicemanagement.v1.ConfigRef; + + /** + * Decodes a ConfigRef message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigRef + * @throws {Error} If the payload 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.servicemanagement.v1.ConfigRef; + + /** + * Verifies a ConfigRef message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfigRef message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigRef + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.ConfigRef; + + /** + * Creates a plain object from a ConfigRef message. Also converts values to other types if specified. + * @param message ConfigRef + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.ConfigRef, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigRef to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ChangeReport. */ + interface IChangeReport { + + /** ChangeReport configChanges */ + configChanges?: (google.api.IConfigChange[]|null); + } + + /** Represents a ChangeReport. */ + class ChangeReport implements IChangeReport { + + /** + * Constructs a new ChangeReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IChangeReport); + + /** ChangeReport configChanges. */ + public configChanges: google.api.IConfigChange[]; + + /** + * Creates a new ChangeReport instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeReport instance + */ + public static create(properties?: google.api.servicemanagement.v1.IChangeReport): google.api.servicemanagement.v1.ChangeReport; + + /** + * Encodes the specified ChangeReport message. Does not implicitly {@link google.api.servicemanagement.v1.ChangeReport.verify|verify} messages. + * @param message ChangeReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IChangeReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeReport message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ChangeReport.verify|verify} messages. + * @param message ChangeReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IChangeReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChangeReport + * @throws {Error} If the payload is not 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.servicemanagement.v1.ChangeReport; + + /** + * Decodes a ChangeReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChangeReport + * @throws {Error} If the payload 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.servicemanagement.v1.ChangeReport; + + /** + * Verifies a ChangeReport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeReport + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.ChangeReport; + + /** + * Creates a plain object from a ChangeReport message. Also converts values to other types if specified. + * @param message ChangeReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.ChangeReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Rollout. */ + interface IRollout { + + /** Rollout rolloutId */ + rolloutId?: (string|null); + + /** Rollout createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Rollout createdBy */ + createdBy?: (string|null); + + /** Rollout status */ + status?: (google.api.servicemanagement.v1.Rollout.RolloutStatus|keyof typeof google.api.servicemanagement.v1.Rollout.RolloutStatus|null); + + /** Rollout trafficPercentStrategy */ + trafficPercentStrategy?: (google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy|null); + + /** Rollout deleteServiceStrategy */ + deleteServiceStrategy?: (google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy|null); + + /** Rollout serviceName */ + serviceName?: (string|null); + } + + /** Represents a Rollout. */ + class Rollout implements IRollout { + + /** + * Constructs a new Rollout. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IRollout); + + /** Rollout rolloutId. */ + public rolloutId: string; + + /** Rollout createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Rollout createdBy. */ + public createdBy: string; + + /** Rollout status. */ + public status: (google.api.servicemanagement.v1.Rollout.RolloutStatus|keyof typeof google.api.servicemanagement.v1.Rollout.RolloutStatus); + + /** Rollout trafficPercentStrategy. */ + public trafficPercentStrategy?: (google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy|null); + + /** Rollout deleteServiceStrategy. */ + public deleteServiceStrategy?: (google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy|null); + + /** Rollout serviceName. */ + public serviceName: string; + + /** Rollout strategy. */ + public strategy?: ("trafficPercentStrategy"|"deleteServiceStrategy"); + + /** + * Creates a new Rollout instance using the specified properties. + * @param [properties] Properties to set + * @returns Rollout instance + */ + public static create(properties?: google.api.servicemanagement.v1.IRollout): google.api.servicemanagement.v1.Rollout; + + /** + * Encodes the specified Rollout message. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.verify|verify} messages. + * @param message Rollout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.verify|verify} messages. + * @param message Rollout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rollout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.servicemanagement.v1.Rollout; + + /** + * Decodes a Rollout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.servicemanagement.v1.Rollout; + + /** + * Verifies a Rollout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rollout + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.Rollout; + + /** + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @param message Rollout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.Rollout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rollout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Rollout { + + /** Properties of a TrafficPercentStrategy. */ + interface ITrafficPercentStrategy { + + /** TrafficPercentStrategy percentages */ + percentages?: ({ [k: string]: number }|null); + } + + /** Represents a TrafficPercentStrategy. */ + class TrafficPercentStrategy implements ITrafficPercentStrategy { + + /** + * Constructs a new TrafficPercentStrategy. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy); + + /** TrafficPercentStrategy percentages. */ + public percentages: { [k: string]: number }; + + /** + * Creates a new TrafficPercentStrategy instance using the specified properties. + * @param [properties] Properties to set + * @returns TrafficPercentStrategy instance + */ + public static create(properties?: google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy): google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy; + + /** + * Encodes the specified TrafficPercentStrategy message. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.verify|verify} messages. + * @param message TrafficPercentStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TrafficPercentStrategy message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.verify|verify} messages. + * @param message TrafficPercentStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TrafficPercentStrategy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TrafficPercentStrategy + * @throws {Error} If the payload is not 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.servicemanagement.v1.Rollout.TrafficPercentStrategy; + + /** + * Decodes a TrafficPercentStrategy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TrafficPercentStrategy + * @throws {Error} If the payload 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.servicemanagement.v1.Rollout.TrafficPercentStrategy; + + /** + * Verifies a TrafficPercentStrategy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TrafficPercentStrategy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TrafficPercentStrategy + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy; + + /** + * Creates a plain object from a TrafficPercentStrategy message. Also converts values to other types if specified. + * @param message TrafficPercentStrategy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TrafficPercentStrategy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteServiceStrategy. */ + interface IDeleteServiceStrategy { + } + + /** Represents a DeleteServiceStrategy. */ + class DeleteServiceStrategy implements IDeleteServiceStrategy { + + /** + * Constructs a new DeleteServiceStrategy. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy); + + /** + * Creates a new DeleteServiceStrategy instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteServiceStrategy instance + */ + public static create(properties?: google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy): google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy; + + /** + * Encodes the specified DeleteServiceStrategy message. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.verify|verify} messages. + * @param message DeleteServiceStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteServiceStrategy message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.verify|verify} messages. + * @param message DeleteServiceStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteServiceStrategy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteServiceStrategy + * @throws {Error} If the payload is not 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.servicemanagement.v1.Rollout.DeleteServiceStrategy; + + /** + * Decodes a DeleteServiceStrategy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteServiceStrategy + * @throws {Error} If the payload 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.servicemanagement.v1.Rollout.DeleteServiceStrategy; + + /** + * Verifies a DeleteServiceStrategy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteServiceStrategy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteServiceStrategy + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy; + + /** + * Creates a plain object from a DeleteServiceStrategy message. Also converts values to other types if specified. + * @param message DeleteServiceStrategy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteServiceStrategy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** RolloutStatus enum. */ + enum RolloutStatus { + ROLLOUT_STATUS_UNSPECIFIED = 0, + IN_PROGRESS = 1, + SUCCESS = 2, + CANCELLED = 3, + FAILED = 4, + PENDING = 5, + FAILED_ROLLED_BACK = 6 + } + } + + /** Represents a ServiceManager */ + class ServiceManager extends $protobuf.rpc.Service { + + /** + * Constructs a new ServiceManager 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 ServiceManager 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): ServiceManager; + + /** + * Calls ListServices. + * @param request ListServicesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListServicesResponse + */ + public listServices(request: google.api.servicemanagement.v1.IListServicesRequest, callback: google.api.servicemanagement.v1.ServiceManager.ListServicesCallback): void; + + /** + * Calls ListServices. + * @param request ListServicesRequest message or plain object + * @returns Promise + */ + public listServices(request: google.api.servicemanagement.v1.IListServicesRequest): Promise; + + /** + * Calls GetService. + * @param request GetServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ManagedService + */ + public getService(request: google.api.servicemanagement.v1.IGetServiceRequest, callback: google.api.servicemanagement.v1.ServiceManager.GetServiceCallback): void; + + /** + * Calls GetService. + * @param request GetServiceRequest message or plain object + * @returns Promise + */ + public getService(request: google.api.servicemanagement.v1.IGetServiceRequest): Promise; + + /** + * Calls CreateService. + * @param request CreateServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createService(request: google.api.servicemanagement.v1.ICreateServiceRequest, callback: google.api.servicemanagement.v1.ServiceManager.CreateServiceCallback): void; + + /** + * Calls CreateService. + * @param request CreateServiceRequest message or plain object + * @returns Promise + */ + public createService(request: google.api.servicemanagement.v1.ICreateServiceRequest): Promise; + + /** + * Calls DeleteService. + * @param request DeleteServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteService(request: google.api.servicemanagement.v1.IDeleteServiceRequest, callback: google.api.servicemanagement.v1.ServiceManager.DeleteServiceCallback): void; + + /** + * Calls DeleteService. + * @param request DeleteServiceRequest message or plain object + * @returns Promise + */ + public deleteService(request: google.api.servicemanagement.v1.IDeleteServiceRequest): Promise; + + /** + * Calls UndeleteService. + * @param request UndeleteServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public undeleteService(request: google.api.servicemanagement.v1.IUndeleteServiceRequest, callback: google.api.servicemanagement.v1.ServiceManager.UndeleteServiceCallback): void; + + /** + * Calls UndeleteService. + * @param request UndeleteServiceRequest message or plain object + * @returns Promise + */ + public undeleteService(request: google.api.servicemanagement.v1.IUndeleteServiceRequest): Promise; + + /** + * Calls ListServiceConfigs. + * @param request ListServiceConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListServiceConfigsResponse + */ + public listServiceConfigs(request: google.api.servicemanagement.v1.IListServiceConfigsRequest, callback: google.api.servicemanagement.v1.ServiceManager.ListServiceConfigsCallback): void; + + /** + * Calls ListServiceConfigs. + * @param request ListServiceConfigsRequest message or plain object + * @returns Promise + */ + public listServiceConfigs(request: google.api.servicemanagement.v1.IListServiceConfigsRequest): Promise; + + /** + * Calls GetServiceConfig. + * @param request GetServiceConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Service + */ + public getServiceConfig(request: google.api.servicemanagement.v1.IGetServiceConfigRequest, callback: google.api.servicemanagement.v1.ServiceManager.GetServiceConfigCallback): void; + + /** + * Calls GetServiceConfig. + * @param request GetServiceConfigRequest message or plain object + * @returns Promise + */ + public getServiceConfig(request: google.api.servicemanagement.v1.IGetServiceConfigRequest): Promise; + + /** + * Calls CreateServiceConfig. + * @param request CreateServiceConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Service + */ + public createServiceConfig(request: google.api.servicemanagement.v1.ICreateServiceConfigRequest, callback: google.api.servicemanagement.v1.ServiceManager.CreateServiceConfigCallback): void; + + /** + * Calls CreateServiceConfig. + * @param request CreateServiceConfigRequest message or plain object + * @returns Promise + */ + public createServiceConfig(request: google.api.servicemanagement.v1.ICreateServiceConfigRequest): Promise; + + /** + * Calls SubmitConfigSource. + * @param request SubmitConfigSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public submitConfigSource(request: google.api.servicemanagement.v1.ISubmitConfigSourceRequest, callback: google.api.servicemanagement.v1.ServiceManager.SubmitConfigSourceCallback): void; + + /** + * Calls SubmitConfigSource. + * @param request SubmitConfigSourceRequest message or plain object + * @returns Promise + */ + public submitConfigSource(request: google.api.servicemanagement.v1.ISubmitConfigSourceRequest): Promise; + + /** + * Calls ListServiceRollouts. + * @param request ListServiceRolloutsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListServiceRolloutsResponse + */ + public listServiceRollouts(request: google.api.servicemanagement.v1.IListServiceRolloutsRequest, callback: google.api.servicemanagement.v1.ServiceManager.ListServiceRolloutsCallback): void; + + /** + * Calls ListServiceRollouts. + * @param request ListServiceRolloutsRequest message or plain object + * @returns Promise + */ + public listServiceRollouts(request: google.api.servicemanagement.v1.IListServiceRolloutsRequest): Promise; + + /** + * Calls GetServiceRollout. + * @param request GetServiceRolloutRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Rollout + */ + public getServiceRollout(request: google.api.servicemanagement.v1.IGetServiceRolloutRequest, callback: google.api.servicemanagement.v1.ServiceManager.GetServiceRolloutCallback): void; + + /** + * Calls GetServiceRollout. + * @param request GetServiceRolloutRequest message or plain object + * @returns Promise + */ + public getServiceRollout(request: google.api.servicemanagement.v1.IGetServiceRolloutRequest): Promise; + + /** + * Calls CreateServiceRollout. + * @param request CreateServiceRolloutRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createServiceRollout(request: google.api.servicemanagement.v1.ICreateServiceRolloutRequest, callback: google.api.servicemanagement.v1.ServiceManager.CreateServiceRolloutCallback): void; + + /** + * Calls CreateServiceRollout. + * @param request CreateServiceRolloutRequest message or plain object + * @returns Promise + */ + public createServiceRollout(request: google.api.servicemanagement.v1.ICreateServiceRolloutRequest): Promise; + + /** + * Calls GenerateConfigReport. + * @param request GenerateConfigReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateConfigReportResponse + */ + public generateConfigReport(request: google.api.servicemanagement.v1.IGenerateConfigReportRequest, callback: google.api.servicemanagement.v1.ServiceManager.GenerateConfigReportCallback): void; + + /** + * Calls GenerateConfigReport. + * @param request GenerateConfigReportRequest message or plain object + * @returns Promise + */ + public generateConfigReport(request: google.api.servicemanagement.v1.IGenerateConfigReportRequest): Promise; + + /** + * Calls EnableService. + * @param request EnableServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public enableService(request: google.api.servicemanagement.v1.IEnableServiceRequest, callback: google.api.servicemanagement.v1.ServiceManager.EnableServiceCallback): void; + + /** + * Calls EnableService. + * @param request EnableServiceRequest message or plain object + * @returns Promise + */ + public enableService(request: google.api.servicemanagement.v1.IEnableServiceRequest): Promise; + + /** + * Calls DisableService. + * @param request DisableServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public disableService(request: google.api.servicemanagement.v1.IDisableServiceRequest, callback: google.api.servicemanagement.v1.ServiceManager.DisableServiceCallback): void; + + /** + * Calls DisableService. + * @param request DisableServiceRequest message or plain object + * @returns Promise + */ + public disableService(request: google.api.servicemanagement.v1.IDisableServiceRequest): Promise; + } + + namespace ServiceManager { + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServices}. + * @param error Error, if any + * @param [response] ListServicesResponse + */ + type ListServicesCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.ListServicesResponse) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getService}. + * @param error Error, if any + * @param [response] ManagedService + */ + type GetServiceCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.ManagedService) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createService}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#deleteService}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#undeleteService}. + * @param error Error, if any + * @param [response] Operation + */ + type UndeleteServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServiceConfigs}. + * @param error Error, if any + * @param [response] ListServiceConfigsResponse + */ + type ListServiceConfigsCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.ListServiceConfigsResponse) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getServiceConfig}. + * @param error Error, if any + * @param [response] Service + */ + type GetServiceConfigCallback = (error: (Error|null), response?: google.api.Service) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createServiceConfig}. + * @param error Error, if any + * @param [response] Service + */ + type CreateServiceConfigCallback = (error: (Error|null), response?: google.api.Service) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#submitConfigSource}. + * @param error Error, if any + * @param [response] Operation + */ + type SubmitConfigSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServiceRollouts}. + * @param error Error, if any + * @param [response] ListServiceRolloutsResponse + */ + type ListServiceRolloutsCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.ListServiceRolloutsResponse) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getServiceRollout}. + * @param error Error, if any + * @param [response] Rollout + */ + type GetServiceRolloutCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.Rollout) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createServiceRollout}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateServiceRolloutCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#generateConfigReport}. + * @param error Error, if any + * @param [response] GenerateConfigReportResponse + */ + type GenerateConfigReportCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.GenerateConfigReportResponse) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#enableService}. + * @param error Error, if any + * @param [response] Operation + */ + type EnableServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#disableService}. + * @param error Error, if any + * @param [response] Operation + */ + type DisableServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ListServicesRequest. */ + interface IListServicesRequest { + + /** ListServicesRequest producerProjectId */ + producerProjectId?: (string|null); + + /** ListServicesRequest pageSize */ + pageSize?: (number|null); + + /** ListServicesRequest pageToken */ + pageToken?: (string|null); + + /** ListServicesRequest consumerId */ + consumerId?: (string|null); + } + + /** Represents a ListServicesRequest. */ + class ListServicesRequest implements IListServicesRequest { + + /** + * Constructs a new ListServicesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IListServicesRequest); + + /** ListServicesRequest producerProjectId. */ + public producerProjectId: string; + + /** ListServicesRequest pageSize. */ + public pageSize: number; + + /** ListServicesRequest pageToken. */ + public pageToken: string; + + /** ListServicesRequest consumerId. */ + public consumerId: string; + + /** + * Creates a new ListServicesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServicesRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.IListServicesRequest): google.api.servicemanagement.v1.ListServicesRequest; + + /** + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.api.servicemanagement.v1.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServicesRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.ListServicesRequest; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServicesRequest + * @throws {Error} If the payload 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.servicemanagement.v1.ListServicesRequest; + + /** + * Verifies a ListServicesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServicesRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.ListServicesRequest; + + /** + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * @param message ListServicesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.ListServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServicesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListServicesResponse. */ + interface IListServicesResponse { + + /** ListServicesResponse services */ + services?: (google.api.servicemanagement.v1.IManagedService[]|null); + + /** ListServicesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListServicesResponse. */ + class ListServicesResponse implements IListServicesResponse { + + /** + * Constructs a new ListServicesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IListServicesResponse); + + /** ListServicesResponse services. */ + public services: google.api.servicemanagement.v1.IManagedService[]; + + /** ListServicesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListServicesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServicesResponse instance + */ + public static create(properties?: google.api.servicemanagement.v1.IListServicesResponse): google.api.servicemanagement.v1.ListServicesResponse; + + /** + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.api.servicemanagement.v1.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServicesResponse + * @throws {Error} If the payload is not 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.servicemanagement.v1.ListServicesResponse; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServicesResponse + * @throws {Error} If the payload 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.servicemanagement.v1.ListServicesResponse; + + /** + * Verifies a ListServicesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServicesResponse + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.ListServicesResponse; + + /** + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * @param message ListServicesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.ListServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServicesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetServiceRequest. */ + interface IGetServiceRequest { + + /** GetServiceRequest serviceName */ + serviceName?: (string|null); + } + + /** Represents a GetServiceRequest. */ + class GetServiceRequest implements IGetServiceRequest { + + /** + * Constructs a new GetServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IGetServiceRequest); + + /** GetServiceRequest serviceName. */ + public serviceName: string; + + /** + * Creates a new GetServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetServiceRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.IGetServiceRequest): google.api.servicemanagement.v1.GetServiceRequest; + + /** + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetServiceRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.GetServiceRequest; + + /** + * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetServiceRequest + * @throws {Error} If the payload 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.servicemanagement.v1.GetServiceRequest; + + /** + * Verifies a GetServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.GetServiceRequest; + + /** + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * @param message GetServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.GetServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateServiceRequest. */ + interface ICreateServiceRequest { + + /** CreateServiceRequest service */ + service?: (google.api.servicemanagement.v1.IManagedService|null); + } + + /** Represents a CreateServiceRequest. */ + class CreateServiceRequest implements ICreateServiceRequest { + + /** + * Constructs a new CreateServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.ICreateServiceRequest); + + /** CreateServiceRequest service. */ + public service?: (google.api.servicemanagement.v1.IManagedService|null); + + /** + * Creates a new CreateServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateServiceRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.ICreateServiceRequest): google.api.servicemanagement.v1.CreateServiceRequest; + + /** + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateServiceRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.CreateServiceRequest; + + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateServiceRequest + * @throws {Error} If the payload 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.servicemanagement.v1.CreateServiceRequest; + + /** + * Verifies a CreateServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.CreateServiceRequest; + + /** + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * @param message CreateServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.CreateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteServiceRequest. */ + interface IDeleteServiceRequest { + + /** DeleteServiceRequest serviceName */ + serviceName?: (string|null); + } + + /** Represents a DeleteServiceRequest. */ + class DeleteServiceRequest implements IDeleteServiceRequest { + + /** + * Constructs a new DeleteServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IDeleteServiceRequest); + + /** DeleteServiceRequest serviceName. */ + public serviceName: string; + + /** + * Creates a new DeleteServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteServiceRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.IDeleteServiceRequest): google.api.servicemanagement.v1.DeleteServiceRequest; + + /** + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteServiceRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.DeleteServiceRequest; + + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteServiceRequest + * @throws {Error} If the payload 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.servicemanagement.v1.DeleteServiceRequest; + + /** + * Verifies a DeleteServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.DeleteServiceRequest; + + /** + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * @param message DeleteServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.DeleteServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UndeleteServiceRequest. */ + interface IUndeleteServiceRequest { + + /** UndeleteServiceRequest serviceName */ + serviceName?: (string|null); + } + + /** Represents an UndeleteServiceRequest. */ + class UndeleteServiceRequest implements IUndeleteServiceRequest { + + /** + * Constructs a new UndeleteServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IUndeleteServiceRequest); + + /** UndeleteServiceRequest serviceName. */ + public serviceName: string; + + /** + * Creates a new UndeleteServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeleteServiceRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.IUndeleteServiceRequest): google.api.servicemanagement.v1.UndeleteServiceRequest; + + /** + * Encodes the specified UndeleteServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.UndeleteServiceRequest.verify|verify} messages. + * @param message UndeleteServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IUndeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UndeleteServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.UndeleteServiceRequest.verify|verify} messages. + * @param message UndeleteServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IUndeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UndeleteServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeleteServiceRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.UndeleteServiceRequest; + + /** + * Decodes an UndeleteServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeleteServiceRequest + * @throws {Error} If the payload 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.servicemanagement.v1.UndeleteServiceRequest; + + /** + * Verifies an UndeleteServiceRequest message. + * @param message Plain 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 UndeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeleteServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.UndeleteServiceRequest; + + /** + * Creates a plain object from an UndeleteServiceRequest message. Also converts values to other types if specified. + * @param message UndeleteServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.UndeleteServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UndeleteServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UndeleteServiceResponse. */ + interface IUndeleteServiceResponse { + + /** UndeleteServiceResponse service */ + service?: (google.api.servicemanagement.v1.IManagedService|null); + } + + /** Represents an UndeleteServiceResponse. */ + class UndeleteServiceResponse implements IUndeleteServiceResponse { + + /** + * Constructs a new UndeleteServiceResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IUndeleteServiceResponse); + + /** UndeleteServiceResponse service. */ + public service?: (google.api.servicemanagement.v1.IManagedService|null); + + /** + * Creates a new UndeleteServiceResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeleteServiceResponse instance + */ + public static create(properties?: google.api.servicemanagement.v1.IUndeleteServiceResponse): google.api.servicemanagement.v1.UndeleteServiceResponse; + + /** + * Encodes the specified UndeleteServiceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.UndeleteServiceResponse.verify|verify} messages. + * @param message UndeleteServiceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IUndeleteServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UndeleteServiceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.UndeleteServiceResponse.verify|verify} messages. + * @param message UndeleteServiceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IUndeleteServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UndeleteServiceResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeleteServiceResponse + * @throws {Error} If the payload is not 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.servicemanagement.v1.UndeleteServiceResponse; + + /** + * Decodes an UndeleteServiceResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeleteServiceResponse + * @throws {Error} If the payload 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.servicemanagement.v1.UndeleteServiceResponse; + + /** + * Verifies an UndeleteServiceResponse message. + * @param message Plain 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 UndeleteServiceResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeleteServiceResponse + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.UndeleteServiceResponse; + + /** + * Creates a plain object from an UndeleteServiceResponse message. Also converts values to other types if specified. + * @param message UndeleteServiceResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.UndeleteServiceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UndeleteServiceResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetServiceConfigRequest. */ + interface IGetServiceConfigRequest { + + /** GetServiceConfigRequest serviceName */ + serviceName?: (string|null); + + /** GetServiceConfigRequest configId */ + configId?: (string|null); + + /** GetServiceConfigRequest view */ + view?: (google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView|keyof typeof google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView|null); + } + + /** Represents a GetServiceConfigRequest. */ + class GetServiceConfigRequest implements IGetServiceConfigRequest { + + /** + * Constructs a new GetServiceConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IGetServiceConfigRequest); + + /** GetServiceConfigRequest serviceName. */ + public serviceName: string; + + /** GetServiceConfigRequest configId. */ + public configId: string; + + /** GetServiceConfigRequest view. */ + public view: (google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView|keyof typeof google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView); + + /** + * Creates a new GetServiceConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetServiceConfigRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.IGetServiceConfigRequest): google.api.servicemanagement.v1.GetServiceConfigRequest; + + /** + * Encodes the specified GetServiceConfigRequest message. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceConfigRequest.verify|verify} messages. + * @param message GetServiceConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IGetServiceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetServiceConfigRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceConfigRequest.verify|verify} messages. + * @param message GetServiceConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IGetServiceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetServiceConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetServiceConfigRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.GetServiceConfigRequest; + + /** + * Decodes a GetServiceConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetServiceConfigRequest + * @throws {Error} If the payload 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.servicemanagement.v1.GetServiceConfigRequest; + + /** + * Verifies a GetServiceConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetServiceConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetServiceConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.GetServiceConfigRequest; + + /** + * Creates a plain object from a GetServiceConfigRequest message. Also converts values to other types if specified. + * @param message GetServiceConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.GetServiceConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetServiceConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GetServiceConfigRequest { + + /** ConfigView enum. */ + enum ConfigView { + BASIC = 0, + FULL = 1 + } + } + + /** Properties of a ListServiceConfigsRequest. */ + interface IListServiceConfigsRequest { + + /** ListServiceConfigsRequest serviceName */ + serviceName?: (string|null); + + /** ListServiceConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListServiceConfigsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a ListServiceConfigsRequest. */ + class ListServiceConfigsRequest implements IListServiceConfigsRequest { + + /** + * Constructs a new ListServiceConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IListServiceConfigsRequest); + + /** ListServiceConfigsRequest serviceName. */ + public serviceName: string; + + /** ListServiceConfigsRequest pageToken. */ + public pageToken: string; + + /** ListServiceConfigsRequest pageSize. */ + public pageSize: number; + + /** + * Creates a new ListServiceConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServiceConfigsRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.IListServiceConfigsRequest): google.api.servicemanagement.v1.ListServiceConfigsRequest; + + /** + * Encodes the specified ListServiceConfigsRequest message. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceConfigsRequest.verify|verify} messages. + * @param message ListServiceConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IListServiceConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServiceConfigsRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceConfigsRequest.verify|verify} messages. + * @param message ListServiceConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IListServiceConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServiceConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServiceConfigsRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.ListServiceConfigsRequest; + + /** + * Decodes a ListServiceConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServiceConfigsRequest + * @throws {Error} If the payload 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.servicemanagement.v1.ListServiceConfigsRequest; + + /** + * Verifies a ListServiceConfigsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServiceConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServiceConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.ListServiceConfigsRequest; + + /** + * Creates a plain object from a ListServiceConfigsRequest message. Also converts values to other types if specified. + * @param message ListServiceConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.ListServiceConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServiceConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListServiceConfigsResponse. */ + interface IListServiceConfigsResponse { + + /** ListServiceConfigsResponse serviceConfigs */ + serviceConfigs?: (google.api.IService[]|null); + + /** ListServiceConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListServiceConfigsResponse. */ + class ListServiceConfigsResponse implements IListServiceConfigsResponse { + + /** + * Constructs a new ListServiceConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IListServiceConfigsResponse); + + /** ListServiceConfigsResponse serviceConfigs. */ + public serviceConfigs: google.api.IService[]; + + /** ListServiceConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListServiceConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServiceConfigsResponse instance + */ + public static create(properties?: google.api.servicemanagement.v1.IListServiceConfigsResponse): google.api.servicemanagement.v1.ListServiceConfigsResponse; + + /** + * Encodes the specified ListServiceConfigsResponse message. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceConfigsResponse.verify|verify} messages. + * @param message ListServiceConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IListServiceConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServiceConfigsResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceConfigsResponse.verify|verify} messages. + * @param message ListServiceConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IListServiceConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServiceConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServiceConfigsResponse + * @throws {Error} If the payload is not 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.servicemanagement.v1.ListServiceConfigsResponse; + + /** + * Decodes a ListServiceConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServiceConfigsResponse + * @throws {Error} If the payload 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.servicemanagement.v1.ListServiceConfigsResponse; + + /** + * Verifies a ListServiceConfigsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServiceConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServiceConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.ListServiceConfigsResponse; + + /** + * Creates a plain object from a ListServiceConfigsResponse message. Also converts values to other types if specified. + * @param message ListServiceConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.ListServiceConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServiceConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateServiceConfigRequest. */ + interface ICreateServiceConfigRequest { + + /** CreateServiceConfigRequest serviceName */ + serviceName?: (string|null); + + /** CreateServiceConfigRequest serviceConfig */ + serviceConfig?: (google.api.IService|null); + } + + /** Represents a CreateServiceConfigRequest. */ + class CreateServiceConfigRequest implements ICreateServiceConfigRequest { + + /** + * Constructs a new CreateServiceConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.ICreateServiceConfigRequest); + + /** CreateServiceConfigRequest serviceName. */ + public serviceName: string; + + /** CreateServiceConfigRequest serviceConfig. */ + public serviceConfig?: (google.api.IService|null); + + /** + * Creates a new CreateServiceConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateServiceConfigRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.ICreateServiceConfigRequest): google.api.servicemanagement.v1.CreateServiceConfigRequest; + + /** + * Encodes the specified CreateServiceConfigRequest message. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceConfigRequest.verify|verify} messages. + * @param message CreateServiceConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.ICreateServiceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateServiceConfigRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceConfigRequest.verify|verify} messages. + * @param message CreateServiceConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.ICreateServiceConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateServiceConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateServiceConfigRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.CreateServiceConfigRequest; + + /** + * Decodes a CreateServiceConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateServiceConfigRequest + * @throws {Error} If the payload 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.servicemanagement.v1.CreateServiceConfigRequest; + + /** + * Verifies a CreateServiceConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateServiceConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateServiceConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.CreateServiceConfigRequest; + + /** + * Creates a plain object from a CreateServiceConfigRequest message. Also converts values to other types if specified. + * @param message CreateServiceConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.CreateServiceConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateServiceConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SubmitConfigSourceRequest. */ + interface ISubmitConfigSourceRequest { + + /** SubmitConfigSourceRequest serviceName */ + serviceName?: (string|null); + + /** SubmitConfigSourceRequest configSource */ + configSource?: (google.api.servicemanagement.v1.IConfigSource|null); + + /** SubmitConfigSourceRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a SubmitConfigSourceRequest. */ + class SubmitConfigSourceRequest implements ISubmitConfigSourceRequest { + + /** + * Constructs a new SubmitConfigSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.ISubmitConfigSourceRequest); + + /** SubmitConfigSourceRequest serviceName. */ + public serviceName: string; + + /** SubmitConfigSourceRequest configSource. */ + public configSource?: (google.api.servicemanagement.v1.IConfigSource|null); + + /** SubmitConfigSourceRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new SubmitConfigSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitConfigSourceRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.ISubmitConfigSourceRequest): google.api.servicemanagement.v1.SubmitConfigSourceRequest; + + /** + * Encodes the specified SubmitConfigSourceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.SubmitConfigSourceRequest.verify|verify} messages. + * @param message SubmitConfigSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.ISubmitConfigSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitConfigSourceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.SubmitConfigSourceRequest.verify|verify} messages. + * @param message SubmitConfigSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.ISubmitConfigSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitConfigSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitConfigSourceRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.SubmitConfigSourceRequest; + + /** + * Decodes a SubmitConfigSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitConfigSourceRequest + * @throws {Error} If the payload 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.servicemanagement.v1.SubmitConfigSourceRequest; + + /** + * Verifies a SubmitConfigSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubmitConfigSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitConfigSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.SubmitConfigSourceRequest; + + /** + * Creates a plain object from a SubmitConfigSourceRequest message. Also converts values to other types if specified. + * @param message SubmitConfigSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.SubmitConfigSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitConfigSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SubmitConfigSourceResponse. */ + interface ISubmitConfigSourceResponse { + + /** SubmitConfigSourceResponse serviceConfig */ + serviceConfig?: (google.api.IService|null); + } + + /** Represents a SubmitConfigSourceResponse. */ + class SubmitConfigSourceResponse implements ISubmitConfigSourceResponse { + + /** + * Constructs a new SubmitConfigSourceResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.ISubmitConfigSourceResponse); + + /** SubmitConfigSourceResponse serviceConfig. */ + public serviceConfig?: (google.api.IService|null); + + /** + * Creates a new SubmitConfigSourceResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitConfigSourceResponse instance + */ + public static create(properties?: google.api.servicemanagement.v1.ISubmitConfigSourceResponse): google.api.servicemanagement.v1.SubmitConfigSourceResponse; + + /** + * Encodes the specified SubmitConfigSourceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.SubmitConfigSourceResponse.verify|verify} messages. + * @param message SubmitConfigSourceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.ISubmitConfigSourceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitConfigSourceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.SubmitConfigSourceResponse.verify|verify} messages. + * @param message SubmitConfigSourceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.ISubmitConfigSourceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitConfigSourceResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitConfigSourceResponse + * @throws {Error} If the payload is not 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.servicemanagement.v1.SubmitConfigSourceResponse; + + /** + * Decodes a SubmitConfigSourceResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitConfigSourceResponse + * @throws {Error} If the payload 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.servicemanagement.v1.SubmitConfigSourceResponse; + + /** + * Verifies a SubmitConfigSourceResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubmitConfigSourceResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitConfigSourceResponse + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.SubmitConfigSourceResponse; + + /** + * Creates a plain object from a SubmitConfigSourceResponse message. Also converts values to other types if specified. + * @param message SubmitConfigSourceResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.SubmitConfigSourceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitConfigSourceResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateServiceRolloutRequest. */ + interface ICreateServiceRolloutRequest { + + /** CreateServiceRolloutRequest serviceName */ + serviceName?: (string|null); + + /** CreateServiceRolloutRequest rollout */ + rollout?: (google.api.servicemanagement.v1.IRollout|null); + } + + /** Represents a CreateServiceRolloutRequest. */ + class CreateServiceRolloutRequest implements ICreateServiceRolloutRequest { + + /** + * Constructs a new CreateServiceRolloutRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.ICreateServiceRolloutRequest); + + /** CreateServiceRolloutRequest serviceName. */ + public serviceName: string; + + /** CreateServiceRolloutRequest rollout. */ + public rollout?: (google.api.servicemanagement.v1.IRollout|null); + + /** + * Creates a new CreateServiceRolloutRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateServiceRolloutRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.ICreateServiceRolloutRequest): google.api.servicemanagement.v1.CreateServiceRolloutRequest; + + /** + * Encodes the specified CreateServiceRolloutRequest message. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceRolloutRequest.verify|verify} messages. + * @param message CreateServiceRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.ICreateServiceRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateServiceRolloutRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceRolloutRequest.verify|verify} messages. + * @param message CreateServiceRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.ICreateServiceRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateServiceRolloutRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateServiceRolloutRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.CreateServiceRolloutRequest; + + /** + * Decodes a CreateServiceRolloutRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateServiceRolloutRequest + * @throws {Error} If the payload 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.servicemanagement.v1.CreateServiceRolloutRequest; + + /** + * Verifies a CreateServiceRolloutRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateServiceRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateServiceRolloutRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.CreateServiceRolloutRequest; + + /** + * Creates a plain object from a CreateServiceRolloutRequest message. Also converts values to other types if specified. + * @param message CreateServiceRolloutRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.CreateServiceRolloutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateServiceRolloutRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListServiceRolloutsRequest. */ + interface IListServiceRolloutsRequest { + + /** ListServiceRolloutsRequest serviceName */ + serviceName?: (string|null); + + /** ListServiceRolloutsRequest pageToken */ + pageToken?: (string|null); + + /** ListServiceRolloutsRequest pageSize */ + pageSize?: (number|null); + + /** ListServiceRolloutsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListServiceRolloutsRequest. */ + class ListServiceRolloutsRequest implements IListServiceRolloutsRequest { + + /** + * Constructs a new ListServiceRolloutsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IListServiceRolloutsRequest); + + /** ListServiceRolloutsRequest serviceName. */ + public serviceName: string; + + /** ListServiceRolloutsRequest pageToken. */ + public pageToken: string; + + /** ListServiceRolloutsRequest pageSize. */ + public pageSize: number; + + /** ListServiceRolloutsRequest filter. */ + public filter: string; + + /** + * Creates a new ListServiceRolloutsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServiceRolloutsRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.IListServiceRolloutsRequest): google.api.servicemanagement.v1.ListServiceRolloutsRequest; + + /** + * Encodes the specified ListServiceRolloutsRequest message. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceRolloutsRequest.verify|verify} messages. + * @param message ListServiceRolloutsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IListServiceRolloutsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServiceRolloutsRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceRolloutsRequest.verify|verify} messages. + * @param message ListServiceRolloutsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IListServiceRolloutsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServiceRolloutsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServiceRolloutsRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.ListServiceRolloutsRequest; + + /** + * Decodes a ListServiceRolloutsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServiceRolloutsRequest + * @throws {Error} If the payload 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.servicemanagement.v1.ListServiceRolloutsRequest; + + /** + * Verifies a ListServiceRolloutsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServiceRolloutsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServiceRolloutsRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.ListServiceRolloutsRequest; + + /** + * Creates a plain object from a ListServiceRolloutsRequest message. Also converts values to other types if specified. + * @param message ListServiceRolloutsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.ListServiceRolloutsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServiceRolloutsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListServiceRolloutsResponse. */ + interface IListServiceRolloutsResponse { + + /** ListServiceRolloutsResponse rollouts */ + rollouts?: (google.api.servicemanagement.v1.IRollout[]|null); + + /** ListServiceRolloutsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListServiceRolloutsResponse. */ + class ListServiceRolloutsResponse implements IListServiceRolloutsResponse { + + /** + * Constructs a new ListServiceRolloutsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IListServiceRolloutsResponse); + + /** ListServiceRolloutsResponse rollouts. */ + public rollouts: google.api.servicemanagement.v1.IRollout[]; + + /** ListServiceRolloutsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListServiceRolloutsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServiceRolloutsResponse instance + */ + public static create(properties?: google.api.servicemanagement.v1.IListServiceRolloutsResponse): google.api.servicemanagement.v1.ListServiceRolloutsResponse; + + /** + * Encodes the specified ListServiceRolloutsResponse message. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceRolloutsResponse.verify|verify} messages. + * @param message ListServiceRolloutsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IListServiceRolloutsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServiceRolloutsResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceRolloutsResponse.verify|verify} messages. + * @param message ListServiceRolloutsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IListServiceRolloutsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServiceRolloutsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServiceRolloutsResponse + * @throws {Error} If the payload is not 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.servicemanagement.v1.ListServiceRolloutsResponse; + + /** + * Decodes a ListServiceRolloutsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServiceRolloutsResponse + * @throws {Error} If the payload 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.servicemanagement.v1.ListServiceRolloutsResponse; + + /** + * Verifies a ListServiceRolloutsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServiceRolloutsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServiceRolloutsResponse + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.ListServiceRolloutsResponse; + + /** + * Creates a plain object from a ListServiceRolloutsResponse message. Also converts values to other types if specified. + * @param message ListServiceRolloutsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.ListServiceRolloutsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServiceRolloutsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetServiceRolloutRequest. */ + interface IGetServiceRolloutRequest { + + /** GetServiceRolloutRequest serviceName */ + serviceName?: (string|null); + + /** GetServiceRolloutRequest rolloutId */ + rolloutId?: (string|null); + } + + /** Represents a GetServiceRolloutRequest. */ + class GetServiceRolloutRequest implements IGetServiceRolloutRequest { + + /** + * Constructs a new GetServiceRolloutRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IGetServiceRolloutRequest); + + /** GetServiceRolloutRequest serviceName. */ + public serviceName: string; + + /** GetServiceRolloutRequest rolloutId. */ + public rolloutId: string; + + /** + * Creates a new GetServiceRolloutRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetServiceRolloutRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.IGetServiceRolloutRequest): google.api.servicemanagement.v1.GetServiceRolloutRequest; + + /** + * Encodes the specified GetServiceRolloutRequest message. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceRolloutRequest.verify|verify} messages. + * @param message GetServiceRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IGetServiceRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetServiceRolloutRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceRolloutRequest.verify|verify} messages. + * @param message GetServiceRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IGetServiceRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetServiceRolloutRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetServiceRolloutRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.GetServiceRolloutRequest; + + /** + * Decodes a GetServiceRolloutRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetServiceRolloutRequest + * @throws {Error} If the payload 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.servicemanagement.v1.GetServiceRolloutRequest; + + /** + * Verifies a GetServiceRolloutRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetServiceRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetServiceRolloutRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.GetServiceRolloutRequest; + + /** + * Creates a plain object from a GetServiceRolloutRequest message. Also converts values to other types if specified. + * @param message GetServiceRolloutRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.GetServiceRolloutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetServiceRolloutRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnableServiceRequest. */ + interface IEnableServiceRequest { + + /** EnableServiceRequest serviceName */ + serviceName?: (string|null); + + /** EnableServiceRequest consumerId */ + consumerId?: (string|null); + } + + /** Represents an EnableServiceRequest. */ + class EnableServiceRequest implements IEnableServiceRequest { + + /** + * Constructs a new EnableServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IEnableServiceRequest); + + /** EnableServiceRequest serviceName. */ + public serviceName: string; + + /** EnableServiceRequest consumerId. */ + public consumerId: string; + + /** + * Creates a new EnableServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EnableServiceRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.IEnableServiceRequest): google.api.servicemanagement.v1.EnableServiceRequest; + + /** + * Encodes the specified EnableServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceRequest.verify|verify} messages. + * @param message EnableServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IEnableServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnableServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceRequest.verify|verify} messages. + * @param message EnableServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IEnableServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnableServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnableServiceRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.EnableServiceRequest; + + /** + * Decodes an EnableServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnableServiceRequest + * @throws {Error} If the payload 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.servicemanagement.v1.EnableServiceRequest; + + /** + * Verifies an EnableServiceRequest message. + * @param message Plain 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 EnableServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnableServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.EnableServiceRequest; + + /** + * Creates a plain object from an EnableServiceRequest message. Also converts values to other types if specified. + * @param message EnableServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.EnableServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnableServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnableServiceResponse. */ + interface IEnableServiceResponse { + } + + /** Represents an EnableServiceResponse. */ + class EnableServiceResponse implements IEnableServiceResponse { + + /** + * Constructs a new EnableServiceResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IEnableServiceResponse); + + /** + * Creates a new EnableServiceResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns EnableServiceResponse instance + */ + public static create(properties?: google.api.servicemanagement.v1.IEnableServiceResponse): google.api.servicemanagement.v1.EnableServiceResponse; + + /** + * Encodes the specified EnableServiceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceResponse.verify|verify} messages. + * @param message EnableServiceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IEnableServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnableServiceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceResponse.verify|verify} messages. + * @param message EnableServiceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IEnableServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnableServiceResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnableServiceResponse + * @throws {Error} If the payload is not 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.servicemanagement.v1.EnableServiceResponse; + + /** + * Decodes an EnableServiceResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnableServiceResponse + * @throws {Error} If the payload 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.servicemanagement.v1.EnableServiceResponse; + + /** + * Verifies an EnableServiceResponse message. + * @param message Plain 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 EnableServiceResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnableServiceResponse + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.EnableServiceResponse; + + /** + * Creates a plain object from an EnableServiceResponse message. Also converts values to other types if specified. + * @param message EnableServiceResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.EnableServiceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnableServiceResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DisableServiceRequest. */ + interface IDisableServiceRequest { + + /** DisableServiceRequest serviceName */ + serviceName?: (string|null); + + /** DisableServiceRequest consumerId */ + consumerId?: (string|null); + } + + /** Represents a DisableServiceRequest. */ + class DisableServiceRequest implements IDisableServiceRequest { + + /** + * Constructs a new DisableServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IDisableServiceRequest); + + /** DisableServiceRequest serviceName. */ + public serviceName: string; + + /** DisableServiceRequest consumerId. */ + public consumerId: string; + + /** + * Creates a new DisableServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DisableServiceRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.IDisableServiceRequest): google.api.servicemanagement.v1.DisableServiceRequest; + + /** + * Encodes the specified DisableServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceRequest.verify|verify} messages. + * @param message DisableServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IDisableServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisableServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceRequest.verify|verify} messages. + * @param message DisableServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IDisableServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisableServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisableServiceRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.DisableServiceRequest; + + /** + * Decodes a DisableServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisableServiceRequest + * @throws {Error} If the payload 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.servicemanagement.v1.DisableServiceRequest; + + /** + * Verifies a DisableServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DisableServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisableServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.DisableServiceRequest; + + /** + * Creates a plain object from a DisableServiceRequest message. Also converts values to other types if specified. + * @param message DisableServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.DisableServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisableServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DisableServiceResponse. */ + interface IDisableServiceResponse { + } + + /** Represents a DisableServiceResponse. */ + class DisableServiceResponse implements IDisableServiceResponse { + + /** + * Constructs a new DisableServiceResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IDisableServiceResponse); + + /** + * Creates a new DisableServiceResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns DisableServiceResponse instance + */ + public static create(properties?: google.api.servicemanagement.v1.IDisableServiceResponse): google.api.servicemanagement.v1.DisableServiceResponse; + + /** + * Encodes the specified DisableServiceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceResponse.verify|verify} messages. + * @param message DisableServiceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IDisableServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisableServiceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceResponse.verify|verify} messages. + * @param message DisableServiceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IDisableServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisableServiceResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisableServiceResponse + * @throws {Error} If the payload is not 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.servicemanagement.v1.DisableServiceResponse; + + /** + * Decodes a DisableServiceResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisableServiceResponse + * @throws {Error} If the payload 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.servicemanagement.v1.DisableServiceResponse; + + /** + * Verifies a DisableServiceResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DisableServiceResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisableServiceResponse + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.DisableServiceResponse; + + /** + * Creates a plain object from a DisableServiceResponse message. Also converts values to other types if specified. + * @param message DisableServiceResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.DisableServiceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisableServiceResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GenerateConfigReportRequest. */ + interface IGenerateConfigReportRequest { + + /** GenerateConfigReportRequest newConfig */ + newConfig?: (google.protobuf.IAny|null); + + /** GenerateConfigReportRequest oldConfig */ + oldConfig?: (google.protobuf.IAny|null); + } + + /** Represents a GenerateConfigReportRequest. */ + class GenerateConfigReportRequest implements IGenerateConfigReportRequest { + + /** + * Constructs a new GenerateConfigReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IGenerateConfigReportRequest); + + /** GenerateConfigReportRequest newConfig. */ + public newConfig?: (google.protobuf.IAny|null); + + /** GenerateConfigReportRequest oldConfig. */ + public oldConfig?: (google.protobuf.IAny|null); + + /** + * Creates a new GenerateConfigReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateConfigReportRequest instance + */ + public static create(properties?: google.api.servicemanagement.v1.IGenerateConfigReportRequest): google.api.servicemanagement.v1.GenerateConfigReportRequest; + + /** + * Encodes the specified GenerateConfigReportRequest message. Does not implicitly {@link google.api.servicemanagement.v1.GenerateConfigReportRequest.verify|verify} messages. + * @param message GenerateConfigReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IGenerateConfigReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateConfigReportRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.GenerateConfigReportRequest.verify|verify} messages. + * @param message GenerateConfigReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IGenerateConfigReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateConfigReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateConfigReportRequest + * @throws {Error} If the payload is not 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.servicemanagement.v1.GenerateConfigReportRequest; + + /** + * Decodes a GenerateConfigReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateConfigReportRequest + * @throws {Error} If the payload 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.servicemanagement.v1.GenerateConfigReportRequest; + + /** + * Verifies a GenerateConfigReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateConfigReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateConfigReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.GenerateConfigReportRequest; + + /** + * Creates a plain object from a GenerateConfigReportRequest message. Also converts values to other types if specified. + * @param message GenerateConfigReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.GenerateConfigReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateConfigReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GenerateConfigReportResponse. */ + interface IGenerateConfigReportResponse { + + /** GenerateConfigReportResponse serviceName */ + serviceName?: (string|null); + + /** GenerateConfigReportResponse id */ + id?: (string|null); + + /** GenerateConfigReportResponse changeReports */ + changeReports?: (google.api.servicemanagement.v1.IChangeReport[]|null); + + /** GenerateConfigReportResponse diagnostics */ + diagnostics?: (google.api.servicemanagement.v1.IDiagnostic[]|null); + } + + /** Represents a GenerateConfigReportResponse. */ + class GenerateConfigReportResponse implements IGenerateConfigReportResponse { + + /** + * Constructs a new GenerateConfigReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicemanagement.v1.IGenerateConfigReportResponse); + + /** GenerateConfigReportResponse serviceName. */ + public serviceName: string; + + /** GenerateConfigReportResponse id. */ + public id: string; + + /** GenerateConfigReportResponse changeReports. */ + public changeReports: google.api.servicemanagement.v1.IChangeReport[]; + + /** GenerateConfigReportResponse diagnostics. */ + public diagnostics: google.api.servicemanagement.v1.IDiagnostic[]; + + /** + * Creates a new GenerateConfigReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateConfigReportResponse instance + */ + public static create(properties?: google.api.servicemanagement.v1.IGenerateConfigReportResponse): google.api.servicemanagement.v1.GenerateConfigReportResponse; + + /** + * Encodes the specified GenerateConfigReportResponse message. Does not implicitly {@link google.api.servicemanagement.v1.GenerateConfigReportResponse.verify|verify} messages. + * @param message GenerateConfigReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicemanagement.v1.IGenerateConfigReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateConfigReportResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.GenerateConfigReportResponse.verify|verify} messages. + * @param message GenerateConfigReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicemanagement.v1.IGenerateConfigReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateConfigReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateConfigReportResponse + * @throws {Error} If the payload is not 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.servicemanagement.v1.GenerateConfigReportResponse; + + /** + * Decodes a GenerateConfigReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateConfigReportResponse + * @throws {Error} If the payload 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.servicemanagement.v1.GenerateConfigReportResponse; + + /** + * Verifies a GenerateConfigReportResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateConfigReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateConfigReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.GenerateConfigReportResponse; + + /** + * Creates a plain object from a GenerateConfigReportResponse message. Also converts values to other types if specified. + * @param message GenerateConfigReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicemanagement.v1.GenerateConfigReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateConfigReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ConfigChange. */ + interface IConfigChange { + + /** ConfigChange element */ + element?: (string|null); + + /** ConfigChange oldValue */ + oldValue?: (string|null); + + /** ConfigChange newValue */ + newValue?: (string|null); + + /** ConfigChange changeType */ + changeType?: (google.api.ChangeType|keyof typeof google.api.ChangeType|null); + + /** ConfigChange advices */ + advices?: (google.api.IAdvice[]|null); + } + + /** Represents a ConfigChange. */ + class ConfigChange implements IConfigChange { + + /** + * Constructs a new ConfigChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IConfigChange); + + /** ConfigChange element. */ + public element: string; + + /** ConfigChange oldValue. */ + public oldValue: string; + + /** ConfigChange newValue. */ + public newValue: string; + + /** ConfigChange changeType. */ + public changeType: (google.api.ChangeType|keyof typeof google.api.ChangeType); + + /** ConfigChange advices. */ + public advices: google.api.IAdvice[]; + + /** + * Creates a new ConfigChange instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigChange instance + */ + public static create(properties?: google.api.IConfigChange): google.api.ConfigChange; + + /** + * Encodes the specified ConfigChange message. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. + * @param message ConfigChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IConfigChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfigChange message, length delimited. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. + * @param message ConfigChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IConfigChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfigChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigChange + * @throws {Error} If the payload is not 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.ConfigChange; + + /** + * Decodes a ConfigChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigChange + * @throws {Error} If the payload 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.ConfigChange; + + /** + * Verifies a ConfigChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfigChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigChange + */ + public static fromObject(object: { [k: string]: any }): google.api.ConfigChange; + + /** + * Creates a plain object from a ConfigChange message. Also converts values to other types if specified. + * @param message ConfigChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ConfigChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Advice. */ + interface IAdvice { + + /** Advice description */ + description?: (string|null); + } + + /** Represents an Advice. */ + class Advice implements IAdvice { + + /** + * Constructs a new Advice. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IAdvice); + + /** Advice description. */ + public description: string; + + /** + * Creates a new Advice instance using the specified properties. + * @param [properties] Properties to set + * @returns Advice instance + */ + public static create(properties?: google.api.IAdvice): google.api.Advice; + + /** + * Encodes the specified Advice message. Does not implicitly {@link google.api.Advice.verify|verify} messages. + * @param message Advice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IAdvice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Advice message, length delimited. Does not implicitly {@link google.api.Advice.verify|verify} messages. + * @param message Advice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IAdvice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Advice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Advice + * @throws {Error} If the payload is not 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.Advice; + + /** + * Decodes an Advice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Advice + * @throws {Error} If the payload 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.Advice; + + /** + * Verifies an Advice message. + * @param message Plain 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 Advice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Advice + */ + public static fromObject(object: { [k: string]: any }): google.api.Advice; + + /** + * Creates a plain object from an Advice message. Also converts values to other types if specified. + * @param message Advice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Advice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Advice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** ChangeType enum. */ + enum ChangeType { + CHANGE_TYPE_UNSPECIFIED = 0, + ADDED = 1, + REMOVED = 2, + MODIFIED = 3 + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6 + } + + /** Properties of a MetricDescriptor. */ + interface IMetricDescriptor { + + /** MetricDescriptor name */ + name?: (string|null); + + /** MetricDescriptor type */ + type?: (string|null); + + /** MetricDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** MetricDescriptor metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + + /** MetricDescriptor valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + + /** MetricDescriptor unit */ + unit?: (string|null); + + /** MetricDescriptor description */ + description?: (string|null); + + /** MetricDescriptor displayName */ + displayName?: (string|null); + + /** MetricDescriptor metadata */ + metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + + /** MetricDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** MetricDescriptor monitoredResourceTypes */ + monitoredResourceTypes?: (string[]|null); + } + + /** Represents a MetricDescriptor. */ + class MetricDescriptor implements IMetricDescriptor { + + /** + * Constructs a new MetricDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMetricDescriptor); + + /** MetricDescriptor name. */ + public name: string; + + /** MetricDescriptor type. */ + public type: string; + + /** MetricDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** MetricDescriptor metricKind. */ + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + + /** MetricDescriptor valueType. */ + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + + /** MetricDescriptor unit. */ + public unit: string; + + /** MetricDescriptor description. */ + public description: string; + + /** MetricDescriptor displayName. */ + public displayName: string; + + /** MetricDescriptor metadata. */ + public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + + /** MetricDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** MetricDescriptor monitoredResourceTypes. */ + public monitoredResourceTypes: string[]; + + /** + * Creates a new MetricDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricDescriptor instance + */ + public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; + + /** + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricDescriptor + * @throws {Error} If the payload is not 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.MetricDescriptor; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricDescriptor + * @throws {Error} If the payload 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.MetricDescriptor; + + /** + * Verifies a MetricDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; + + /** + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @param message MetricDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MetricDescriptor { + + /** Properties of a MetricDescriptorMetadata. */ + interface IMetricDescriptorMetadata { + + /** MetricDescriptorMetadata launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** MetricDescriptorMetadata samplePeriod */ + samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay */ + ingestDelay?: (google.protobuf.IDuration|null); + } + + /** Represents a MetricDescriptorMetadata. */ + class MetricDescriptorMetadata implements IMetricDescriptorMetadata { + + /** + * Constructs a new MetricDescriptorMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); + + /** MetricDescriptorMetadata launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** MetricDescriptorMetadata samplePeriod. */ + public samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay. */ + public ingestDelay?: (google.protobuf.IDuration|null); + + /** + * Creates a new MetricDescriptorMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricDescriptorMetadata instance + */ + public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricDescriptorMetadata + * @throws {Error} If the payload is not 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.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricDescriptorMetadata + * @throws {Error} If the payload 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.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Verifies a MetricDescriptorMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricDescriptorMetadata + */ + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @param message MetricDescriptorMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricDescriptorMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** MetricKind enum. */ + enum MetricKind { + METRIC_KIND_UNSPECIFIED = 0, + GAUGE = 1, + DELTA = 2, + CUMULATIVE = 3 + } + + /** ValueType enum. */ + enum ValueType { + VALUE_TYPE_UNSPECIFIED = 0, + BOOL = 1, + INT64 = 2, + DOUBLE = 3, + STRING = 4, + DISTRIBUTION = 5, + MONEY = 6 + } + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric type */ + type?: (string|null); + + /** Metric labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMetric); + + /** Metric type. */ + public type: string; + + /** Metric labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.api.IMetric): google.api.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @throws {Error} If the payload is not 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.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @throws {Error} If the payload 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.Metric; + + /** + * Verifies a Metric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.api.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { + + /** LabelDescriptor key */ + key?: (string|null); + + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); + + /** LabelDescriptor description */ + description?: (string|null); + } + + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { + + /** + * Constructs a new LabelDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ILabelDescriptor); + + /** LabelDescriptor key. */ + public key: string; + + /** LabelDescriptor valueType. */ + public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); + + /** LabelDescriptor description. */ + public description: string; + + /** + * Creates a new LabelDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelDescriptor instance + */ + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + + /** + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelDescriptor + * @throws {Error} If the payload is not 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.LabelDescriptor; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelDescriptor + * @throws {Error} If the payload 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.LabelDescriptor; + + /** + * Verifies a LabelDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LabelDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace LabelDescriptor { + + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 + } + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** Properties of a Quota. */ + interface IQuota { + + /** Quota limits */ + limits?: (google.api.IQuotaLimit[]|null); + + /** Quota metricRules */ + metricRules?: (google.api.IMetricRule[]|null); + } + + /** Represents a Quota. */ + class Quota implements IQuota { + + /** + * Constructs a new Quota. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IQuota); + + /** Quota limits. */ + public limits: google.api.IQuotaLimit[]; + + /** Quota metricRules. */ + public metricRules: google.api.IMetricRule[]; + + /** + * Creates a new Quota instance using the specified properties. + * @param [properties] Properties to set + * @returns Quota instance + */ + public static create(properties?: google.api.IQuota): google.api.Quota; + + /** + * Encodes the specified Quota message. Does not implicitly {@link google.api.Quota.verify|verify} messages. + * @param message Quota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Quota message, length delimited. Does not implicitly {@link google.api.Quota.verify|verify} messages. + * @param message Quota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Quota message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Quota + * @throws {Error} If the payload is not 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.Quota; + + /** + * Decodes a Quota message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Quota + * @throws {Error} If the payload 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.Quota; + + /** + * Verifies a Quota message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Quota message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Quota + */ + public static fromObject(object: { [k: string]: any }): google.api.Quota; + + /** + * Creates a plain object from a Quota message. Also converts values to other types if specified. + * @param message Quota + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Quota, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Quota to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MetricRule. */ + interface IMetricRule { + + /** MetricRule selector */ + selector?: (string|null); + + /** MetricRule metricCosts */ + metricCosts?: ({ [k: string]: (number|Long|string) }|null); + } + + /** Represents a MetricRule. */ + class MetricRule implements IMetricRule { + + /** + * Constructs a new MetricRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMetricRule); + + /** MetricRule selector. */ + public selector: string; + + /** MetricRule metricCosts. */ + public metricCosts: { [k: string]: (number|Long|string) }; + + /** + * Creates a new MetricRule instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricRule instance + */ + public static create(properties?: google.api.IMetricRule): google.api.MetricRule; + + /** + * Encodes the specified MetricRule message. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. + * @param message MetricRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMetricRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricRule message, length delimited. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. + * @param message MetricRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMetricRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricRule + * @throws {Error} If the payload is not 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.MetricRule; + + /** + * Decodes a MetricRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricRule + * @throws {Error} If the payload 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.MetricRule; + + /** + * Verifies a MetricRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricRule + */ + public static fromObject(object: { [k: string]: any }): google.api.MetricRule; + + /** + * Creates a plain object from a MetricRule message. Also converts values to other types if specified. + * @param message MetricRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MetricRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QuotaLimit. */ + interface IQuotaLimit { + + /** QuotaLimit name */ + name?: (string|null); + + /** QuotaLimit description */ + description?: (string|null); + + /** QuotaLimit defaultLimit */ + defaultLimit?: (number|Long|string|null); + + /** QuotaLimit maxLimit */ + maxLimit?: (number|Long|string|null); + + /** QuotaLimit freeTier */ + freeTier?: (number|Long|string|null); + + /** QuotaLimit duration */ + duration?: (string|null); + + /** QuotaLimit metric */ + metric?: (string|null); + + /** QuotaLimit unit */ + unit?: (string|null); + + /** QuotaLimit values */ + values?: ({ [k: string]: (number|Long|string) }|null); + + /** QuotaLimit displayName */ + displayName?: (string|null); + } + + /** Represents a QuotaLimit. */ + class QuotaLimit implements IQuotaLimit { + + /** + * Constructs a new QuotaLimit. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IQuotaLimit); + + /** QuotaLimit name. */ + public name: string; + + /** QuotaLimit description. */ + public description: string; + + /** QuotaLimit defaultLimit. */ + public defaultLimit: (number|Long|string); + + /** QuotaLimit maxLimit. */ + public maxLimit: (number|Long|string); + + /** QuotaLimit freeTier. */ + public freeTier: (number|Long|string); + + /** QuotaLimit duration. */ + public duration: string; + + /** QuotaLimit metric. */ + public metric: string; + + /** QuotaLimit unit. */ + public unit: string; + + /** QuotaLimit values. */ + public values: { [k: string]: (number|Long|string) }; + + /** QuotaLimit displayName. */ + public displayName: string; + + /** + * Creates a new QuotaLimit instance using the specified properties. + * @param [properties] Properties to set + * @returns QuotaLimit instance + */ + public static create(properties?: google.api.IQuotaLimit): google.api.QuotaLimit; + + /** + * Encodes the specified QuotaLimit message. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. + * @param message QuotaLimit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IQuotaLimit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuotaLimit message, length delimited. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. + * @param message QuotaLimit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IQuotaLimit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuotaLimit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuotaLimit + * @throws {Error} If the payload is not 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.QuotaLimit; + + /** + * Decodes a QuotaLimit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuotaLimit + * @throws {Error} If the payload 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.QuotaLimit; + + /** + * Verifies a QuotaLimit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QuotaLimit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuotaLimit + */ + public static fromObject(object: { [k: string]: any }): google.api.QuotaLimit; + + /** + * Creates a plain object from a QuotaLimit message. Also converts values to other types if specified. + * @param message QuotaLimit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.QuotaLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuotaLimit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Service. */ + interface IService { + + /** Service configVersion */ + configVersion?: (google.protobuf.IUInt32Value|null); + + /** Service name */ + name?: (string|null); + + /** Service id */ + id?: (string|null); + + /** Service title */ + title?: (string|null); + + /** Service producerProjectId */ + producerProjectId?: (string|null); + + /** Service apis */ + apis?: (google.protobuf.IApi[]|null); + + /** Service types */ + types?: (google.protobuf.IType[]|null); + + /** Service enums */ + enums?: (google.protobuf.IEnum[]|null); + + /** Service documentation */ + documentation?: (google.api.IDocumentation|null); + + /** Service backend */ + backend?: (google.api.IBackend|null); + + /** Service http */ + http?: (google.api.IHttp|null); + + /** Service quota */ + quota?: (google.api.IQuota|null); + + /** Service authentication */ + authentication?: (google.api.IAuthentication|null); + + /** Service context */ + context?: (google.api.IContext|null); + + /** Service usage */ + usage?: (google.api.IUsage|null); + + /** Service endpoints */ + endpoints?: (google.api.IEndpoint[]|null); + + /** Service control */ + control?: (google.api.IControl|null); + + /** Service logs */ + logs?: (google.api.ILogDescriptor[]|null); + + /** Service metrics */ + metrics?: (google.api.IMetricDescriptor[]|null); + + /** Service monitoredResources */ + monitoredResources?: (google.api.IMonitoredResourceDescriptor[]|null); + + /** Service billing */ + billing?: (google.api.IBilling|null); + + /** Service logging */ + logging?: (google.api.ILogging|null); + + /** Service monitoring */ + monitoring?: (google.api.IMonitoring|null); + + /** Service systemParameters */ + systemParameters?: (google.api.ISystemParameters|null); + + /** Service sourceInfo */ + sourceInfo?: (google.api.ISourceInfo|null); + } + + /** Represents a Service. */ + class Service implements IService { + + /** + * Constructs a new Service. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IService); + + /** Service configVersion. */ + public configVersion?: (google.protobuf.IUInt32Value|null); + + /** Service name. */ + public name: string; + + /** Service id. */ + public id: string; + + /** Service title. */ + public title: string; + + /** Service producerProjectId. */ + public producerProjectId: string; + + /** Service apis. */ + public apis: google.protobuf.IApi[]; + + /** Service types. */ + public types: google.protobuf.IType[]; + + /** Service enums. */ + public enums: google.protobuf.IEnum[]; + + /** Service documentation. */ + public documentation?: (google.api.IDocumentation|null); + + /** Service backend. */ + public backend?: (google.api.IBackend|null); + + /** Service http. */ + public http?: (google.api.IHttp|null); + + /** Service quota. */ + public quota?: (google.api.IQuota|null); + + /** Service authentication. */ + public authentication?: (google.api.IAuthentication|null); + + /** Service context. */ + public context?: (google.api.IContext|null); + + /** Service usage. */ + public usage?: (google.api.IUsage|null); + + /** Service endpoints. */ + public endpoints: google.api.IEndpoint[]; + + /** Service control. */ + public control?: (google.api.IControl|null); + + /** Service logs. */ + public logs: google.api.ILogDescriptor[]; + + /** Service metrics. */ + public metrics: google.api.IMetricDescriptor[]; + + /** Service monitoredResources. */ + public monitoredResources: google.api.IMonitoredResourceDescriptor[]; + + /** Service billing. */ + public billing?: (google.api.IBilling|null); + + /** Service logging. */ + public logging?: (google.api.ILogging|null); + + /** Service monitoring. */ + public monitoring?: (google.api.IMonitoring|null); + + /** Service systemParameters. */ + public systemParameters?: (google.api.ISystemParameters|null); + + /** Service sourceInfo. */ + public sourceInfo?: (google.api.ISourceInfo|null); + + /** + * Creates a new Service instance using the specified properties. + * @param [properties] Properties to set + * @returns Service instance + */ + public static create(properties?: google.api.IService): google.api.Service; + + /** + * Encodes the specified Service message. Does not implicitly {@link google.api.Service.verify|verify} messages. + * @param message Service message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.api.Service.verify|verify} messages. + * @param message Service message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Service message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Service + * @throws {Error} If the payload is not 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.Service; + + /** + * Decodes a Service message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Service + * @throws {Error} If the payload 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.Service; + + /** + * Verifies a Service message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Service message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Service + */ + public static fromObject(object: { [k: string]: any }): google.api.Service; + + /** + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @param message Service + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Service to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Authentication. */ + interface IAuthentication { + + /** Authentication rules */ + rules?: (google.api.IAuthenticationRule[]|null); + + /** Authentication providers */ + providers?: (google.api.IAuthProvider[]|null); + } + + /** Represents an Authentication. */ + class Authentication implements IAuthentication { + + /** + * Constructs a new Authentication. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IAuthentication); + + /** Authentication rules. */ + public rules: google.api.IAuthenticationRule[]; + + /** Authentication providers. */ + public providers: google.api.IAuthProvider[]; + + /** + * Creates a new Authentication instance using the specified properties. + * @param [properties] Properties to set + * @returns Authentication instance + */ + public static create(properties?: google.api.IAuthentication): google.api.Authentication; + + /** + * Encodes the specified Authentication message. Does not implicitly {@link google.api.Authentication.verify|verify} messages. + * @param message Authentication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Authentication message, length delimited. Does not implicitly {@link google.api.Authentication.verify|verify} messages. + * @param message Authentication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Authentication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Authentication + * @throws {Error} If the payload is not 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.Authentication; + + /** + * Decodes an Authentication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Authentication + * @throws {Error} If the payload 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.Authentication; + + /** + * Verifies an Authentication message. + * @param message Plain 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 Authentication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Authentication + */ + public static fromObject(object: { [k: string]: any }): google.api.Authentication; + + /** + * Creates a plain object from an Authentication message. Also converts values to other types if specified. + * @param message Authentication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Authentication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Authentication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AuthenticationRule. */ + interface IAuthenticationRule { + + /** AuthenticationRule selector */ + selector?: (string|null); + + /** AuthenticationRule oauth */ + oauth?: (google.api.IOAuthRequirements|null); + + /** AuthenticationRule allowWithoutCredential */ + allowWithoutCredential?: (boolean|null); + + /** AuthenticationRule requirements */ + requirements?: (google.api.IAuthRequirement[]|null); + } + + /** Represents an AuthenticationRule. */ + class AuthenticationRule implements IAuthenticationRule { + + /** + * Constructs a new AuthenticationRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IAuthenticationRule); + + /** AuthenticationRule selector. */ + public selector: string; + + /** AuthenticationRule oauth. */ + public oauth?: (google.api.IOAuthRequirements|null); + + /** AuthenticationRule allowWithoutCredential. */ + public allowWithoutCredential: boolean; + + /** AuthenticationRule requirements. */ + public requirements: google.api.IAuthRequirement[]; + + /** + * Creates a new AuthenticationRule instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthenticationRule instance + */ + public static create(properties?: google.api.IAuthenticationRule): google.api.AuthenticationRule; + + /** + * Encodes the specified AuthenticationRule message. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. + * @param message AuthenticationRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IAuthenticationRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthenticationRule message, length delimited. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. + * @param message AuthenticationRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IAuthenticationRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthenticationRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthenticationRule + * @throws {Error} If the payload is not 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.AuthenticationRule; + + /** + * Decodes an AuthenticationRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthenticationRule + * @throws {Error} If the payload 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.AuthenticationRule; + + /** + * Verifies an AuthenticationRule message. + * @param message Plain 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 AuthenticationRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthenticationRule + */ + public static fromObject(object: { [k: string]: any }): google.api.AuthenticationRule; + + /** + * Creates a plain object from an AuthenticationRule message. Also converts values to other types if specified. + * @param message AuthenticationRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.AuthenticationRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthenticationRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a JwtLocation. */ + interface IJwtLocation { + + /** JwtLocation header */ + header?: (string|null); + + /** JwtLocation query */ + query?: (string|null); + + /** JwtLocation valuePrefix */ + valuePrefix?: (string|null); + } + + /** Represents a JwtLocation. */ + class JwtLocation implements IJwtLocation { + + /** + * Constructs a new JwtLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJwtLocation); + + /** JwtLocation header. */ + public header: string; + + /** JwtLocation query. */ + public query: string; + + /** JwtLocation valuePrefix. */ + public valuePrefix: string; + + /** JwtLocation in. */ + public in_?: ("header"|"query"); + + /** + * Creates a new JwtLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns JwtLocation instance + */ + public static create(properties?: google.api.IJwtLocation): google.api.JwtLocation; + + /** + * Encodes the specified JwtLocation message. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. + * @param message JwtLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJwtLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JwtLocation message, length delimited. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. + * @param message JwtLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJwtLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JwtLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JwtLocation + * @throws {Error} If the payload is not 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.JwtLocation; + + /** + * Decodes a JwtLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JwtLocation + * @throws {Error} If the payload 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.JwtLocation; + + /** + * Verifies a JwtLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JwtLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JwtLocation + */ + public static fromObject(object: { [k: string]: any }): google.api.JwtLocation; + + /** + * Creates a plain object from a JwtLocation message. Also converts values to other types if specified. + * @param message JwtLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JwtLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JwtLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AuthProvider. */ + interface IAuthProvider { + + /** AuthProvider id */ + id?: (string|null); + + /** AuthProvider issuer */ + issuer?: (string|null); + + /** AuthProvider jwksUri */ + jwksUri?: (string|null); + + /** AuthProvider audiences */ + audiences?: (string|null); + + /** AuthProvider authorizationUrl */ + authorizationUrl?: (string|null); + + /** AuthProvider jwtLocations */ + jwtLocations?: (google.api.IJwtLocation[]|null); + } + + /** Represents an AuthProvider. */ + class AuthProvider implements IAuthProvider { + + /** + * Constructs a new AuthProvider. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IAuthProvider); + + /** AuthProvider id. */ + public id: string; + + /** AuthProvider issuer. */ + public issuer: string; + + /** AuthProvider jwksUri. */ + public jwksUri: string; + + /** AuthProvider audiences. */ + public audiences: string; + + /** AuthProvider authorizationUrl. */ + public authorizationUrl: string; + + /** AuthProvider jwtLocations. */ + public jwtLocations: google.api.IJwtLocation[]; + + /** + * Creates a new AuthProvider instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthProvider instance + */ + public static create(properties?: google.api.IAuthProvider): google.api.AuthProvider; + + /** + * Encodes the specified AuthProvider message. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. + * @param message AuthProvider message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IAuthProvider, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthProvider message, length delimited. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. + * @param message AuthProvider message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IAuthProvider, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthProvider message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthProvider + * @throws {Error} If the payload is not 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.AuthProvider; + + /** + * Decodes an AuthProvider message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthProvider + * @throws {Error} If the payload 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.AuthProvider; + + /** + * Verifies an AuthProvider message. + * @param message Plain 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 AuthProvider message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthProvider + */ + public static fromObject(object: { [k: string]: any }): google.api.AuthProvider; + + /** + * Creates a plain object from an AuthProvider message. Also converts values to other types if specified. + * @param message AuthProvider + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.AuthProvider, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthProvider to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a OAuthRequirements. */ + interface IOAuthRequirements { + + /** OAuthRequirements canonicalScopes */ + canonicalScopes?: (string|null); + } + + /** Represents a OAuthRequirements. */ + class OAuthRequirements implements IOAuthRequirements { + + /** + * Constructs a new OAuthRequirements. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IOAuthRequirements); + + /** OAuthRequirements canonicalScopes. */ + public canonicalScopes: string; + + /** + * Creates a new OAuthRequirements instance using the specified properties. + * @param [properties] Properties to set + * @returns OAuthRequirements instance + */ + public static create(properties?: google.api.IOAuthRequirements): google.api.OAuthRequirements; + + /** + * Encodes the specified OAuthRequirements message. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. + * @param message OAuthRequirements message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IOAuthRequirements, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OAuthRequirements message, length delimited. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. + * @param message OAuthRequirements message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IOAuthRequirements, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OAuthRequirements message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OAuthRequirements + * @throws {Error} If the payload is not 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.OAuthRequirements; + + /** + * Decodes a OAuthRequirements message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OAuthRequirements + * @throws {Error} If the payload 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.OAuthRequirements; + + /** + * Verifies a OAuthRequirements message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OAuthRequirements message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OAuthRequirements + */ + public static fromObject(object: { [k: string]: any }): google.api.OAuthRequirements; + + /** + * Creates a plain object from a OAuthRequirements message. Also converts values to other types if specified. + * @param message OAuthRequirements + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.OAuthRequirements, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OAuthRequirements to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AuthRequirement. */ + interface IAuthRequirement { + + /** AuthRequirement providerId */ + providerId?: (string|null); + + /** AuthRequirement audiences */ + audiences?: (string|null); + } + + /** Represents an AuthRequirement. */ + class AuthRequirement implements IAuthRequirement { + + /** + * Constructs a new AuthRequirement. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IAuthRequirement); + + /** AuthRequirement providerId. */ + public providerId: string; + + /** AuthRequirement audiences. */ + public audiences: string; + + /** + * Creates a new AuthRequirement instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthRequirement instance + */ + public static create(properties?: google.api.IAuthRequirement): google.api.AuthRequirement; + + /** + * Encodes the specified AuthRequirement message. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. + * @param message AuthRequirement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IAuthRequirement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthRequirement message, length delimited. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. + * @param message AuthRequirement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IAuthRequirement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthRequirement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthRequirement + * @throws {Error} If the payload is not 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.AuthRequirement; + + /** + * Decodes an AuthRequirement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthRequirement + * @throws {Error} If the payload 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.AuthRequirement; + + /** + * Verifies an AuthRequirement message. + * @param message Plain 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 AuthRequirement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthRequirement + */ + public static fromObject(object: { [k: string]: any }): google.api.AuthRequirement; + + /** + * Creates a plain object from an AuthRequirement message. Also converts values to other types if specified. + * @param message AuthRequirement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.AuthRequirement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthRequirement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Backend. */ + interface IBackend { + + /** Backend rules */ + rules?: (google.api.IBackendRule[]|null); + } + + /** Represents a Backend. */ + class Backend implements IBackend { + + /** + * Constructs a new Backend. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IBackend); + + /** Backend rules. */ + public rules: google.api.IBackendRule[]; + + /** + * Creates a new Backend instance using the specified properties. + * @param [properties] Properties to set + * @returns Backend instance + */ + public static create(properties?: google.api.IBackend): google.api.Backend; + + /** + * Encodes the specified Backend message. Does not implicitly {@link google.api.Backend.verify|verify} messages. + * @param message Backend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IBackend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Backend message, length delimited. Does not implicitly {@link google.api.Backend.verify|verify} messages. + * @param message Backend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IBackend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Backend message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Backend + * @throws {Error} If the payload is not 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.Backend; + + /** + * Decodes a Backend message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Backend + * @throws {Error} If the payload 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.Backend; + + /** + * Verifies a Backend message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Backend message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Backend + */ + public static fromObject(object: { [k: string]: any }): google.api.Backend; + + /** + * Creates a plain object from a Backend message. Also converts values to other types if specified. + * @param message Backend + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Backend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Backend to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BackendRule. */ + interface IBackendRule { + + /** BackendRule selector */ + selector?: (string|null); + + /** BackendRule address */ + address?: (string|null); + + /** BackendRule deadline */ + deadline?: (number|null); + + /** BackendRule minDeadline */ + minDeadline?: (number|null); + + /** BackendRule operationDeadline */ + operationDeadline?: (number|null); + + /** BackendRule pathTranslation */ + pathTranslation?: (google.api.BackendRule.PathTranslation|keyof typeof google.api.BackendRule.PathTranslation|null); + + /** BackendRule jwtAudience */ + jwtAudience?: (string|null); + + /** BackendRule disableAuth */ + disableAuth?: (boolean|null); + + /** BackendRule protocol */ + protocol?: (string|null); + } + + /** Represents a BackendRule. */ + class BackendRule implements IBackendRule { + + /** + * Constructs a new BackendRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IBackendRule); + + /** BackendRule selector. */ + public selector: string; + + /** BackendRule address. */ + public address: string; + + /** BackendRule deadline. */ + public deadline: number; + + /** BackendRule minDeadline. */ + public minDeadline: number; + + /** BackendRule operationDeadline. */ + public operationDeadline: number; + + /** BackendRule pathTranslation. */ + public pathTranslation: (google.api.BackendRule.PathTranslation|keyof typeof google.api.BackendRule.PathTranslation); + + /** BackendRule jwtAudience. */ + public jwtAudience: string; + + /** BackendRule disableAuth. */ + public disableAuth: boolean; + + /** BackendRule protocol. */ + public protocol: string; + + /** BackendRule authentication. */ + public authentication?: ("jwtAudience"|"disableAuth"); + + /** + * Creates a new BackendRule instance using the specified properties. + * @param [properties] Properties to set + * @returns BackendRule instance + */ + public static create(properties?: google.api.IBackendRule): google.api.BackendRule; + + /** + * Encodes the specified BackendRule message. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. + * @param message BackendRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IBackendRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackendRule message, length delimited. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. + * @param message BackendRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IBackendRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackendRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackendRule + * @throws {Error} If the payload is not 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.BackendRule; + + /** + * Decodes a BackendRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackendRule + * @throws {Error} If the payload 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.BackendRule; + + /** + * Verifies a BackendRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackendRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackendRule + */ + public static fromObject(object: { [k: string]: any }): google.api.BackendRule; + + /** + * Creates a plain object from a BackendRule message. Also converts values to other types if specified. + * @param message BackendRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.BackendRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackendRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BackendRule { + + /** PathTranslation enum. */ + enum PathTranslation { + PATH_TRANSLATION_UNSPECIFIED = 0, + CONSTANT_ADDRESS = 1, + APPEND_PATH_TO_ADDRESS = 2 + } + } + + /** Properties of a Billing. */ + interface IBilling { + + /** Billing consumerDestinations */ + consumerDestinations?: (google.api.Billing.IBillingDestination[]|null); + } + + /** Represents a Billing. */ + class Billing implements IBilling { + + /** + * Constructs a new Billing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IBilling); + + /** Billing consumerDestinations. */ + public consumerDestinations: google.api.Billing.IBillingDestination[]; + + /** + * Creates a new Billing instance using the specified properties. + * @param [properties] Properties to set + * @returns Billing instance + */ + public static create(properties?: google.api.IBilling): google.api.Billing; + + /** + * Encodes the specified Billing message. Does not implicitly {@link google.api.Billing.verify|verify} messages. + * @param message Billing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IBilling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Billing message, length delimited. Does not implicitly {@link google.api.Billing.verify|verify} messages. + * @param message Billing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IBilling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Billing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Billing + * @throws {Error} If the payload is not 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.Billing; + + /** + * Decodes a Billing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Billing + * @throws {Error} If the payload 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.Billing; + + /** + * Verifies a Billing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Billing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Billing + */ + public static fromObject(object: { [k: string]: any }): google.api.Billing; + + /** + * Creates a plain object from a Billing message. Also converts values to other types if specified. + * @param message Billing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Billing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Billing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Billing { + + /** Properties of a BillingDestination. */ + interface IBillingDestination { + + /** BillingDestination monitoredResource */ + monitoredResource?: (string|null); + + /** BillingDestination metrics */ + metrics?: (string[]|null); + } + + /** Represents a BillingDestination. */ + class BillingDestination implements IBillingDestination { + + /** + * Constructs a new BillingDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Billing.IBillingDestination); + + /** BillingDestination monitoredResource. */ + public monitoredResource: string; + + /** BillingDestination metrics. */ + public metrics: string[]; + + /** + * Creates a new BillingDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns BillingDestination instance + */ + public static create(properties?: google.api.Billing.IBillingDestination): google.api.Billing.BillingDestination; + + /** + * Encodes the specified BillingDestination message. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. + * @param message BillingDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Billing.IBillingDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BillingDestination message, length delimited. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. + * @param message BillingDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Billing.IBillingDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BillingDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BillingDestination + * @throws {Error} If the payload is not 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.Billing.BillingDestination; + + /** + * Decodes a BillingDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BillingDestination + * @throws {Error} If the payload 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.Billing.BillingDestination; + + /** + * Verifies a BillingDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BillingDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BillingDestination + */ + public static fromObject(object: { [k: string]: any }): google.api.Billing.BillingDestination; + + /** + * Creates a plain object from a BillingDestination message. Also converts values to other types if specified. + * @param message BillingDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Billing.BillingDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BillingDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Context. */ + interface IContext { + + /** Context rules */ + rules?: (google.api.IContextRule[]|null); + } + + /** Represents a Context. */ + class Context implements IContext { + + /** + * Constructs a new Context. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IContext); + + /** Context rules. */ + public rules: google.api.IContextRule[]; + + /** + * Creates a new Context instance using the specified properties. + * @param [properties] Properties to set + * @returns Context instance + */ + public static create(properties?: google.api.IContext): google.api.Context; + + /** + * Encodes the specified Context message. Does not implicitly {@link google.api.Context.verify|verify} messages. + * @param message Context message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.api.Context.verify|verify} messages. + * @param message Context message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Context message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Context + * @throws {Error} If the payload is not 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.Context; + + /** + * Decodes a Context message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Context + * @throws {Error} If the payload 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.Context; + + /** + * Verifies a Context message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Context message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Context + */ + public static fromObject(object: { [k: string]: any }): google.api.Context; + + /** + * Creates a plain object from a Context message. Also converts values to other types if specified. + * @param message Context + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Context, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Context to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ContextRule. */ + interface IContextRule { + + /** ContextRule selector */ + selector?: (string|null); + + /** ContextRule requested */ + requested?: (string[]|null); + + /** ContextRule provided */ + provided?: (string[]|null); + + /** ContextRule allowedRequestExtensions */ + allowedRequestExtensions?: (string[]|null); + + /** ContextRule allowedResponseExtensions */ + allowedResponseExtensions?: (string[]|null); + } + + /** Represents a ContextRule. */ + class ContextRule implements IContextRule { + + /** + * Constructs a new ContextRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IContextRule); + + /** ContextRule selector. */ + public selector: string; + + /** ContextRule requested. */ + public requested: string[]; + + /** ContextRule provided. */ + public provided: string[]; + + /** ContextRule allowedRequestExtensions. */ + public allowedRequestExtensions: string[]; + + /** ContextRule allowedResponseExtensions. */ + public allowedResponseExtensions: string[]; + + /** + * Creates a new ContextRule instance using the specified properties. + * @param [properties] Properties to set + * @returns ContextRule instance + */ + public static create(properties?: google.api.IContextRule): google.api.ContextRule; + + /** + * Encodes the specified ContextRule message. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. + * @param message ContextRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IContextRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContextRule message, length delimited. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. + * @param message ContextRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IContextRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContextRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContextRule + * @throws {Error} If the payload is not 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.ContextRule; + + /** + * Decodes a ContextRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContextRule + * @throws {Error} If the payload 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.ContextRule; + + /** + * Verifies a ContextRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContextRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContextRule + */ + public static fromObject(object: { [k: string]: any }): google.api.ContextRule; + + /** + * Creates a plain object from a ContextRule message. Also converts values to other types if specified. + * @param message ContextRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ContextRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContextRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Control. */ + interface IControl { + + /** Control environment */ + environment?: (string|null); + } + + /** Represents a Control. */ + class Control implements IControl { + + /** + * Constructs a new Control. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IControl); + + /** Control environment. */ + public environment: string; + + /** + * Creates a new Control instance using the specified properties. + * @param [properties] Properties to set + * @returns Control instance + */ + public static create(properties?: google.api.IControl): google.api.Control; + + /** + * Encodes the specified Control message. Does not implicitly {@link google.api.Control.verify|verify} messages. + * @param message Control message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Control message, length delimited. Does not implicitly {@link google.api.Control.verify|verify} messages. + * @param message Control message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Control message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Control + * @throws {Error} If the payload is not 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.Control; + + /** + * Decodes a Control message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Control + * @throws {Error} If the payload 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.Control; + + /** + * Verifies a Control message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Control message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Control + */ + public static fromObject(object: { [k: string]: any }): google.api.Control; + + /** + * Creates a plain object from a Control message. Also converts values to other types if specified. + * @param message Control + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Control, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Control to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Documentation. */ + interface IDocumentation { + + /** Documentation summary */ + summary?: (string|null); + + /** Documentation pages */ + pages?: (google.api.IPage[]|null); + + /** Documentation rules */ + rules?: (google.api.IDocumentationRule[]|null); + + /** Documentation documentationRootUrl */ + documentationRootUrl?: (string|null); + + /** Documentation serviceRootUrl */ + serviceRootUrl?: (string|null); + + /** Documentation overview */ + overview?: (string|null); + } + + /** Represents a Documentation. */ + class Documentation implements IDocumentation { + + /** + * Constructs a new Documentation. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDocumentation); + + /** Documentation summary. */ + public summary: string; + + /** Documentation pages. */ + public pages: google.api.IPage[]; + + /** Documentation rules. */ + public rules: google.api.IDocumentationRule[]; + + /** Documentation documentationRootUrl. */ + public documentationRootUrl: string; + + /** Documentation serviceRootUrl. */ + public serviceRootUrl: string; + + /** Documentation overview. */ + public overview: string; + + /** + * Creates a new Documentation instance using the specified properties. + * @param [properties] Properties to set + * @returns Documentation instance + */ + public static create(properties?: google.api.IDocumentation): google.api.Documentation; + + /** + * Encodes the specified Documentation message. Does not implicitly {@link google.api.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.api.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Documentation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Documentation + * @throws {Error} If the payload is not 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.Documentation; + + /** + * Decodes a Documentation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Documentation + * @throws {Error} If the payload 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.Documentation; + + /** + * Verifies a Documentation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Documentation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Documentation + */ + public static fromObject(object: { [k: string]: any }): google.api.Documentation; + + /** + * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * @param message Documentation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Documentation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Documentation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DocumentationRule. */ + interface IDocumentationRule { + + /** DocumentationRule selector */ + selector?: (string|null); + + /** DocumentationRule description */ + description?: (string|null); + + /** DocumentationRule deprecationDescription */ + deprecationDescription?: (string|null); + } + + /** Represents a DocumentationRule. */ + class DocumentationRule implements IDocumentationRule { + + /** + * Constructs a new DocumentationRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDocumentationRule); + + /** DocumentationRule selector. */ + public selector: string; + + /** DocumentationRule description. */ + public description: string; + + /** DocumentationRule deprecationDescription. */ + public deprecationDescription: string; + + /** + * Creates a new DocumentationRule instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentationRule instance + */ + public static create(properties?: google.api.IDocumentationRule): google.api.DocumentationRule; + + /** + * Encodes the specified DocumentationRule message. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. + * @param message DocumentationRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDocumentationRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DocumentationRule message, length delimited. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. + * @param message DocumentationRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDocumentationRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DocumentationRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentationRule + * @throws {Error} If the payload is not 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.DocumentationRule; + + /** + * Decodes a DocumentationRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentationRule + * @throws {Error} If the payload 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.DocumentationRule; + + /** + * Verifies a DocumentationRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DocumentationRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentationRule + */ + public static fromObject(object: { [k: string]: any }): google.api.DocumentationRule; + + /** + * Creates a plain object from a DocumentationRule message. Also converts values to other types if specified. + * @param message DocumentationRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DocumentationRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentationRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Page. */ + interface IPage { + + /** Page name */ + name?: (string|null); + + /** Page content */ + content?: (string|null); + + /** Page subpages */ + subpages?: (google.api.IPage[]|null); + } + + /** Represents a Page. */ + class Page implements IPage { + + /** + * Constructs a new Page. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPage); + + /** Page name. */ + public name: string; + + /** Page content. */ + public content: string; + + /** Page subpages. */ + public subpages: google.api.IPage[]; + + /** + * Creates a new Page instance using the specified properties. + * @param [properties] Properties to set + * @returns Page instance + */ + public static create(properties?: google.api.IPage): google.api.Page; + + /** + * Encodes the specified Page message. Does not implicitly {@link google.api.Page.verify|verify} messages. + * @param message Page message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.api.Page.verify|verify} messages. + * @param message Page message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Page message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Page + * @throws {Error} If the payload is not 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.Page; + + /** + * Decodes a Page message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Page + * @throws {Error} If the payload 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.Page; + + /** + * Verifies a Page message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Page message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Page + */ + public static fromObject(object: { [k: string]: any }): google.api.Page; + + /** + * Creates a plain object from a Page message. Also converts values to other types if specified. + * @param message Page + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Page to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Endpoint. */ + interface IEndpoint { + + /** Endpoint name */ + name?: (string|null); + + /** Endpoint aliases */ + aliases?: (string[]|null); + + /** Endpoint target */ + target?: (string|null); + + /** Endpoint allowCors */ + allowCors?: (boolean|null); + } + + /** Represents an Endpoint. */ + class Endpoint implements IEndpoint { + + /** + * Constructs a new Endpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IEndpoint); + + /** Endpoint name. */ + public name: string; + + /** Endpoint aliases. */ + public aliases: string[]; + + /** Endpoint target. */ + public target: string; + + /** Endpoint allowCors. */ + public allowCors: boolean; + + /** + * Creates a new Endpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns Endpoint instance + */ + public static create(properties?: google.api.IEndpoint): google.api.Endpoint; + + /** + * Encodes the specified Endpoint message. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Endpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Endpoint + * @throws {Error} If the payload is not 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.Endpoint; + + /** + * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Endpoint + * @throws {Error} If the payload 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.Endpoint; + + /** + * Verifies an Endpoint message. + * @param message Plain 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 Endpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Endpoint + */ + public static fromObject(object: { [k: string]: any }): google.api.Endpoint; + + /** + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @param message Endpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Endpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LogDescriptor. */ + interface ILogDescriptor { + + /** LogDescriptor name */ + name?: (string|null); + + /** LogDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** LogDescriptor description */ + description?: (string|null); + + /** LogDescriptor displayName */ + displayName?: (string|null); + } + + /** Represents a LogDescriptor. */ + class LogDescriptor implements ILogDescriptor { + + /** + * Constructs a new LogDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ILogDescriptor); + + /** LogDescriptor name. */ + public name: string; + + /** LogDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** LogDescriptor description. */ + public description: string; + + /** LogDescriptor displayName. */ + public displayName: string; + + /** + * Creates a new LogDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns LogDescriptor instance + */ + public static create(properties?: google.api.ILogDescriptor): google.api.LogDescriptor; + + /** + * Encodes the specified LogDescriptor message. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. + * @param message LogDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ILogDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogDescriptor message, length delimited. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. + * @param message LogDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ILogDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogDescriptor + * @throws {Error} If the payload is not 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.LogDescriptor; + + /** + * Decodes a LogDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogDescriptor + * @throws {Error} If the payload 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.LogDescriptor; + + /** + * Verifies a LogDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.LogDescriptor; + + /** + * Creates a plain object from a LogDescriptor message. Also converts values to other types if specified. + * @param message LogDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.LogDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Logging. */ + interface ILogging { + + /** Logging producerDestinations */ + producerDestinations?: (google.api.Logging.ILoggingDestination[]|null); + + /** Logging consumerDestinations */ + consumerDestinations?: (google.api.Logging.ILoggingDestination[]|null); + } + + /** Represents a Logging. */ + class Logging implements ILogging { + + /** + * Constructs a new Logging. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ILogging); + + /** Logging producerDestinations. */ + public producerDestinations: google.api.Logging.ILoggingDestination[]; + + /** Logging consumerDestinations. */ + public consumerDestinations: google.api.Logging.ILoggingDestination[]; + + /** + * Creates a new Logging instance using the specified properties. + * @param [properties] Properties to set + * @returns Logging instance + */ + public static create(properties?: google.api.ILogging): google.api.Logging; + + /** + * Encodes the specified Logging message. Does not implicitly {@link google.api.Logging.verify|verify} messages. + * @param message Logging message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ILogging, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Logging message, length delimited. Does not implicitly {@link google.api.Logging.verify|verify} messages. + * @param message Logging message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ILogging, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Logging message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Logging + * @throws {Error} If the payload is not 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.Logging; + + /** + * Decodes a Logging message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Logging + * @throws {Error} If the payload 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.Logging; + + /** + * Verifies a Logging message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Logging message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Logging + */ + public static fromObject(object: { [k: string]: any }): google.api.Logging; + + /** + * Creates a plain object from a Logging message. Also converts values to other types if specified. + * @param message Logging + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Logging, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Logging to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Logging { + + /** Properties of a LoggingDestination. */ + interface ILoggingDestination { + + /** LoggingDestination monitoredResource */ + monitoredResource?: (string|null); + + /** LoggingDestination logs */ + logs?: (string[]|null); + } + + /** Represents a LoggingDestination. */ + class LoggingDestination implements ILoggingDestination { + + /** + * Constructs a new LoggingDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Logging.ILoggingDestination); + + /** LoggingDestination monitoredResource. */ + public monitoredResource: string; + + /** LoggingDestination logs. */ + public logs: string[]; + + /** + * Creates a new LoggingDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns LoggingDestination instance + */ + public static create(properties?: google.api.Logging.ILoggingDestination): google.api.Logging.LoggingDestination; + + /** + * Encodes the specified LoggingDestination message. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * @param message LoggingDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Logging.ILoggingDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoggingDestination message, length delimited. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * @param message LoggingDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Logging.ILoggingDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoggingDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoggingDestination + * @throws {Error} If the payload is not 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.Logging.LoggingDestination; + + /** + * Decodes a LoggingDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoggingDestination + * @throws {Error} If the payload 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.Logging.LoggingDestination; + + /** + * Verifies a LoggingDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoggingDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoggingDestination + */ + public static fromObject(object: { [k: string]: any }): google.api.Logging.LoggingDestination; + + /** + * Creates a plain object from a LoggingDestination message. Also converts values to other types if specified. + * @param message LoggingDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Logging.LoggingDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoggingDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a MonitoredResourceDescriptor. */ + interface IMonitoredResourceDescriptor { + + /** MonitoredResourceDescriptor name */ + name?: (string|null); + + /** MonitoredResourceDescriptor type */ + type?: (string|null); + + /** MonitoredResourceDescriptor displayName */ + displayName?: (string|null); + + /** MonitoredResourceDescriptor description */ + description?: (string|null); + + /** MonitoredResourceDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** MonitoredResourceDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + } + + /** Represents a MonitoredResourceDescriptor. */ + class MonitoredResourceDescriptor implements IMonitoredResourceDescriptor { + + /** + * Constructs a new MonitoredResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResourceDescriptor); + + /** MonitoredResourceDescriptor name. */ + public name: string; + + /** MonitoredResourceDescriptor type. */ + public type: string; + + /** MonitoredResourceDescriptor displayName. */ + public displayName: string; + + /** MonitoredResourceDescriptor description. */ + public description: string; + + /** MonitoredResourceDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** MonitoredResourceDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResourceDescriptor instance + */ + public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; + + /** + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResourceDescriptor + * @throws {Error} If the payload is not 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.MonitoredResourceDescriptor; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResourceDescriptor + * @throws {Error} If the payload 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.MonitoredResourceDescriptor; + + /** + * Verifies a MonitoredResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; + + /** + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @param message MonitoredResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoredResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonitoredResource. */ + interface IMonitoredResource { + + /** MonitoredResource type */ + type?: (string|null); + + /** MonitoredResource labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a MonitoredResource. */ + class MonitoredResource implements IMonitoredResource { + + /** + * Constructs a new MonitoredResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResource); + + /** MonitoredResource type. */ + public type: string; + + /** MonitoredResource labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new MonitoredResource instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResource instance + */ + public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; + + /** + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResource + * @throws {Error} If the payload is not 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.MonitoredResource; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResource + * @throws {Error} If the payload 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.MonitoredResource; + + /** + * Verifies a MonitoredResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResource + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; + + /** + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @param message MonitoredResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoredResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonitoredResourceMetadata. */ + interface IMonitoredResourceMetadata { + + /** MonitoredResourceMetadata systemLabels */ + systemLabels?: (google.protobuf.IStruct|null); + + /** MonitoredResourceMetadata userLabels */ + userLabels?: ({ [k: string]: string }|null); + } + + /** Represents a MonitoredResourceMetadata. */ + class MonitoredResourceMetadata implements IMonitoredResourceMetadata { + + /** + * Constructs a new MonitoredResourceMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResourceMetadata); + + /** MonitoredResourceMetadata systemLabels. */ + public systemLabels?: (google.protobuf.IStruct|null); + + /** MonitoredResourceMetadata userLabels. */ + public userLabels: { [k: string]: string }; + + /** + * Creates a new MonitoredResourceMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResourceMetadata instance + */ + public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; + + /** + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResourceMetadata + * @throws {Error} If the payload is not 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.MonitoredResourceMetadata; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResourceMetadata + * @throws {Error} If the payload 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.MonitoredResourceMetadata; + + /** + * Verifies a MonitoredResourceMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResourceMetadata + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; + + /** + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @param message MonitoredResourceMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoredResourceMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Monitoring. */ + interface IMonitoring { + + /** Monitoring producerDestinations */ + producerDestinations?: (google.api.Monitoring.IMonitoringDestination[]|null); + + /** Monitoring consumerDestinations */ + consumerDestinations?: (google.api.Monitoring.IMonitoringDestination[]|null); + } + + /** Represents a Monitoring. */ + class Monitoring implements IMonitoring { + + /** + * Constructs a new Monitoring. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoring); + + /** Monitoring producerDestinations. */ + public producerDestinations: google.api.Monitoring.IMonitoringDestination[]; + + /** Monitoring consumerDestinations. */ + public consumerDestinations: google.api.Monitoring.IMonitoringDestination[]; + + /** + * Creates a new Monitoring instance using the specified properties. + * @param [properties] Properties to set + * @returns Monitoring instance + */ + public static create(properties?: google.api.IMonitoring): google.api.Monitoring; + + /** + * Encodes the specified Monitoring message. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. + * @param message Monitoring message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoring, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Monitoring message, length delimited. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. + * @param message Monitoring message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoring, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Monitoring message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Monitoring + * @throws {Error} If the payload is not 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.Monitoring; + + /** + * Decodes a Monitoring message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Monitoring + * @throws {Error} If the payload 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.Monitoring; + + /** + * Verifies a Monitoring message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Monitoring message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Monitoring + */ + public static fromObject(object: { [k: string]: any }): google.api.Monitoring; + + /** + * Creates a plain object from a Monitoring message. Also converts values to other types if specified. + * @param message Monitoring + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Monitoring, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Monitoring to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Monitoring { + + /** Properties of a MonitoringDestination. */ + interface IMonitoringDestination { + + /** MonitoringDestination monitoredResource */ + monitoredResource?: (string|null); + + /** MonitoringDestination metrics */ + metrics?: (string[]|null); + } + + /** Represents a MonitoringDestination. */ + class MonitoringDestination implements IMonitoringDestination { + + /** + * Constructs a new MonitoringDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Monitoring.IMonitoringDestination); + + /** MonitoringDestination monitoredResource. */ + public monitoredResource: string; + + /** MonitoringDestination metrics. */ + public metrics: string[]; + + /** + * Creates a new MonitoringDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoringDestination instance + */ + public static create(properties?: google.api.Monitoring.IMonitoringDestination): google.api.Monitoring.MonitoringDestination; + + /** + * Encodes the specified MonitoringDestination message. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. + * @param message MonitoringDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Monitoring.IMonitoringDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoringDestination message, length delimited. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. + * @param message MonitoringDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Monitoring.IMonitoringDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoringDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoringDestination + * @throws {Error} If the payload is not 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.Monitoring.MonitoringDestination; + + /** + * Decodes a MonitoringDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoringDestination + * @throws {Error} If the payload 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.Monitoring.MonitoringDestination; + + /** + * Verifies a MonitoringDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoringDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoringDestination + */ + public static fromObject(object: { [k: string]: any }): google.api.Monitoring.MonitoringDestination; + + /** + * Creates a plain object from a MonitoringDestination message. Also converts values to other types if specified. + * @param message MonitoringDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Monitoring.MonitoringDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoringDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** 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 SourceInfo. */ + interface ISourceInfo { + + /** SourceInfo sourceFiles */ + sourceFiles?: (google.protobuf.IAny[]|null); + } + + /** Represents a SourceInfo. */ + class SourceInfo implements ISourceInfo { + + /** + * Constructs a new SourceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISourceInfo); + + /** SourceInfo sourceFiles. */ + public sourceFiles: google.protobuf.IAny[]; + + /** + * Creates a new SourceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceInfo instance + */ + public static create(properties?: google.api.ISourceInfo): google.api.SourceInfo; + + /** + * Encodes the specified SourceInfo message. Does not implicitly {@link google.api.SourceInfo.verify|verify} messages. + * @param message SourceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceInfo message, length delimited. Does not implicitly {@link google.api.SourceInfo.verify|verify} messages. + * @param message SourceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceInfo + * @throws {Error} If the payload is not 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.SourceInfo; + + /** + * Decodes a SourceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceInfo + * @throws {Error} If the payload 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.SourceInfo; + + /** + * Verifies a SourceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.SourceInfo; + + /** + * Creates a plain object from a SourceInfo message. Also converts values to other types if specified. + * @param message SourceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SourceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SystemParameters. */ + interface ISystemParameters { + + /** SystemParameters rules */ + rules?: (google.api.ISystemParameterRule[]|null); + } + + /** Represents a SystemParameters. */ + class SystemParameters implements ISystemParameters { + + /** + * Constructs a new SystemParameters. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISystemParameters); + + /** SystemParameters rules. */ + public rules: google.api.ISystemParameterRule[]; + + /** + * Creates a new SystemParameters instance using the specified properties. + * @param [properties] Properties to set + * @returns SystemParameters instance + */ + public static create(properties?: google.api.ISystemParameters): google.api.SystemParameters; + + /** + * Encodes the specified SystemParameters message. Does not implicitly {@link google.api.SystemParameters.verify|verify} messages. + * @param message SystemParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISystemParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SystemParameters message, length delimited. Does not implicitly {@link google.api.SystemParameters.verify|verify} messages. + * @param message SystemParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISystemParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SystemParameters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SystemParameters + * @throws {Error} If the payload is not 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.SystemParameters; + + /** + * Decodes a SystemParameters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SystemParameters + * @throws {Error} If the payload 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.SystemParameters; + + /** + * Verifies a SystemParameters message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SystemParameters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SystemParameters + */ + public static fromObject(object: { [k: string]: any }): google.api.SystemParameters; + + /** + * Creates a plain object from a SystemParameters message. Also converts values to other types if specified. + * @param message SystemParameters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SystemParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SystemParameters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SystemParameterRule. */ + interface ISystemParameterRule { + + /** SystemParameterRule selector */ + selector?: (string|null); + + /** SystemParameterRule parameters */ + parameters?: (google.api.ISystemParameter[]|null); + } + + /** Represents a SystemParameterRule. */ + class SystemParameterRule implements ISystemParameterRule { + + /** + * Constructs a new SystemParameterRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISystemParameterRule); + + /** SystemParameterRule selector. */ + public selector: string; + + /** SystemParameterRule parameters. */ + public parameters: google.api.ISystemParameter[]; + + /** + * Creates a new SystemParameterRule instance using the specified properties. + * @param [properties] Properties to set + * @returns SystemParameterRule instance + */ + public static create(properties?: google.api.ISystemParameterRule): google.api.SystemParameterRule; + + /** + * Encodes the specified SystemParameterRule message. Does not implicitly {@link google.api.SystemParameterRule.verify|verify} messages. + * @param message SystemParameterRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISystemParameterRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SystemParameterRule message, length delimited. Does not implicitly {@link google.api.SystemParameterRule.verify|verify} messages. + * @param message SystemParameterRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISystemParameterRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SystemParameterRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SystemParameterRule + * @throws {Error} If the payload is not 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.SystemParameterRule; + + /** + * Decodes a SystemParameterRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SystemParameterRule + * @throws {Error} If the payload 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.SystemParameterRule; + + /** + * Verifies a SystemParameterRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SystemParameterRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SystemParameterRule + */ + public static fromObject(object: { [k: string]: any }): google.api.SystemParameterRule; + + /** + * Creates a plain object from a SystemParameterRule message. Also converts values to other types if specified. + * @param message SystemParameterRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SystemParameterRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SystemParameterRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SystemParameter. */ + interface ISystemParameter { + + /** SystemParameter name */ + name?: (string|null); + + /** SystemParameter httpHeader */ + httpHeader?: (string|null); + + /** SystemParameter urlQueryParameter */ + urlQueryParameter?: (string|null); + } + + /** Represents a SystemParameter. */ + class SystemParameter implements ISystemParameter { + + /** + * Constructs a new SystemParameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISystemParameter); + + /** SystemParameter name. */ + public name: string; + + /** SystemParameter httpHeader. */ + public httpHeader: string; + + /** SystemParameter urlQueryParameter. */ + public urlQueryParameter: string; + + /** + * Creates a new SystemParameter instance using the specified properties. + * @param [properties] Properties to set + * @returns SystemParameter instance + */ + public static create(properties?: google.api.ISystemParameter): google.api.SystemParameter; + + /** + * Encodes the specified SystemParameter message. Does not implicitly {@link google.api.SystemParameter.verify|verify} messages. + * @param message SystemParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISystemParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SystemParameter message, length delimited. Does not implicitly {@link google.api.SystemParameter.verify|verify} messages. + * @param message SystemParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISystemParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SystemParameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SystemParameter + * @throws {Error} If the payload is not 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.SystemParameter; + + /** + * Decodes a SystemParameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SystemParameter + * @throws {Error} If the payload 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.SystemParameter; + + /** + * Verifies a SystemParameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SystemParameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SystemParameter + */ + public static fromObject(object: { [k: string]: any }): google.api.SystemParameter; + + /** + * Creates a plain object from a SystemParameter message. Also converts values to other types if specified. + * @param message SystemParameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SystemParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SystemParameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Usage. */ + interface IUsage { + + /** Usage requirements */ + requirements?: (string[]|null); + + /** Usage rules */ + rules?: (google.api.IUsageRule[]|null); + + /** Usage producerNotificationChannel */ + producerNotificationChannel?: (string|null); + } + + /** Represents a Usage. */ + class Usage implements IUsage { + + /** + * Constructs a new Usage. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IUsage); + + /** Usage requirements. */ + public requirements: string[]; + + /** Usage rules. */ + public rules: google.api.IUsageRule[]; + + /** Usage producerNotificationChannel. */ + public producerNotificationChannel: string; + + /** + * Creates a new Usage instance using the specified properties. + * @param [properties] Properties to set + * @returns Usage instance + */ + public static create(properties?: google.api.IUsage): google.api.Usage; + + /** + * Encodes the specified Usage message. Does not implicitly {@link google.api.Usage.verify|verify} messages. + * @param message Usage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Usage message, length delimited. Does not implicitly {@link google.api.Usage.verify|verify} messages. + * @param message Usage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Usage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Usage + * @throws {Error} If the payload is not 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.Usage; + + /** + * Decodes a Usage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Usage + * @throws {Error} If the payload 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.Usage; + + /** + * Verifies a Usage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Usage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Usage + */ + public static fromObject(object: { [k: string]: any }): google.api.Usage; + + /** + * Creates a plain object from a Usage message. Also converts values to other types if specified. + * @param message Usage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Usage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Usage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a UsageRule. */ + interface IUsageRule { + + /** UsageRule selector */ + selector?: (string|null); + + /** UsageRule allowUnregisteredCalls */ + allowUnregisteredCalls?: (boolean|null); + + /** UsageRule skipServiceControl */ + skipServiceControl?: (boolean|null); + } + + /** Represents a UsageRule. */ + class UsageRule implements IUsageRule { + + /** + * Constructs a new UsageRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IUsageRule); + + /** UsageRule selector. */ + public selector: string; + + /** UsageRule allowUnregisteredCalls. */ + public allowUnregisteredCalls: boolean; + + /** UsageRule skipServiceControl. */ + public skipServiceControl: boolean; + + /** + * Creates a new UsageRule instance using the specified properties. + * @param [properties] Properties to set + * @returns UsageRule instance + */ + public static create(properties?: google.api.IUsageRule): google.api.UsageRule; + + /** + * Encodes the specified UsageRule message. Does not implicitly {@link google.api.UsageRule.verify|verify} messages. + * @param message UsageRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IUsageRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsageRule message, length delimited. Does not implicitly {@link google.api.UsageRule.verify|verify} messages. + * @param message UsageRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IUsageRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UsageRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UsageRule + * @throws {Error} If the payload is not 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.UsageRule; + + /** + * Decodes a UsageRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UsageRule + * @throws {Error} If the payload 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.UsageRule; + + /** + * Verifies a UsageRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UsageRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UsageRule + */ + public static fromObject(object: { [k: string]: any }): google.api.UsageRule; + + /** + * Creates a plain object from a UsageRule message. Also converts values to other types if specified. + * @param message UsageRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.UsageRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UsageRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not 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.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload 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.Struct; + + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue); + + /** Value numberValue. */ + public numberValue: number; + + /** Value stringValue. */ + public stringValue: string; + + /** Value boolValue. */ + public boolValue: boolean; + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not 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.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload 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.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @throws {Error} If the payload is not 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.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @throws {Error} If the payload 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.ListValue; + + /** + * Verifies a ListValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue 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 an Api. */ + interface IApi { + + /** Api name */ + name?: (string|null); + + /** Api methods */ + methods?: (google.protobuf.IMethod[]|null); + + /** Api options */ + options?: (google.protobuf.IOption[]|null); + + /** Api version */ + version?: (string|null); + + /** Api sourceContext */ + sourceContext?: (google.protobuf.ISourceContext|null); + + /** Api mixins */ + mixins?: (google.protobuf.IMixin[]|null); + + /** Api syntax */ + syntax?: (google.protobuf.Syntax|keyof typeof google.protobuf.Syntax|null); + } + + /** Represents an Api. */ + class Api implements IApi { + + /** + * Constructs a new Api. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IApi); + + /** Api name. */ + public name: string; + + /** Api methods. */ + public methods: google.protobuf.IMethod[]; + + /** Api options. */ + public options: google.protobuf.IOption[]; + + /** Api version. */ + public version: string; + + /** Api sourceContext. */ + public sourceContext?: (google.protobuf.ISourceContext|null); + + /** Api mixins. */ + public mixins: google.protobuf.IMixin[]; + + /** Api syntax. */ + public syntax: (google.protobuf.Syntax|keyof typeof google.protobuf.Syntax); + + /** + * Creates a new Api instance using the specified properties. + * @param [properties] Properties to set + * @returns Api instance + */ + public static create(properties?: google.protobuf.IApi): google.protobuf.Api; + + /** + * Encodes the specified Api message. Does not implicitly {@link google.protobuf.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.protobuf.IApi, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Api message, length delimited. Does not implicitly {@link google.protobuf.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.protobuf.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.protobuf.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.protobuf.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.protobuf.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.protobuf.Api, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Api to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Method. */ + interface IMethod { + + /** Method name */ + name?: (string|null); + + /** Method requestTypeUrl */ + requestTypeUrl?: (string|null); + + /** Method requestStreaming */ + requestStreaming?: (boolean|null); + + /** Method responseTypeUrl */ + responseTypeUrl?: (string|null); + + /** Method responseStreaming */ + responseStreaming?: (boolean|null); + + /** Method options */ + options?: (google.protobuf.IOption[]|null); + + /** Method syntax */ + syntax?: (google.protobuf.Syntax|keyof typeof google.protobuf.Syntax|null); + } + + /** Represents a Method. */ + class Method implements IMethod { + + /** + * Constructs a new Method. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethod); + + /** Method name. */ + public name: string; + + /** Method requestTypeUrl. */ + public requestTypeUrl: string; + + /** Method requestStreaming. */ + public requestStreaming: boolean; + + /** Method responseTypeUrl. */ + public responseTypeUrl: string; + + /** Method responseStreaming. */ + public responseStreaming: boolean; + + /** Method options. */ + public options: google.protobuf.IOption[]; + + /** Method syntax. */ + public syntax: (google.protobuf.Syntax|keyof typeof google.protobuf.Syntax); + + /** + * Creates a new Method instance using the specified properties. + * @param [properties] Properties to set + * @returns Method instance + */ + public static create(properties?: google.protobuf.IMethod): google.protobuf.Method; + + /** + * Encodes the specified Method message. Does not implicitly {@link google.protobuf.Method.verify|verify} messages. + * @param message Method message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Method message, length delimited. Does not implicitly {@link google.protobuf.Method.verify|verify} messages. + * @param message Method message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Method message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Method + * @throws {Error} If the payload is not 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.Method; + + /** + * Decodes a Method message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Method + * @throws {Error} If the payload 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.Method; + + /** + * Verifies a Method message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Method message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Method + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Method; + + /** + * Creates a plain object from a Method message. Also converts values to other types if specified. + * @param message Method + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Method, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Method to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Mixin. */ + interface IMixin { + + /** Mixin name */ + name?: (string|null); + + /** Mixin root */ + root?: (string|null); + } + + /** Represents a Mixin. */ + class Mixin implements IMixin { + + /** + * Constructs a new Mixin. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMixin); + + /** Mixin name. */ + public name: string; + + /** Mixin root. */ + public root: string; + + /** + * Creates a new Mixin instance using the specified properties. + * @param [properties] Properties to set + * @returns Mixin instance + */ + public static create(properties?: google.protobuf.IMixin): google.protobuf.Mixin; + + /** + * Encodes the specified Mixin message. Does not implicitly {@link google.protobuf.Mixin.verify|verify} messages. + * @param message Mixin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMixin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Mixin message, length delimited. Does not implicitly {@link google.protobuf.Mixin.verify|verify} messages. + * @param message Mixin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMixin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Mixin message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Mixin + * @throws {Error} If the payload is not 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.Mixin; + + /** + * Decodes a Mixin message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Mixin + * @throws {Error} If the payload 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.Mixin; + + /** + * Verifies a Mixin message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Mixin message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Mixin + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Mixin; + + /** + * Creates a plain object from a Mixin message. Also converts values to other types if specified. + * @param message Mixin + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Mixin, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Mixin to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SourceContext. */ + interface ISourceContext { + + /** SourceContext fileName */ + fileName?: (string|null); + } + + /** Represents a SourceContext. */ + class SourceContext implements ISourceContext { + + /** + * Constructs a new SourceContext. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceContext); + + /** SourceContext fileName. */ + public fileName: string; + + /** + * Creates a new SourceContext instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceContext instance + */ + public static create(properties?: google.protobuf.ISourceContext): google.protobuf.SourceContext; + + /** + * Encodes the specified SourceContext message. Does not implicitly {@link google.protobuf.SourceContext.verify|verify} messages. + * @param message SourceContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceContext message, length delimited. Does not implicitly {@link google.protobuf.SourceContext.verify|verify} messages. + * @param message SourceContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceContext message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceContext + * @throws {Error} If the payload is not 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.SourceContext; + + /** + * Decodes a SourceContext message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceContext + * @throws {Error} If the payload 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.SourceContext; + + /** + * Verifies a SourceContext message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceContext message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceContext + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceContext; + + /** + * Creates a plain object from a SourceContext message. Also converts values to other types if specified. + * @param message SourceContext + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceContext to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Type. */ + interface IType { + + /** Type name */ + name?: (string|null); + + /** Type fields */ + fields?: (google.protobuf.IField[]|null); + + /** Type oneofs */ + oneofs?: (string[]|null); + + /** Type options */ + options?: (google.protobuf.IOption[]|null); + + /** Type sourceContext */ + sourceContext?: (google.protobuf.ISourceContext|null); + + /** Type syntax */ + syntax?: (google.protobuf.Syntax|keyof typeof google.protobuf.Syntax|null); + } + + /** Represents a Type. */ + class Type implements IType { + + /** + * Constructs a new Type. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IType); + + /** Type name. */ + public name: string; + + /** Type fields. */ + public fields: google.protobuf.IField[]; + + /** Type oneofs. */ + public oneofs: string[]; + + /** Type options. */ + public options: google.protobuf.IOption[]; + + /** Type sourceContext. */ + public sourceContext?: (google.protobuf.ISourceContext|null); + + /** Type syntax. */ + public syntax: (google.protobuf.Syntax|keyof typeof google.protobuf.Syntax); + + /** + * Creates a new Type instance using the specified properties. + * @param [properties] Properties to set + * @returns Type instance + */ + public static create(properties?: google.protobuf.IType): google.protobuf.Type; + + /** + * Encodes the specified Type message. Does not implicitly {@link google.protobuf.Type.verify|verify} messages. + * @param message Type message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Type message, length delimited. Does not implicitly {@link google.protobuf.Type.verify|verify} messages. + * @param message Type message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Type message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Type + * @throws {Error} If the payload is not 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.Type; + + /** + * Decodes a Type message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Type + * @throws {Error} If the payload 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.Type; + + /** + * Verifies a Type message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Type message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Type + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Type; + + /** + * Creates a plain object from a Type message. Also converts values to other types if specified. + * @param message Type + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Type, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Type to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Field. */ + interface IField { + + /** Field kind */ + kind?: (google.protobuf.Field.Kind|keyof typeof google.protobuf.Field.Kind|null); + + /** Field cardinality */ + cardinality?: (google.protobuf.Field.Cardinality|keyof typeof google.protobuf.Field.Cardinality|null); + + /** Field number */ + number?: (number|null); + + /** Field name */ + name?: (string|null); + + /** Field typeUrl */ + typeUrl?: (string|null); + + /** Field oneofIndex */ + oneofIndex?: (number|null); + + /** Field packed */ + packed?: (boolean|null); + + /** Field options */ + options?: (google.protobuf.IOption[]|null); + + /** Field jsonName */ + jsonName?: (string|null); + + /** Field defaultValue */ + defaultValue?: (string|null); + } + + /** Represents a Field. */ + class Field implements IField { + + /** + * Constructs a new Field. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IField); + + /** Field kind. */ + public kind: (google.protobuf.Field.Kind|keyof typeof google.protobuf.Field.Kind); + + /** Field cardinality. */ + public cardinality: (google.protobuf.Field.Cardinality|keyof typeof google.protobuf.Field.Cardinality); + + /** Field number. */ + public number: number; + + /** Field name. */ + public name: string; + + /** Field typeUrl. */ + public typeUrl: string; + + /** Field oneofIndex. */ + public oneofIndex: number; + + /** Field packed. */ + public packed: boolean; + + /** Field options. */ + public options: google.protobuf.IOption[]; + + /** Field jsonName. */ + public jsonName: string; + + /** Field defaultValue. */ + public defaultValue: string; + + /** + * Creates a new Field instance using the specified properties. + * @param [properties] Properties to set + * @returns Field instance + */ + public static create(properties?: google.protobuf.IField): google.protobuf.Field; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.protobuf.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.protobuf.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Field message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Field + * @throws {Error} If the payload is not 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.Field; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Field + * @throws {Error} If the payload 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.Field; + + /** + * Verifies a Field message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Field + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Field; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @param message Field + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Field to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Field { + + /** Kind enum. */ + enum Kind { + TYPE_UNKNOWN = 0, + 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 + } + + /** Cardinality enum. */ + enum Cardinality { + CARDINALITY_UNKNOWN = 0, + CARDINALITY_OPTIONAL = 1, + CARDINALITY_REQUIRED = 2, + CARDINALITY_REPEATED = 3 + } + } + + /** Properties of an Enum. */ + interface IEnum { + + /** Enum name */ + name?: (string|null); + + /** Enum enumvalue */ + enumvalue?: (google.protobuf.IEnumValue[]|null); + + /** Enum options */ + options?: (google.protobuf.IOption[]|null); + + /** Enum sourceContext */ + sourceContext?: (google.protobuf.ISourceContext|null); + + /** Enum syntax */ + syntax?: (google.protobuf.Syntax|keyof typeof google.protobuf.Syntax|null); + } + + /** Represents an Enum. */ + class Enum implements IEnum { + + /** + * Constructs a new Enum. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnum); + + /** Enum name. */ + public name: string; + + /** Enum enumvalue. */ + public enumvalue: google.protobuf.IEnumValue[]; + + /** Enum options. */ + public options: google.protobuf.IOption[]; + + /** Enum sourceContext. */ + public sourceContext?: (google.protobuf.ISourceContext|null); + + /** Enum syntax. */ + public syntax: (google.protobuf.Syntax|keyof typeof google.protobuf.Syntax); + + /** + * Creates a new Enum instance using the specified properties. + * @param [properties] Properties to set + * @returns Enum instance + */ + public static create(properties?: google.protobuf.IEnum): google.protobuf.Enum; + + /** + * Encodes the specified Enum message. Does not implicitly {@link google.protobuf.Enum.verify|verify} messages. + * @param message Enum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Enum message, length delimited. Does not implicitly {@link google.protobuf.Enum.verify|verify} messages. + * @param message Enum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Enum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Enum + * @throws {Error} If the payload is not 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.Enum; + + /** + * Decodes an Enum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Enum + * @throws {Error} If the payload 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.Enum; + + /** + * Verifies an Enum message. + * @param message Plain 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 Enum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Enum + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Enum; + + /** + * Creates a plain object from an Enum message. Also converts values to other types if specified. + * @param message Enum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Enum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Enum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValue. */ + interface IEnumValue { + + /** EnumValue name */ + name?: (string|null); + + /** EnumValue number */ + number?: (number|null); + + /** EnumValue options */ + options?: (google.protobuf.IOption[]|null); + } + + /** Represents an EnumValue. */ + class EnumValue implements IEnumValue { + + /** + * Constructs a new EnumValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValue); + + /** EnumValue name. */ + public name: string; + + /** EnumValue number. */ + public number: number; + + /** EnumValue options. */ + public options: google.protobuf.IOption[]; + + /** + * Creates a new EnumValue instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValue instance + */ + public static create(properties?: google.protobuf.IEnumValue): google.protobuf.EnumValue; + + /** + * Encodes the specified EnumValue message. Does not implicitly {@link google.protobuf.EnumValue.verify|verify} messages. + * @param message EnumValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.protobuf.EnumValue.verify|verify} messages. + * @param message EnumValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValue + * @throws {Error} If the payload is not 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.EnumValue; + + /** + * Decodes an EnumValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValue + * @throws {Error} If the payload 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.EnumValue; + + /** + * Verifies an EnumValue message. + * @param message Plain 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 EnumValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValue; + + /** + * Creates a plain object from an EnumValue message. Also converts values to other types if specified. + * @param message EnumValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Option. */ + interface IOption { + + /** Option name */ + name?: (string|null); + + /** Option value */ + value?: (google.protobuf.IAny|null); + } + + /** Represents an Option. */ + class Option implements IOption { + + /** + * Constructs a new Option. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOption); + + /** Option name. */ + public name: string; + + /** Option value. */ + public value?: (google.protobuf.IAny|null); + + /** + * Creates a new Option instance using the specified properties. + * @param [properties] Properties to set + * @returns Option instance + */ + public static create(properties?: google.protobuf.IOption): google.protobuf.Option; + + /** + * Encodes the specified Option message. Does not implicitly {@link google.protobuf.Option.verify|verify} messages. + * @param message Option message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Option message, length delimited. Does not implicitly {@link google.protobuf.Option.verify|verify} messages. + * @param message Option message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Option message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Option + * @throws {Error} If the payload is not 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.Option; + + /** + * Decodes an Option message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Option + * @throws {Error} If the payload 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.Option; + + /** + * Verifies an Option message. + * @param message Plain 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 Option message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Option + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Option; + + /** + * Creates a plain object from an Option message. Also converts values to other types if specified. + * @param message Option + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Option, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Option to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Syntax enum. */ + enum Syntax { + SYNTAX_PROTO2 = 0, + SYNTAX_PROTO3 = 1 + } + + /** Properties of a DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not 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.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload 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.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not 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.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload 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.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|string|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not 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.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload 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.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|string|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not 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.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload 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.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not 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.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload 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.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not 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.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload 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.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not 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.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload 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.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not 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.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload 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.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|string|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: (Uint8Array|string); + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not 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.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload 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.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-api-servicemanagement/protos/protos.js b/packages/google-api-servicemanagement/protos/protos.js new file mode 100644 index 00000000000..1eb11393be1 --- /dev/null +++ b/packages/google-api-servicemanagement/protos/protos.js @@ -0,0 +1,39135 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots.undefined_protos || ($protobuf.roots.undefined_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.servicemanagement = (function() { + + /** + * Namespace servicemanagement. + * @memberof google.api + * @namespace + */ + var servicemanagement = {}; + + servicemanagement.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.api.servicemanagement + * @namespace + */ + var v1 = {}; + + v1.ManagedService = (function() { + + /** + * Properties of a ManagedService. + * @memberof google.api.servicemanagement.v1 + * @interface IManagedService + * @property {string|null} [serviceName] ManagedService serviceName + * @property {string|null} [producerProjectId] ManagedService producerProjectId + */ + + /** + * Constructs a new ManagedService. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ManagedService. + * @implements IManagedService + * @constructor + * @param {google.api.servicemanagement.v1.IManagedService=} [properties] Properties to set + */ + function ManagedService(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManagedService serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.ManagedService + * @instance + */ + ManagedService.prototype.serviceName = ""; + + /** + * ManagedService producerProjectId. + * @member {string} producerProjectId + * @memberof google.api.servicemanagement.v1.ManagedService + * @instance + */ + ManagedService.prototype.producerProjectId = ""; + + /** + * Creates a new ManagedService instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.ManagedService + * @static + * @param {google.api.servicemanagement.v1.IManagedService=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.ManagedService} ManagedService instance + */ + ManagedService.create = function create(properties) { + return new ManagedService(properties); + }; + + /** + * Encodes the specified ManagedService message. Does not implicitly {@link google.api.servicemanagement.v1.ManagedService.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.ManagedService + * @static + * @param {google.api.servicemanagement.v1.IManagedService} message ManagedService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagedService.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceName); + if (message.producerProjectId != null && Object.hasOwnProperty.call(message, "producerProjectId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.producerProjectId); + return writer; + }; + + /** + * Encodes the specified ManagedService message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ManagedService.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.ManagedService + * @static + * @param {google.api.servicemanagement.v1.IManagedService} message ManagedService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagedService.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManagedService message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.ManagedService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.ManagedService} ManagedService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagedService.decode = function 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.servicemanagement.v1.ManagedService(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.serviceName = reader.string(); + break; + case 3: + message.producerProjectId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManagedService message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.ManagedService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.ManagedService} ManagedService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagedService.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManagedService message. + * @function verify + * @memberof google.api.servicemanagement.v1.ManagedService + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManagedService.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + if (message.producerProjectId != null && message.hasOwnProperty("producerProjectId")) + if (!$util.isString(message.producerProjectId)) + return "producerProjectId: string expected"; + return null; + }; + + /** + * Creates a ManagedService message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.ManagedService + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.ManagedService} ManagedService + */ + ManagedService.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.ManagedService) + return object; + var message = new $root.google.api.servicemanagement.v1.ManagedService(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + if (object.producerProjectId != null) + message.producerProjectId = String(object.producerProjectId); + return message; + }; + + /** + * Creates a plain object from a ManagedService message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.ManagedService + * @static + * @param {google.api.servicemanagement.v1.ManagedService} message ManagedService + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManagedService.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceName = ""; + object.producerProjectId = ""; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.producerProjectId != null && message.hasOwnProperty("producerProjectId")) + object.producerProjectId = message.producerProjectId; + return object; + }; + + /** + * Converts this ManagedService to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.ManagedService + * @instance + * @returns {Object.} JSON object + */ + ManagedService.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ManagedService; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.api.servicemanagement.v1 + * @interface IOperationMetadata + * @property {Array.|null} [resourceNames] OperationMetadata resourceNames + * @property {Array.|null} [steps] OperationMetadata steps + * @property {number|null} [progressPercentage] OperationMetadata progressPercentage + * @property {google.protobuf.ITimestamp|null} [startTime] OperationMetadata startTime + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.api.servicemanagement.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + this.resourceNames = []; + this.steps = []; + if (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 resourceNames. + * @member {Array.} resourceNames + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.resourceNames = $util.emptyArray; + + /** + * OperationMetadata steps. + * @member {Array.} steps + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.steps = $util.emptyArray; + + /** + * OperationMetadata progressPercentage. + * @member {number} progressPercentage + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.progressPercentage = 0; + + /** + * OperationMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.startTime = null; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @static + * @param {google.api.servicemanagement.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.api.servicemanagement.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @static + * @param {google.api.servicemanagement.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.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceNames[i]); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.api.servicemanagement.v1.OperationMetadata.Step.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.progressPercentage != null && Object.hasOwnProperty.call(message, "progressPercentage")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.progressPercentage); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @static + * @param {google.api.servicemanagement.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.api.servicemanagement.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.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.api.servicemanagement.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + case 2: + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.api.servicemanagement.v1.OperationMetadata.Step.decode(reader, reader.uint32())); + break; + case 3: + message.progressPercentage = reader.int32(); + break; + case 4: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + 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.api.servicemanagement.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.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.api.servicemanagement.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.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; + } + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.api.servicemanagement.v1.OperationMetadata.Step.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + if (message.progressPercentage != null && message.hasOwnProperty("progressPercentage")) + if (!$util.isInteger(message.progressPercentage)) + return "progressPercentage: integer expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.OperationMetadata) + return object; + var message = new $root.google.api.servicemanagement.v1.OperationMetadata(); + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.api.servicemanagement.v1.OperationMetadata.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); + } + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.api.servicemanagement.v1.OperationMetadata.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.api.servicemanagement.v1.OperationMetadata.steps: object expected"); + message.steps[i] = $root.google.api.servicemanagement.v1.OperationMetadata.Step.fromObject(object.steps[i]); + } + } + if (object.progressPercentage != null) + message.progressPercentage = object.progressPercentage | 0; + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.api.servicemanagement.v1.OperationMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @static + * @param {google.api.servicemanagement.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.arrays || options.defaults) { + object.resourceNames = []; + object.steps = []; + } + if (options.defaults) { + object.progressPercentage = 0; + object.startTime = null; + } + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; + } + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.api.servicemanagement.v1.OperationMetadata.Step.toObject(message.steps[j], options); + } + if (message.progressPercentage != null && message.hasOwnProperty("progressPercentage")) + object.progressPercentage = message.progressPercentage; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + OperationMetadata.Step = (function() { + + /** + * Properties of a Step. + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @interface IStep + * @property {string|null} [description] Step description + * @property {google.api.servicemanagement.v1.OperationMetadata.Status|null} [status] Step status + */ + + /** + * Constructs a new Step. + * @memberof google.api.servicemanagement.v1.OperationMetadata + * @classdesc Represents a Step. + * @implements IStep + * @constructor + * @param {google.api.servicemanagement.v1.OperationMetadata.IStep=} [properties] Properties to set + */ + function Step(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Step description. + * @member {string} description + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @instance + */ + Step.prototype.description = ""; + + /** + * Step status. + * @member {google.api.servicemanagement.v1.OperationMetadata.Status} status + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @instance + */ + Step.prototype.status = 0; + + /** + * Creates a new Step instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @static + * @param {google.api.servicemanagement.v1.OperationMetadata.IStep=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.OperationMetadata.Step} Step instance + */ + Step.create = function create(properties) { + return new Step(properties); + }; + + /** + * Encodes the specified Step message. Does not implicitly {@link google.api.servicemanagement.v1.OperationMetadata.Step.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @static + * @param {google.api.servicemanagement.v1.OperationMetadata.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + return writer; + }; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.OperationMetadata.Step.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @static + * @param {google.api.servicemanagement.v1.OperationMetadata.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Step message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.OperationMetadata.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decode = function 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.servicemanagement.v1.OperationMetadata.Step(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.description = reader.string(); + break; + case 4: + message.status = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.OperationMetadata.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Step message. + * @function verify + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Step.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.OperationMetadata.Step} Step + */ + Step.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.OperationMetadata.Step) + return object; + var message = new $root.google.api.servicemanagement.v1.OperationMetadata.Step(); + if (object.description != null) + message.description = String(object.description); + switch (object.status) { + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "DONE": + case 1: + message.status = 1; + break; + case "NOT_STARTED": + case 2: + message.status = 2; + break; + case "IN_PROGRESS": + case 3: + message.status = 3; + break; + case "FAILED": + case 4: + message.status = 4; + break; + case "CANCELLED": + case 5: + message.status = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @static + * @param {google.api.servicemanagement.v1.OperationMetadata.Step} message Step + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Step.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = ""; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.api.servicemanagement.v1.OperationMetadata.Status[message.status] : message.status; + return object; + }; + + /** + * Converts this Step to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @instance + * @returns {Object.} JSON object + */ + Step.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Step; + })(); + + /** + * Status enum. + * @name google.api.servicemanagement.v1.OperationMetadata.Status + * @enum {number} + * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value + * @property {number} DONE=1 DONE value + * @property {number} NOT_STARTED=2 NOT_STARTED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + * @property {number} FAILED=4 FAILED value + * @property {number} CANCELLED=5 CANCELLED value + */ + OperationMetadata.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "DONE"] = 1; + values[valuesById[2] = "NOT_STARTED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "CANCELLED"] = 5; + return values; + })(); + + return OperationMetadata; + })(); + + v1.Diagnostic = (function() { + + /** + * Properties of a Diagnostic. + * @memberof google.api.servicemanagement.v1 + * @interface IDiagnostic + * @property {string|null} [location] Diagnostic location + * @property {google.api.servicemanagement.v1.Diagnostic.Kind|null} [kind] Diagnostic kind + * @property {string|null} [message] Diagnostic message + */ + + /** + * Constructs a new Diagnostic. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a Diagnostic. + * @implements IDiagnostic + * @constructor + * @param {google.api.servicemanagement.v1.IDiagnostic=} [properties] Properties to set + */ + function Diagnostic(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Diagnostic location. + * @member {string} location + * @memberof google.api.servicemanagement.v1.Diagnostic + * @instance + */ + Diagnostic.prototype.location = ""; + + /** + * Diagnostic kind. + * @member {google.api.servicemanagement.v1.Diagnostic.Kind} kind + * @memberof google.api.servicemanagement.v1.Diagnostic + * @instance + */ + Diagnostic.prototype.kind = 0; + + /** + * Diagnostic message. + * @member {string} message + * @memberof google.api.servicemanagement.v1.Diagnostic + * @instance + */ + Diagnostic.prototype.message = ""; + + /** + * Creates a new Diagnostic instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.Diagnostic + * @static + * @param {google.api.servicemanagement.v1.IDiagnostic=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.Diagnostic} Diagnostic instance + */ + Diagnostic.create = function create(properties) { + return new Diagnostic(properties); + }; + + /** + * Encodes the specified Diagnostic message. Does not implicitly {@link google.api.servicemanagement.v1.Diagnostic.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.Diagnostic + * @static + * @param {google.api.servicemanagement.v1.IDiagnostic} message Diagnostic message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Diagnostic.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.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.kind); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.message); + return writer; + }; + + /** + * Encodes the specified Diagnostic message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.Diagnostic.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.Diagnostic + * @static + * @param {google.api.servicemanagement.v1.IDiagnostic} message Diagnostic message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Diagnostic.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Diagnostic message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.Diagnostic + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.Diagnostic} Diagnostic + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Diagnostic.decode = function 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.servicemanagement.v1.Diagnostic(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = reader.string(); + break; + case 2: + message.kind = reader.int32(); + break; + case 3: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Diagnostic message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.Diagnostic + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.Diagnostic} Diagnostic + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Diagnostic.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Diagnostic message. + * @function verify + * @memberof google.api.servicemanagement.v1.Diagnostic + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Diagnostic.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.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a Diagnostic message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.Diagnostic + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.Diagnostic} Diagnostic + */ + Diagnostic.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.Diagnostic) + return object; + var message = new $root.google.api.servicemanagement.v1.Diagnostic(); + if (object.location != null) + message.location = String(object.location); + switch (object.kind) { + case "WARNING": + case 0: + message.kind = 0; + break; + case "ERROR": + case 1: + message.kind = 1; + break; + } + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a Diagnostic message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.Diagnostic + * @static + * @param {google.api.servicemanagement.v1.Diagnostic} message Diagnostic + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Diagnostic.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = ""; + object.kind = options.enums === String ? "WARNING" : 0; + object.message = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.google.api.servicemanagement.v1.Diagnostic.Kind[message.kind] : message.kind; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this Diagnostic to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.Diagnostic + * @instance + * @returns {Object.} JSON object + */ + Diagnostic.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Kind enum. + * @name google.api.servicemanagement.v1.Diagnostic.Kind + * @enum {number} + * @property {number} WARNING=0 WARNING value + * @property {number} ERROR=1 ERROR value + */ + Diagnostic.Kind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WARNING"] = 0; + values[valuesById[1] = "ERROR"] = 1; + return values; + })(); + + return Diagnostic; + })(); + + v1.ConfigSource = (function() { + + /** + * Properties of a ConfigSource. + * @memberof google.api.servicemanagement.v1 + * @interface IConfigSource + * @property {string|null} [id] ConfigSource id + * @property {Array.|null} [files] ConfigSource files + */ + + /** + * Constructs a new ConfigSource. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ConfigSource. + * @implements IConfigSource + * @constructor + * @param {google.api.servicemanagement.v1.IConfigSource=} [properties] Properties to set + */ + function ConfigSource(properties) { + this.files = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfigSource id. + * @member {string} id + * @memberof google.api.servicemanagement.v1.ConfigSource + * @instance + */ + ConfigSource.prototype.id = ""; + + /** + * ConfigSource files. + * @member {Array.} files + * @memberof google.api.servicemanagement.v1.ConfigSource + * @instance + */ + ConfigSource.prototype.files = $util.emptyArray; + + /** + * Creates a new ConfigSource instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.ConfigSource + * @static + * @param {google.api.servicemanagement.v1.IConfigSource=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.ConfigSource} ConfigSource instance + */ + ConfigSource.create = function create(properties) { + return new ConfigSource(properties); + }; + + /** + * Encodes the specified ConfigSource message. Does not implicitly {@link google.api.servicemanagement.v1.ConfigSource.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.ConfigSource + * @static + * @param {google.api.servicemanagement.v1.IConfigSource} message ConfigSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + $root.google.api.servicemanagement.v1.ConfigFile.encode(message.files[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.id); + return writer; + }; + + /** + * Encodes the specified ConfigSource message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ConfigSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.ConfigSource + * @static + * @param {google.api.servicemanagement.v1.IConfigSource} message ConfigSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigSource message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.ConfigSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.ConfigSource} ConfigSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigSource.decode = function 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.servicemanagement.v1.ConfigSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.id = reader.string(); + break; + case 2: + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.google.api.servicemanagement.v1.ConfigFile.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfigSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.ConfigSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.ConfigSource} ConfigSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfigSource message. + * @function verify + * @memberof google.api.servicemanagement.v1.ConfigSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) { + var error = $root.google.api.servicemanagement.v1.ConfigFile.verify(message.files[i]); + if (error) + return "files." + error; + } + } + return null; + }; + + /** + * Creates a ConfigSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.ConfigSource + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.ConfigSource} ConfigSource + */ + ConfigSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.ConfigSource) + return object; + var message = new $root.google.api.servicemanagement.v1.ConfigSource(); + if (object.id != null) + message.id = String(object.id); + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".google.api.servicemanagement.v1.ConfigSource.files: array expected"); + message.files = []; + for (var i = 0; i < object.files.length; ++i) { + if (typeof object.files[i] !== "object") + throw TypeError(".google.api.servicemanagement.v1.ConfigSource.files: object expected"); + message.files[i] = $root.google.api.servicemanagement.v1.ConfigFile.fromObject(object.files[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ConfigSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.ConfigSource + * @static + * @param {google.api.servicemanagement.v1.ConfigSource} message ConfigSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.defaults) + object.id = ""; + if (message.files && message.files.length) { + object.files = []; + for (var j = 0; j < message.files.length; ++j) + object.files[j] = $root.google.api.servicemanagement.v1.ConfigFile.toObject(message.files[j], options); + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this ConfigSource to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.ConfigSource + * @instance + * @returns {Object.} JSON object + */ + ConfigSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConfigSource; + })(); + + v1.ConfigFile = (function() { + + /** + * Properties of a ConfigFile. + * @memberof google.api.servicemanagement.v1 + * @interface IConfigFile + * @property {string|null} [filePath] ConfigFile filePath + * @property {Uint8Array|null} [fileContents] ConfigFile fileContents + * @property {google.api.servicemanagement.v1.ConfigFile.FileType|null} [fileType] ConfigFile fileType + */ + + /** + * Constructs a new ConfigFile. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ConfigFile. + * @implements IConfigFile + * @constructor + * @param {google.api.servicemanagement.v1.IConfigFile=} [properties] Properties to set + */ + function ConfigFile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfigFile filePath. + * @member {string} filePath + * @memberof google.api.servicemanagement.v1.ConfigFile + * @instance + */ + ConfigFile.prototype.filePath = ""; + + /** + * ConfigFile fileContents. + * @member {Uint8Array} fileContents + * @memberof google.api.servicemanagement.v1.ConfigFile + * @instance + */ + ConfigFile.prototype.fileContents = $util.newBuffer([]); + + /** + * ConfigFile fileType. + * @member {google.api.servicemanagement.v1.ConfigFile.FileType} fileType + * @memberof google.api.servicemanagement.v1.ConfigFile + * @instance + */ + ConfigFile.prototype.fileType = 0; + + /** + * Creates a new ConfigFile instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.ConfigFile + * @static + * @param {google.api.servicemanagement.v1.IConfigFile=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.ConfigFile} ConfigFile instance + */ + ConfigFile.create = function create(properties) { + return new ConfigFile(properties); + }; + + /** + * Encodes the specified ConfigFile message. Does not implicitly {@link google.api.servicemanagement.v1.ConfigFile.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.ConfigFile + * @static + * @param {google.api.servicemanagement.v1.IConfigFile} message ConfigFile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigFile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filePath != null && Object.hasOwnProperty.call(message, "filePath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filePath); + if (message.fileContents != null && Object.hasOwnProperty.call(message, "fileContents")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileContents); + if (message.fileType != null && Object.hasOwnProperty.call(message, "fileType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.fileType); + return writer; + }; + + /** + * Encodes the specified ConfigFile message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ConfigFile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.ConfigFile + * @static + * @param {google.api.servicemanagement.v1.IConfigFile} message ConfigFile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigFile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigFile message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.ConfigFile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.ConfigFile} ConfigFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigFile.decode = function 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.servicemanagement.v1.ConfigFile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filePath = reader.string(); + break; + case 3: + message.fileContents = reader.bytes(); + break; + case 4: + message.fileType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfigFile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.ConfigFile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.ConfigFile} ConfigFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigFile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfigFile message. + * @function verify + * @memberof google.api.servicemanagement.v1.ConfigFile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigFile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filePath != null && message.hasOwnProperty("filePath")) + if (!$util.isString(message.filePath)) + return "filePath: string expected"; + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + if (!(message.fileContents && typeof message.fileContents.length === "number" || $util.isString(message.fileContents))) + return "fileContents: buffer expected"; + if (message.fileType != null && message.hasOwnProperty("fileType")) + switch (message.fileType) { + default: + return "fileType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 6: + break; + } + return null; + }; + + /** + * Creates a ConfigFile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.ConfigFile + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.ConfigFile} ConfigFile + */ + ConfigFile.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.ConfigFile) + return object; + var message = new $root.google.api.servicemanagement.v1.ConfigFile(); + if (object.filePath != null) + message.filePath = String(object.filePath); + if (object.fileContents != null) + if (typeof object.fileContents === "string") + $util.base64.decode(object.fileContents, message.fileContents = $util.newBuffer($util.base64.length(object.fileContents)), 0); + else if (object.fileContents.length) + message.fileContents = object.fileContents; + switch (object.fileType) { + case "FILE_TYPE_UNSPECIFIED": + case 0: + message.fileType = 0; + break; + case "SERVICE_CONFIG_YAML": + case 1: + message.fileType = 1; + break; + case "OPEN_API_JSON": + case 2: + message.fileType = 2; + break; + case "OPEN_API_YAML": + case 3: + message.fileType = 3; + break; + case "FILE_DESCRIPTOR_SET_PROTO": + case 4: + message.fileType = 4; + break; + case "PROTO_FILE": + case 6: + message.fileType = 6; + break; + } + return message; + }; + + /** + * Creates a plain object from a ConfigFile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.ConfigFile + * @static + * @param {google.api.servicemanagement.v1.ConfigFile} message ConfigFile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigFile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filePath = ""; + if (options.bytes === String) + object.fileContents = ""; + else { + object.fileContents = []; + if (options.bytes !== Array) + object.fileContents = $util.newBuffer(object.fileContents); + } + object.fileType = options.enums === String ? "FILE_TYPE_UNSPECIFIED" : 0; + } + if (message.filePath != null && message.hasOwnProperty("filePath")) + object.filePath = message.filePath; + if (message.fileContents != null && message.hasOwnProperty("fileContents")) + object.fileContents = options.bytes === String ? $util.base64.encode(message.fileContents, 0, message.fileContents.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileContents) : message.fileContents; + if (message.fileType != null && message.hasOwnProperty("fileType")) + object.fileType = options.enums === String ? $root.google.api.servicemanagement.v1.ConfigFile.FileType[message.fileType] : message.fileType; + return object; + }; + + /** + * Converts this ConfigFile to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.ConfigFile + * @instance + * @returns {Object.} JSON object + */ + ConfigFile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * FileType enum. + * @name google.api.servicemanagement.v1.ConfigFile.FileType + * @enum {number} + * @property {number} FILE_TYPE_UNSPECIFIED=0 FILE_TYPE_UNSPECIFIED value + * @property {number} SERVICE_CONFIG_YAML=1 SERVICE_CONFIG_YAML value + * @property {number} OPEN_API_JSON=2 OPEN_API_JSON value + * @property {number} OPEN_API_YAML=3 OPEN_API_YAML value + * @property {number} FILE_DESCRIPTOR_SET_PROTO=4 FILE_DESCRIPTOR_SET_PROTO value + * @property {number} PROTO_FILE=6 PROTO_FILE value + */ + ConfigFile.FileType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FILE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SERVICE_CONFIG_YAML"] = 1; + values[valuesById[2] = "OPEN_API_JSON"] = 2; + values[valuesById[3] = "OPEN_API_YAML"] = 3; + values[valuesById[4] = "FILE_DESCRIPTOR_SET_PROTO"] = 4; + values[valuesById[6] = "PROTO_FILE"] = 6; + return values; + })(); + + return ConfigFile; + })(); + + v1.ConfigRef = (function() { + + /** + * Properties of a ConfigRef. + * @memberof google.api.servicemanagement.v1 + * @interface IConfigRef + * @property {string|null} [name] ConfigRef name + */ + + /** + * Constructs a new ConfigRef. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ConfigRef. + * @implements IConfigRef + * @constructor + * @param {google.api.servicemanagement.v1.IConfigRef=} [properties] Properties to set + */ + function ConfigRef(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfigRef name. + * @member {string} name + * @memberof google.api.servicemanagement.v1.ConfigRef + * @instance + */ + ConfigRef.prototype.name = ""; + + /** + * Creates a new ConfigRef instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.ConfigRef + * @static + * @param {google.api.servicemanagement.v1.IConfigRef=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.ConfigRef} ConfigRef instance + */ + ConfigRef.create = function create(properties) { + return new ConfigRef(properties); + }; + + /** + * Encodes the specified ConfigRef message. Does not implicitly {@link google.api.servicemanagement.v1.ConfigRef.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.ConfigRef + * @static + * @param {google.api.servicemanagement.v1.IConfigRef} message ConfigRef message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigRef.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 ConfigRef message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ConfigRef.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.ConfigRef + * @static + * @param {google.api.servicemanagement.v1.IConfigRef} message ConfigRef message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigRef.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigRef message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.ConfigRef + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.ConfigRef} ConfigRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigRef.decode = function 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.servicemanagement.v1.ConfigRef(); + 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 ConfigRef message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.ConfigRef + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.ConfigRef} ConfigRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigRef.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfigRef message. + * @function verify + * @memberof google.api.servicemanagement.v1.ConfigRef + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigRef.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 ConfigRef message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.ConfigRef + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.ConfigRef} ConfigRef + */ + ConfigRef.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.ConfigRef) + return object; + var message = new $root.google.api.servicemanagement.v1.ConfigRef(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a ConfigRef message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.ConfigRef + * @static + * @param {google.api.servicemanagement.v1.ConfigRef} message ConfigRef + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigRef.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 ConfigRef to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.ConfigRef + * @instance + * @returns {Object.} JSON object + */ + ConfigRef.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConfigRef; + })(); + + v1.ChangeReport = (function() { + + /** + * Properties of a ChangeReport. + * @memberof google.api.servicemanagement.v1 + * @interface IChangeReport + * @property {Array.|null} [configChanges] ChangeReport configChanges + */ + + /** + * Constructs a new ChangeReport. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ChangeReport. + * @implements IChangeReport + * @constructor + * @param {google.api.servicemanagement.v1.IChangeReport=} [properties] Properties to set + */ + function ChangeReport(properties) { + this.configChanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeReport configChanges. + * @member {Array.} configChanges + * @memberof google.api.servicemanagement.v1.ChangeReport + * @instance + */ + ChangeReport.prototype.configChanges = $util.emptyArray; + + /** + * Creates a new ChangeReport instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.ChangeReport + * @static + * @param {google.api.servicemanagement.v1.IChangeReport=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.ChangeReport} ChangeReport instance + */ + ChangeReport.create = function create(properties) { + return new ChangeReport(properties); + }; + + /** + * Encodes the specified ChangeReport message. Does not implicitly {@link google.api.servicemanagement.v1.ChangeReport.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.ChangeReport + * @static + * @param {google.api.servicemanagement.v1.IChangeReport} message ChangeReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeReport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.configChanges != null && message.configChanges.length) + for (var i = 0; i < message.configChanges.length; ++i) + $root.google.api.ConfigChange.encode(message.configChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeReport message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ChangeReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.ChangeReport + * @static + * @param {google.api.servicemanagement.v1.IChangeReport} message ChangeReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeReport message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.ChangeReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.ChangeReport} ChangeReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeReport.decode = function 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.servicemanagement.v1.ChangeReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.configChanges && message.configChanges.length)) + message.configChanges = []; + message.configChanges.push($root.google.api.ConfigChange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.ChangeReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.ChangeReport} ChangeReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeReport message. + * @function verify + * @memberof google.api.servicemanagement.v1.ChangeReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeReport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.configChanges != null && message.hasOwnProperty("configChanges")) { + if (!Array.isArray(message.configChanges)) + return "configChanges: array expected"; + for (var i = 0; i < message.configChanges.length; ++i) { + var error = $root.google.api.ConfigChange.verify(message.configChanges[i]); + if (error) + return "configChanges." + error; + } + } + return null; + }; + + /** + * Creates a ChangeReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.ChangeReport + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.ChangeReport} ChangeReport + */ + ChangeReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.ChangeReport) + return object; + var message = new $root.google.api.servicemanagement.v1.ChangeReport(); + if (object.configChanges) { + if (!Array.isArray(object.configChanges)) + throw TypeError(".google.api.servicemanagement.v1.ChangeReport.configChanges: array expected"); + message.configChanges = []; + for (var i = 0; i < object.configChanges.length; ++i) { + if (typeof object.configChanges[i] !== "object") + throw TypeError(".google.api.servicemanagement.v1.ChangeReport.configChanges: object expected"); + message.configChanges[i] = $root.google.api.ConfigChange.fromObject(object.configChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ChangeReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.ChangeReport + * @static + * @param {google.api.servicemanagement.v1.ChangeReport} message ChangeReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.configChanges = []; + if (message.configChanges && message.configChanges.length) { + object.configChanges = []; + for (var j = 0; j < message.configChanges.length; ++j) + object.configChanges[j] = $root.google.api.ConfigChange.toObject(message.configChanges[j], options); + } + return object; + }; + + /** + * Converts this ChangeReport to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.ChangeReport + * @instance + * @returns {Object.} JSON object + */ + ChangeReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ChangeReport; + })(); + + v1.Rollout = (function() { + + /** + * Properties of a Rollout. + * @memberof google.api.servicemanagement.v1 + * @interface IRollout + * @property {string|null} [rolloutId] Rollout rolloutId + * @property {google.protobuf.ITimestamp|null} [createTime] Rollout createTime + * @property {string|null} [createdBy] Rollout createdBy + * @property {google.api.servicemanagement.v1.Rollout.RolloutStatus|null} [status] Rollout status + * @property {google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy|null} [trafficPercentStrategy] Rollout trafficPercentStrategy + * @property {google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy|null} [deleteServiceStrategy] Rollout deleteServiceStrategy + * @property {string|null} [serviceName] Rollout serviceName + */ + + /** + * Constructs a new Rollout. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a Rollout. + * @implements IRollout + * @constructor + * @param {google.api.servicemanagement.v1.IRollout=} [properties] Properties to set + */ + function Rollout(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rollout rolloutId. + * @member {string} rolloutId + * @memberof google.api.servicemanagement.v1.Rollout + * @instance + */ + Rollout.prototype.rolloutId = ""; + + /** + * Rollout createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.api.servicemanagement.v1.Rollout + * @instance + */ + Rollout.prototype.createTime = null; + + /** + * Rollout createdBy. + * @member {string} createdBy + * @memberof google.api.servicemanagement.v1.Rollout + * @instance + */ + Rollout.prototype.createdBy = ""; + + /** + * Rollout status. + * @member {google.api.servicemanagement.v1.Rollout.RolloutStatus} status + * @memberof google.api.servicemanagement.v1.Rollout + * @instance + */ + Rollout.prototype.status = 0; + + /** + * Rollout trafficPercentStrategy. + * @member {google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy|null|undefined} trafficPercentStrategy + * @memberof google.api.servicemanagement.v1.Rollout + * @instance + */ + Rollout.prototype.trafficPercentStrategy = null; + + /** + * Rollout deleteServiceStrategy. + * @member {google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy|null|undefined} deleteServiceStrategy + * @memberof google.api.servicemanagement.v1.Rollout + * @instance + */ + Rollout.prototype.deleteServiceStrategy = null; + + /** + * Rollout serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.Rollout + * @instance + */ + Rollout.prototype.serviceName = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Rollout strategy. + * @member {"trafficPercentStrategy"|"deleteServiceStrategy"|undefined} strategy + * @memberof google.api.servicemanagement.v1.Rollout + * @instance + */ + Object.defineProperty(Rollout.prototype, "strategy", { + get: $util.oneOfGetter($oneOfFields = ["trafficPercentStrategy", "deleteServiceStrategy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Rollout instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.Rollout + * @static + * @param {google.api.servicemanagement.v1.IRollout=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.Rollout} Rollout instance + */ + Rollout.create = function create(properties) { + return new Rollout(properties); + }; + + /** + * Encodes the specified Rollout message. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.Rollout + * @static + * @param {google.api.servicemanagement.v1.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rolloutId != null && Object.hasOwnProperty.call(message, "rolloutId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rolloutId); + 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.createdBy != null && Object.hasOwnProperty.call(message, "createdBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.createdBy); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.trafficPercentStrategy != null && Object.hasOwnProperty.call(message, "trafficPercentStrategy")) + $root.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.encode(message.trafficPercentStrategy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceName); + if (message.deleteServiceStrategy != null && Object.hasOwnProperty.call(message, "deleteServiceStrategy")) + $root.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.encode(message.deleteServiceStrategy, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.Rollout + * @static + * @param {google.api.servicemanagement.v1.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rollout message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.servicemanagement.v1.Rollout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rolloutId = reader.string(); + break; + case 2: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.createdBy = reader.string(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.trafficPercentStrategy = $root.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.decode(reader, reader.uint32()); + break; + case 200: + message.deleteServiceStrategy = $root.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.decode(reader, reader.uint32()); + break; + case 8: + message.serviceName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Rollout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rollout message. + * @function verify + * @memberof google.api.servicemanagement.v1.Rollout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rollout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + if (!$util.isString(message.rolloutId)) + return "rolloutId: 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.createdBy != null && message.hasOwnProperty("createdBy")) + if (!$util.isString(message.createdBy)) + return "createdBy: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.trafficPercentStrategy != null && message.hasOwnProperty("trafficPercentStrategy")) { + properties.strategy = 1; + { + var error = $root.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.verify(message.trafficPercentStrategy); + if (error) + return "trafficPercentStrategy." + error; + } + } + if (message.deleteServiceStrategy != null && message.hasOwnProperty("deleteServiceStrategy")) { + if (properties.strategy === 1) + return "strategy: multiple values"; + properties.strategy = 1; + { + var error = $root.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.verify(message.deleteServiceStrategy); + if (error) + return "deleteServiceStrategy." + error; + } + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + return null; + }; + + /** + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.Rollout + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.Rollout} Rollout + */ + Rollout.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.Rollout) + return object; + var message = new $root.google.api.servicemanagement.v1.Rollout(); + if (object.rolloutId != null) + message.rolloutId = String(object.rolloutId); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.api.servicemanagement.v1.Rollout.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.createdBy != null) + message.createdBy = String(object.createdBy); + switch (object.status) { + case "ROLLOUT_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "IN_PROGRESS": + case 1: + message.status = 1; + break; + case "SUCCESS": + case 2: + message.status = 2; + break; + case "CANCELLED": + case 3: + message.status = 3; + break; + case "FAILED": + case 4: + message.status = 4; + break; + case "PENDING": + case 5: + message.status = 5; + break; + case "FAILED_ROLLED_BACK": + case 6: + message.status = 6; + break; + } + if (object.trafficPercentStrategy != null) { + if (typeof object.trafficPercentStrategy !== "object") + throw TypeError(".google.api.servicemanagement.v1.Rollout.trafficPercentStrategy: object expected"); + message.trafficPercentStrategy = $root.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.fromObject(object.trafficPercentStrategy); + } + if (object.deleteServiceStrategy != null) { + if (typeof object.deleteServiceStrategy !== "object") + throw TypeError(".google.api.servicemanagement.v1.Rollout.deleteServiceStrategy: object expected"); + message.deleteServiceStrategy = $root.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.fromObject(object.deleteServiceStrategy); + } + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + return message; + }; + + /** + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.Rollout + * @static + * @param {google.api.servicemanagement.v1.Rollout} message Rollout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rollout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rolloutId = ""; + object.createTime = null; + object.createdBy = ""; + object.status = options.enums === String ? "ROLLOUT_STATUS_UNSPECIFIED" : 0; + object.serviceName = ""; + } + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + object.rolloutId = message.rolloutId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.createdBy != null && message.hasOwnProperty("createdBy")) + object.createdBy = message.createdBy; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.api.servicemanagement.v1.Rollout.RolloutStatus[message.status] : message.status; + if (message.trafficPercentStrategy != null && message.hasOwnProperty("trafficPercentStrategy")) { + object.trafficPercentStrategy = $root.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.toObject(message.trafficPercentStrategy, options); + if (options.oneofs) + object.strategy = "trafficPercentStrategy"; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.deleteServiceStrategy != null && message.hasOwnProperty("deleteServiceStrategy")) { + object.deleteServiceStrategy = $root.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.toObject(message.deleteServiceStrategy, options); + if (options.oneofs) + object.strategy = "deleteServiceStrategy"; + } + return object; + }; + + /** + * Converts this Rollout to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.Rollout + * @instance + * @returns {Object.} JSON object + */ + Rollout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Rollout.TrafficPercentStrategy = (function() { + + /** + * Properties of a TrafficPercentStrategy. + * @memberof google.api.servicemanagement.v1.Rollout + * @interface ITrafficPercentStrategy + * @property {Object.|null} [percentages] TrafficPercentStrategy percentages + */ + + /** + * Constructs a new TrafficPercentStrategy. + * @memberof google.api.servicemanagement.v1.Rollout + * @classdesc Represents a TrafficPercentStrategy. + * @implements ITrafficPercentStrategy + * @constructor + * @param {google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy=} [properties] Properties to set + */ + function TrafficPercentStrategy(properties) { + this.percentages = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TrafficPercentStrategy percentages. + * @member {Object.} percentages + * @memberof google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + * @instance + */ + TrafficPercentStrategy.prototype.percentages = $util.emptyObject; + + /** + * Creates a new TrafficPercentStrategy instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + * @static + * @param {google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy} TrafficPercentStrategy instance + */ + TrafficPercentStrategy.create = function create(properties) { + return new TrafficPercentStrategy(properties); + }; + + /** + * Encodes the specified TrafficPercentStrategy message. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + * @static + * @param {google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy} message TrafficPercentStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TrafficPercentStrategy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.percentages != null && Object.hasOwnProperty.call(message, "percentages")) + for (var keys = Object.keys(message.percentages), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 1 =*/17).double(message.percentages[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified TrafficPercentStrategy message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + * @static + * @param {google.api.servicemanagement.v1.Rollout.ITrafficPercentStrategy} message TrafficPercentStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TrafficPercentStrategy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TrafficPercentStrategy message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy} TrafficPercentStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TrafficPercentStrategy.decode = function 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.servicemanagement.v1.Rollout.TrafficPercentStrategy(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (message.percentages === $util.emptyObject) + message.percentages = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.double(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.percentages[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TrafficPercentStrategy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy} TrafficPercentStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TrafficPercentStrategy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TrafficPercentStrategy message. + * @function verify + * @memberof google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TrafficPercentStrategy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.percentages != null && message.hasOwnProperty("percentages")) { + if (!$util.isObject(message.percentages)) + return "percentages: object expected"; + var key = Object.keys(message.percentages); + for (var i = 0; i < key.length; ++i) + if (typeof message.percentages[key[i]] !== "number") + return "percentages: number{k:string} expected"; + } + return null; + }; + + /** + * Creates a TrafficPercentStrategy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy} TrafficPercentStrategy + */ + TrafficPercentStrategy.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) + return object; + var message = new $root.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy(); + if (object.percentages) { + if (typeof object.percentages !== "object") + throw TypeError(".google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.percentages: object expected"); + message.percentages = {}; + for (var keys = Object.keys(object.percentages), i = 0; i < keys.length; ++i) + message.percentages[keys[i]] = Number(object.percentages[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a TrafficPercentStrategy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + * @static + * @param {google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy} message TrafficPercentStrategy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TrafficPercentStrategy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.percentages = {}; + var keys2; + if (message.percentages && (keys2 = Object.keys(message.percentages)).length) { + object.percentages = {}; + for (var j = 0; j < keys2.length; ++j) + object.percentages[keys2[j]] = options.json && !isFinite(message.percentages[keys2[j]]) ? String(message.percentages[keys2[j]]) : message.percentages[keys2[j]]; + } + return object; + }; + + /** + * Converts this TrafficPercentStrategy to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + * @instance + * @returns {Object.} JSON object + */ + TrafficPercentStrategy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TrafficPercentStrategy; + })(); + + Rollout.DeleteServiceStrategy = (function() { + + /** + * Properties of a DeleteServiceStrategy. + * @memberof google.api.servicemanagement.v1.Rollout + * @interface IDeleteServiceStrategy + */ + + /** + * Constructs a new DeleteServiceStrategy. + * @memberof google.api.servicemanagement.v1.Rollout + * @classdesc Represents a DeleteServiceStrategy. + * @implements IDeleteServiceStrategy + * @constructor + * @param {google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy=} [properties] Properties to set + */ + function DeleteServiceStrategy(properties) { + if (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 DeleteServiceStrategy instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + * @static + * @param {google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy} DeleteServiceStrategy instance + */ + DeleteServiceStrategy.create = function create(properties) { + return new DeleteServiceStrategy(properties); + }; + + /** + * Encodes the specified DeleteServiceStrategy message. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + * @static + * @param {google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy} message DeleteServiceStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceStrategy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DeleteServiceStrategy message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + * @static + * @param {google.api.servicemanagement.v1.Rollout.IDeleteServiceStrategy} message DeleteServiceStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceStrategy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteServiceStrategy message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy} DeleteServiceStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceStrategy.decode = function 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.servicemanagement.v1.Rollout.DeleteServiceStrategy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteServiceStrategy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy} DeleteServiceStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceStrategy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteServiceStrategy message. + * @function verify + * @memberof google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteServiceStrategy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DeleteServiceStrategy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy} DeleteServiceStrategy + */ + DeleteServiceStrategy.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) + return object; + return new $root.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy(); + }; + + /** + * Creates a plain object from a DeleteServiceStrategy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + * @static + * @param {google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy} message DeleteServiceStrategy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteServiceStrategy.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DeleteServiceStrategy to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + * @instance + * @returns {Object.} JSON object + */ + DeleteServiceStrategy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteServiceStrategy; + })(); + + /** + * RolloutStatus enum. + * @name google.api.servicemanagement.v1.Rollout.RolloutStatus + * @enum {number} + * @property {number} ROLLOUT_STATUS_UNSPECIFIED=0 ROLLOUT_STATUS_UNSPECIFIED value + * @property {number} IN_PROGRESS=1 IN_PROGRESS value + * @property {number} SUCCESS=2 SUCCESS value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} FAILED=4 FAILED value + * @property {number} PENDING=5 PENDING value + * @property {number} FAILED_ROLLED_BACK=6 FAILED_ROLLED_BACK value + */ + Rollout.RolloutStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLLOUT_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_PROGRESS"] = 1; + values[valuesById[2] = "SUCCESS"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "PENDING"] = 5; + values[valuesById[6] = "FAILED_ROLLED_BACK"] = 6; + return values; + })(); + + return Rollout; + })(); + + v1.ServiceManager = (function() { + + /** + * Constructs a new ServiceManager service. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ServiceManager + * @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 ServiceManager(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ServiceManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ServiceManager; + + /** + * Creates new ServiceManager service using the specified rpc implementation. + * @function create + * @memberof google.api.servicemanagement.v1.ServiceManager + * @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 {ServiceManager} RPC service. Useful where requests and/or responses are streamed. + */ + ServiceManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServices}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef ListServicesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.servicemanagement.v1.ListServicesResponse} [response] ListServicesResponse + */ + + /** + * Calls ListServices. + * @function listServices + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IListServicesRequest} request ListServicesRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.ListServicesCallback} callback Node-style callback called with the error, if any, and ListServicesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.listServices = function listServices(request, callback) { + return this.rpcCall(listServices, $root.google.api.servicemanagement.v1.ListServicesRequest, $root.google.api.servicemanagement.v1.ListServicesResponse, request, callback); + }, "name", { value: "ListServices" }); + + /** + * Calls ListServices. + * @function listServices + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IListServicesRequest} request ListServicesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getService}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef GetServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.servicemanagement.v1.ManagedService} [response] ManagedService + */ + + /** + * Calls GetService. + * @function getService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IGetServiceRequest} request GetServiceRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.GetServiceCallback} callback Node-style callback called with the error, if any, and ManagedService + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.getService = function getService(request, callback) { + return this.rpcCall(getService, $root.google.api.servicemanagement.v1.GetServiceRequest, $root.google.api.servicemanagement.v1.ManagedService, request, callback); + }, "name", { value: "GetService" }); + + /** + * Calls GetService. + * @function getService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IGetServiceRequest} request GetServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createService}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef CreateServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateService. + * @function createService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.ICreateServiceRequest} request CreateServiceRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.CreateServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.createService = function createService(request, callback) { + return this.rpcCall(createService, $root.google.api.servicemanagement.v1.CreateServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateService" }); + + /** + * Calls CreateService. + * @function createService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.ICreateServiceRequest} request CreateServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#deleteService}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef DeleteServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteService. + * @function deleteService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IDeleteServiceRequest} request DeleteServiceRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.DeleteServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.deleteService = function deleteService(request, callback) { + return this.rpcCall(deleteService, $root.google.api.servicemanagement.v1.DeleteServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteService" }); + + /** + * Calls DeleteService. + * @function deleteService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IDeleteServiceRequest} request DeleteServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#undeleteService}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef UndeleteServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UndeleteService. + * @function undeleteService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IUndeleteServiceRequest} request UndeleteServiceRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.UndeleteServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.undeleteService = function undeleteService(request, callback) { + return this.rpcCall(undeleteService, $root.google.api.servicemanagement.v1.UndeleteServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UndeleteService" }); + + /** + * Calls UndeleteService. + * @function undeleteService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IUndeleteServiceRequest} request UndeleteServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServiceConfigs}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef ListServiceConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.servicemanagement.v1.ListServiceConfigsResponse} [response] ListServiceConfigsResponse + */ + + /** + * Calls ListServiceConfigs. + * @function listServiceConfigs + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IListServiceConfigsRequest} request ListServiceConfigsRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.ListServiceConfigsCallback} callback Node-style callback called with the error, if any, and ListServiceConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.listServiceConfigs = function listServiceConfigs(request, callback) { + return this.rpcCall(listServiceConfigs, $root.google.api.servicemanagement.v1.ListServiceConfigsRequest, $root.google.api.servicemanagement.v1.ListServiceConfigsResponse, request, callback); + }, "name", { value: "ListServiceConfigs" }); + + /** + * Calls ListServiceConfigs. + * @function listServiceConfigs + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IListServiceConfigsRequest} request ListServiceConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getServiceConfig}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef GetServiceConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.Service} [response] Service + */ + + /** + * Calls GetServiceConfig. + * @function getServiceConfig + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IGetServiceConfigRequest} request GetServiceConfigRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.GetServiceConfigCallback} callback Node-style callback called with the error, if any, and Service + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.getServiceConfig = function getServiceConfig(request, callback) { + return this.rpcCall(getServiceConfig, $root.google.api.servicemanagement.v1.GetServiceConfigRequest, $root.google.api.Service, request, callback); + }, "name", { value: "GetServiceConfig" }); + + /** + * Calls GetServiceConfig. + * @function getServiceConfig + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IGetServiceConfigRequest} request GetServiceConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createServiceConfig}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef CreateServiceConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.Service} [response] Service + */ + + /** + * Calls CreateServiceConfig. + * @function createServiceConfig + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.ICreateServiceConfigRequest} request CreateServiceConfigRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.CreateServiceConfigCallback} callback Node-style callback called with the error, if any, and Service + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.createServiceConfig = function createServiceConfig(request, callback) { + return this.rpcCall(createServiceConfig, $root.google.api.servicemanagement.v1.CreateServiceConfigRequest, $root.google.api.Service, request, callback); + }, "name", { value: "CreateServiceConfig" }); + + /** + * Calls CreateServiceConfig. + * @function createServiceConfig + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.ICreateServiceConfigRequest} request CreateServiceConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#submitConfigSource}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef SubmitConfigSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SubmitConfigSource. + * @function submitConfigSource + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.ISubmitConfigSourceRequest} request SubmitConfigSourceRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.SubmitConfigSourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.submitConfigSource = function submitConfigSource(request, callback) { + return this.rpcCall(submitConfigSource, $root.google.api.servicemanagement.v1.SubmitConfigSourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SubmitConfigSource" }); + + /** + * Calls SubmitConfigSource. + * @function submitConfigSource + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.ISubmitConfigSourceRequest} request SubmitConfigSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServiceRollouts}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef ListServiceRolloutsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.servicemanagement.v1.ListServiceRolloutsResponse} [response] ListServiceRolloutsResponse + */ + + /** + * Calls ListServiceRollouts. + * @function listServiceRollouts + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IListServiceRolloutsRequest} request ListServiceRolloutsRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.ListServiceRolloutsCallback} callback Node-style callback called with the error, if any, and ListServiceRolloutsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.listServiceRollouts = function listServiceRollouts(request, callback) { + return this.rpcCall(listServiceRollouts, $root.google.api.servicemanagement.v1.ListServiceRolloutsRequest, $root.google.api.servicemanagement.v1.ListServiceRolloutsResponse, request, callback); + }, "name", { value: "ListServiceRollouts" }); + + /** + * Calls ListServiceRollouts. + * @function listServiceRollouts + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IListServiceRolloutsRequest} request ListServiceRolloutsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getServiceRollout}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef GetServiceRolloutCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.servicemanagement.v1.Rollout} [response] Rollout + */ + + /** + * Calls GetServiceRollout. + * @function getServiceRollout + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IGetServiceRolloutRequest} request GetServiceRolloutRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.GetServiceRolloutCallback} callback Node-style callback called with the error, if any, and Rollout + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.getServiceRollout = function getServiceRollout(request, callback) { + return this.rpcCall(getServiceRollout, $root.google.api.servicemanagement.v1.GetServiceRolloutRequest, $root.google.api.servicemanagement.v1.Rollout, request, callback); + }, "name", { value: "GetServiceRollout" }); + + /** + * Calls GetServiceRollout. + * @function getServiceRollout + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IGetServiceRolloutRequest} request GetServiceRolloutRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createServiceRollout}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef CreateServiceRolloutCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateServiceRollout. + * @function createServiceRollout + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.ICreateServiceRolloutRequest} request CreateServiceRolloutRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.CreateServiceRolloutCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.createServiceRollout = function createServiceRollout(request, callback) { + return this.rpcCall(createServiceRollout, $root.google.api.servicemanagement.v1.CreateServiceRolloutRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateServiceRollout" }); + + /** + * Calls CreateServiceRollout. + * @function createServiceRollout + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.ICreateServiceRolloutRequest} request CreateServiceRolloutRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#generateConfigReport}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef GenerateConfigReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.servicemanagement.v1.GenerateConfigReportResponse} [response] GenerateConfigReportResponse + */ + + /** + * Calls GenerateConfigReport. + * @function generateConfigReport + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IGenerateConfigReportRequest} request GenerateConfigReportRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.GenerateConfigReportCallback} callback Node-style callback called with the error, if any, and GenerateConfigReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.generateConfigReport = function generateConfigReport(request, callback) { + return this.rpcCall(generateConfigReport, $root.google.api.servicemanagement.v1.GenerateConfigReportRequest, $root.google.api.servicemanagement.v1.GenerateConfigReportResponse, request, callback); + }, "name", { value: "GenerateConfigReport" }); + + /** + * Calls GenerateConfigReport. + * @function generateConfigReport + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IGenerateConfigReportRequest} request GenerateConfigReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#enableService}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef EnableServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls EnableService. + * @function enableService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IEnableServiceRequest} request EnableServiceRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.EnableServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.enableService = function enableService(request, callback) { + return this.rpcCall(enableService, $root.google.api.servicemanagement.v1.EnableServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "EnableService" }); + + /** + * Calls EnableService. + * @function enableService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IEnableServiceRequest} request EnableServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#disableService}. + * @memberof google.api.servicemanagement.v1.ServiceManager + * @typedef DisableServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DisableService. + * @function disableService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IDisableServiceRequest} request DisableServiceRequest message or plain object + * @param {google.api.servicemanagement.v1.ServiceManager.DisableServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceManager.prototype.disableService = function disableService(request, callback) { + return this.rpcCall(disableService, $root.google.api.servicemanagement.v1.DisableServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DisableService" }); + + /** + * Calls DisableService. + * @function disableService + * @memberof google.api.servicemanagement.v1.ServiceManager + * @instance + * @param {google.api.servicemanagement.v1.IDisableServiceRequest} request DisableServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ServiceManager; + })(); + + v1.ListServicesRequest = (function() { + + /** + * Properties of a ListServicesRequest. + * @memberof google.api.servicemanagement.v1 + * @interface IListServicesRequest + * @property {string|null} [producerProjectId] ListServicesRequest producerProjectId + * @property {number|null} [pageSize] ListServicesRequest pageSize + * @property {string|null} [pageToken] ListServicesRequest pageToken + * @property {string|null} [consumerId] ListServicesRequest consumerId + */ + + /** + * Constructs a new ListServicesRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ListServicesRequest. + * @implements IListServicesRequest + * @constructor + * @param {google.api.servicemanagement.v1.IListServicesRequest=} [properties] Properties to set + */ + function ListServicesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServicesRequest producerProjectId. + * @member {string} producerProjectId + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.producerProjectId = ""; + + /** + * ListServicesRequest pageSize. + * @member {number} pageSize + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.pageSize = 0; + + /** + * ListServicesRequest pageToken. + * @member {string} pageToken + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.pageToken = ""; + + /** + * ListServicesRequest consumerId. + * @member {string} consumerId + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.consumerId = ""; + + /** + * Creates a new ListServicesRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @static + * @param {google.api.servicemanagement.v1.IListServicesRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.ListServicesRequest} ListServicesRequest instance + */ + ListServicesRequest.create = function create(properties) { + return new ListServicesRequest(properties); + }; + + /** + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.api.servicemanagement.v1.ListServicesRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @static + * @param {google.api.servicemanagement.v1.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.producerProjectId != null && Object.hasOwnProperty.call(message, "producerProjectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.producerProjectId); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); + if (message.consumerId != null && Object.hasOwnProperty.call(message, "consumerId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.consumerId); + return writer; + }; + + /** + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServicesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @static + * @param {google.api.servicemanagement.v1.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.ListServicesRequest} ListServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesRequest.decode = function 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.servicemanagement.v1.ListServicesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.producerProjectId = reader.string(); + break; + case 5: + message.pageSize = reader.int32(); + break; + case 6: + message.pageToken = reader.string(); + break; + case 7: + message.consumerId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.ListServicesRequest} ListServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServicesRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServicesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.producerProjectId != null && message.hasOwnProperty("producerProjectId")) + if (!$util.isString(message.producerProjectId)) + return "producerProjectId: 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.consumerId != null && message.hasOwnProperty("consumerId")) + if (!$util.isString(message.consumerId)) + return "consumerId: string expected"; + return null; + }; + + /** + * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.ListServicesRequest} ListServicesRequest + */ + ListServicesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.ListServicesRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.ListServicesRequest(); + if (object.producerProjectId != null) + message.producerProjectId = String(object.producerProjectId); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.consumerId != null) + message.consumerId = String(object.consumerId); + return message; + }; + + /** + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @static + * @param {google.api.servicemanagement.v1.ListServicesRequest} message ListServicesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServicesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.producerProjectId = ""; + object.pageSize = 0; + object.pageToken = ""; + object.consumerId = ""; + } + if (message.producerProjectId != null && message.hasOwnProperty("producerProjectId")) + object.producerProjectId = message.producerProjectId; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.consumerId != null && message.hasOwnProperty("consumerId")) + object.consumerId = message.consumerId; + return object; + }; + + /** + * Converts this ListServicesRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @instance + * @returns {Object.} JSON object + */ + ListServicesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListServicesRequest; + })(); + + v1.ListServicesResponse = (function() { + + /** + * Properties of a ListServicesResponse. + * @memberof google.api.servicemanagement.v1 + * @interface IListServicesResponse + * @property {Array.|null} [services] ListServicesResponse services + * @property {string|null} [nextPageToken] ListServicesResponse nextPageToken + */ + + /** + * Constructs a new ListServicesResponse. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ListServicesResponse. + * @implements IListServicesResponse + * @constructor + * @param {google.api.servicemanagement.v1.IListServicesResponse=} [properties] Properties to set + */ + function ListServicesResponse(properties) { + this.services = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServicesResponse services. + * @member {Array.} services + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @instance + */ + ListServicesResponse.prototype.services = $util.emptyArray; + + /** + * ListServicesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @instance + */ + ListServicesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListServicesResponse instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @static + * @param {google.api.servicemanagement.v1.IListServicesResponse=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.ListServicesResponse} ListServicesResponse instance + */ + ListServicesResponse.create = function create(properties) { + return new ListServicesResponse(properties); + }; + + /** + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.api.servicemanagement.v1.ListServicesResponse.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @static + * @param {google.api.servicemanagement.v1.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.services != null && message.services.length) + for (var i = 0; i < message.services.length; ++i) + $root.google.api.servicemanagement.v1.ManagedService.encode(message.services[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 ListServicesResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServicesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @static + * @param {google.api.servicemanagement.v1.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.ListServicesResponse} ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesResponse.decode = function 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.servicemanagement.v1.ListServicesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.services && message.services.length)) + message.services = []; + message.services.push($root.google.api.servicemanagement.v1.ManagedService.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.ListServicesResponse} ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServicesResponse message. + * @function verify + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServicesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.services != null && message.hasOwnProperty("services")) { + if (!Array.isArray(message.services)) + return "services: array expected"; + for (var i = 0; i < message.services.length; ++i) { + var error = $root.google.api.servicemanagement.v1.ManagedService.verify(message.services[i]); + if (error) + return "services." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.ListServicesResponse} ListServicesResponse + */ + ListServicesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.ListServicesResponse) + return object; + var message = new $root.google.api.servicemanagement.v1.ListServicesResponse(); + if (object.services) { + if (!Array.isArray(object.services)) + throw TypeError(".google.api.servicemanagement.v1.ListServicesResponse.services: array expected"); + message.services = []; + for (var i = 0; i < object.services.length; ++i) { + if (typeof object.services[i] !== "object") + throw TypeError(".google.api.servicemanagement.v1.ListServicesResponse.services: object expected"); + message.services[i] = $root.google.api.servicemanagement.v1.ManagedService.fromObject(object.services[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @static + * @param {google.api.servicemanagement.v1.ListServicesResponse} message ListServicesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServicesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.services = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.services && message.services.length) { + object.services = []; + for (var j = 0; j < message.services.length; ++j) + object.services[j] = $root.google.api.servicemanagement.v1.ManagedService.toObject(message.services[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListServicesResponse to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @instance + * @returns {Object.} JSON object + */ + ListServicesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListServicesResponse; + })(); + + v1.GetServiceRequest = (function() { + + /** + * Properties of a GetServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @interface IGetServiceRequest + * @property {string|null} [serviceName] GetServiceRequest serviceName + */ + + /** + * Constructs a new GetServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a GetServiceRequest. + * @implements IGetServiceRequest + * @constructor + * @param {google.api.servicemanagement.v1.IGetServiceRequest=} [properties] Properties to set + */ + function GetServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetServiceRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.GetServiceRequest + * @instance + */ + GetServiceRequest.prototype.serviceName = ""; + + /** + * Creates a new GetServiceRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.GetServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IGetServiceRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.GetServiceRequest} GetServiceRequest instance + */ + GetServiceRequest.create = function create(properties) { + return new GetServiceRequest(properties); + }; + + /** + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.GetServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + return writer; + }; + + /** + * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.GetServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.GetServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.GetServiceRequest} GetServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceRequest.decode = function 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.servicemanagement.v1.GetServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.GetServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.GetServiceRequest} GetServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetServiceRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.GetServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + return null; + }; + + /** + * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.GetServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.GetServiceRequest} GetServiceRequest + */ + GetServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.GetServiceRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.GetServiceRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + return message; + }; + + /** + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.GetServiceRequest + * @static + * @param {google.api.servicemanagement.v1.GetServiceRequest} message GetServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.serviceName = ""; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + return object; + }; + + /** + * Converts this GetServiceRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.GetServiceRequest + * @instance + * @returns {Object.} JSON object + */ + GetServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetServiceRequest; + })(); + + v1.CreateServiceRequest = (function() { + + /** + * Properties of a CreateServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @interface ICreateServiceRequest + * @property {google.api.servicemanagement.v1.IManagedService|null} [service] CreateServiceRequest service + */ + + /** + * Constructs a new CreateServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a CreateServiceRequest. + * @implements ICreateServiceRequest + * @constructor + * @param {google.api.servicemanagement.v1.ICreateServiceRequest=} [properties] Properties to set + */ + function CreateServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateServiceRequest service. + * @member {google.api.servicemanagement.v1.IManagedService|null|undefined} service + * @memberof google.api.servicemanagement.v1.CreateServiceRequest + * @instance + */ + CreateServiceRequest.prototype.service = null; + + /** + * Creates a new CreateServiceRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.CreateServiceRequest + * @static + * @param {google.api.servicemanagement.v1.ICreateServiceRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.CreateServiceRequest} CreateServiceRequest instance + */ + CreateServiceRequest.create = function create(properties) { + return new CreateServiceRequest(properties); + }; + + /** + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.CreateServiceRequest + * @static + * @param {google.api.servicemanagement.v1.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + $root.google.api.servicemanagement.v1.ManagedService.encode(message.service, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.CreateServiceRequest + * @static + * @param {google.api.servicemanagement.v1.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.CreateServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.CreateServiceRequest} CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceRequest.decode = function 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.servicemanagement.v1.CreateServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.service = $root.google.api.servicemanagement.v1.ManagedService.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.CreateServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.CreateServiceRequest} CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateServiceRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.CreateServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.api.servicemanagement.v1.ManagedService.verify(message.service); + if (error) + return "service." + error; + } + return null; + }; + + /** + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.CreateServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.CreateServiceRequest} CreateServiceRequest + */ + CreateServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.CreateServiceRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.CreateServiceRequest(); + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.api.servicemanagement.v1.CreateServiceRequest.service: object expected"); + message.service = $root.google.api.servicemanagement.v1.ManagedService.fromObject(object.service); + } + return message; + }; + + /** + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.CreateServiceRequest + * @static + * @param {google.api.servicemanagement.v1.CreateServiceRequest} message CreateServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.service = null; + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.api.servicemanagement.v1.ManagedService.toObject(message.service, options); + return object; + }; + + /** + * Converts this CreateServiceRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.CreateServiceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateServiceRequest; + })(); + + v1.DeleteServiceRequest = (function() { + + /** + * Properties of a DeleteServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @interface IDeleteServiceRequest + * @property {string|null} [serviceName] DeleteServiceRequest serviceName + */ + + /** + * Constructs a new DeleteServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a DeleteServiceRequest. + * @implements IDeleteServiceRequest + * @constructor + * @param {google.api.servicemanagement.v1.IDeleteServiceRequest=} [properties] Properties to set + */ + function DeleteServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteServiceRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.DeleteServiceRequest + * @instance + */ + DeleteServiceRequest.prototype.serviceName = ""; + + /** + * Creates a new DeleteServiceRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.DeleteServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IDeleteServiceRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.DeleteServiceRequest} DeleteServiceRequest instance + */ + DeleteServiceRequest.create = function create(properties) { + return new DeleteServiceRequest(properties); + }; + + /** + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.DeleteServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.DeleteServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + return writer; + }; + + /** + * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.DeleteServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.DeleteServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.DeleteServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.DeleteServiceRequest} DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceRequest.decode = function 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.servicemanagement.v1.DeleteServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.DeleteServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.DeleteServiceRequest} DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteServiceRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.DeleteServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + return null; + }; + + /** + * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.DeleteServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.DeleteServiceRequest} DeleteServiceRequest + */ + DeleteServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.DeleteServiceRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.DeleteServiceRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + return message; + }; + + /** + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.DeleteServiceRequest + * @static + * @param {google.api.servicemanagement.v1.DeleteServiceRequest} message DeleteServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.serviceName = ""; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + return object; + }; + + /** + * Converts this DeleteServiceRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.DeleteServiceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteServiceRequest; + })(); + + v1.UndeleteServiceRequest = (function() { + + /** + * Properties of an UndeleteServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @interface IUndeleteServiceRequest + * @property {string|null} [serviceName] UndeleteServiceRequest serviceName + */ + + /** + * Constructs a new UndeleteServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents an UndeleteServiceRequest. + * @implements IUndeleteServiceRequest + * @constructor + * @param {google.api.servicemanagement.v1.IUndeleteServiceRequest=} [properties] Properties to set + */ + function UndeleteServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UndeleteServiceRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.UndeleteServiceRequest + * @instance + */ + UndeleteServiceRequest.prototype.serviceName = ""; + + /** + * Creates a new UndeleteServiceRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.UndeleteServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IUndeleteServiceRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.UndeleteServiceRequest} UndeleteServiceRequest instance + */ + UndeleteServiceRequest.create = function create(properties) { + return new UndeleteServiceRequest(properties); + }; + + /** + * Encodes the specified UndeleteServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.UndeleteServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.UndeleteServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IUndeleteServiceRequest} message UndeleteServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + return writer; + }; + + /** + * Encodes the specified UndeleteServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.UndeleteServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.UndeleteServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IUndeleteServiceRequest} message UndeleteServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UndeleteServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.UndeleteServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.UndeleteServiceRequest} UndeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteServiceRequest.decode = function 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.servicemanagement.v1.UndeleteServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UndeleteServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.UndeleteServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.UndeleteServiceRequest} UndeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UndeleteServiceRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.UndeleteServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UndeleteServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + return null; + }; + + /** + * Creates an UndeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.UndeleteServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.UndeleteServiceRequest} UndeleteServiceRequest + */ + UndeleteServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.UndeleteServiceRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.UndeleteServiceRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + return message; + }; + + /** + * Creates a plain object from an UndeleteServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.UndeleteServiceRequest + * @static + * @param {google.api.servicemanagement.v1.UndeleteServiceRequest} message UndeleteServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UndeleteServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.serviceName = ""; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + return object; + }; + + /** + * Converts this UndeleteServiceRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.UndeleteServiceRequest + * @instance + * @returns {Object.} JSON object + */ + UndeleteServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UndeleteServiceRequest; + })(); + + v1.UndeleteServiceResponse = (function() { + + /** + * Properties of an UndeleteServiceResponse. + * @memberof google.api.servicemanagement.v1 + * @interface IUndeleteServiceResponse + * @property {google.api.servicemanagement.v1.IManagedService|null} [service] UndeleteServiceResponse service + */ + + /** + * Constructs a new UndeleteServiceResponse. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents an UndeleteServiceResponse. + * @implements IUndeleteServiceResponse + * @constructor + * @param {google.api.servicemanagement.v1.IUndeleteServiceResponse=} [properties] Properties to set + */ + function UndeleteServiceResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UndeleteServiceResponse service. + * @member {google.api.servicemanagement.v1.IManagedService|null|undefined} service + * @memberof google.api.servicemanagement.v1.UndeleteServiceResponse + * @instance + */ + UndeleteServiceResponse.prototype.service = null; + + /** + * Creates a new UndeleteServiceResponse instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.UndeleteServiceResponse + * @static + * @param {google.api.servicemanagement.v1.IUndeleteServiceResponse=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.UndeleteServiceResponse} UndeleteServiceResponse instance + */ + UndeleteServiceResponse.create = function create(properties) { + return new UndeleteServiceResponse(properties); + }; + + /** + * Encodes the specified UndeleteServiceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.UndeleteServiceResponse.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.UndeleteServiceResponse + * @static + * @param {google.api.servicemanagement.v1.IUndeleteServiceResponse} message UndeleteServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteServiceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + $root.google.api.servicemanagement.v1.ManagedService.encode(message.service, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UndeleteServiceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.UndeleteServiceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.UndeleteServiceResponse + * @static + * @param {google.api.servicemanagement.v1.IUndeleteServiceResponse} message UndeleteServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UndeleteServiceResponse message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.UndeleteServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.UndeleteServiceResponse} UndeleteServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteServiceResponse.decode = function 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.servicemanagement.v1.UndeleteServiceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.service = $root.google.api.servicemanagement.v1.ManagedService.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UndeleteServiceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.UndeleteServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.UndeleteServiceResponse} UndeleteServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteServiceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UndeleteServiceResponse message. + * @function verify + * @memberof google.api.servicemanagement.v1.UndeleteServiceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UndeleteServiceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.api.servicemanagement.v1.ManagedService.verify(message.service); + if (error) + return "service." + error; + } + return null; + }; + + /** + * Creates an UndeleteServiceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.UndeleteServiceResponse + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.UndeleteServiceResponse} UndeleteServiceResponse + */ + UndeleteServiceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.UndeleteServiceResponse) + return object; + var message = new $root.google.api.servicemanagement.v1.UndeleteServiceResponse(); + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.api.servicemanagement.v1.UndeleteServiceResponse.service: object expected"); + message.service = $root.google.api.servicemanagement.v1.ManagedService.fromObject(object.service); + } + return message; + }; + + /** + * Creates a plain object from an UndeleteServiceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.UndeleteServiceResponse + * @static + * @param {google.api.servicemanagement.v1.UndeleteServiceResponse} message UndeleteServiceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UndeleteServiceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.service = null; + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.api.servicemanagement.v1.ManagedService.toObject(message.service, options); + return object; + }; + + /** + * Converts this UndeleteServiceResponse to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.UndeleteServiceResponse + * @instance + * @returns {Object.} JSON object + */ + UndeleteServiceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UndeleteServiceResponse; + })(); + + v1.GetServiceConfigRequest = (function() { + + /** + * Properties of a GetServiceConfigRequest. + * @memberof google.api.servicemanagement.v1 + * @interface IGetServiceConfigRequest + * @property {string|null} [serviceName] GetServiceConfigRequest serviceName + * @property {string|null} [configId] GetServiceConfigRequest configId + * @property {google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView|null} [view] GetServiceConfigRequest view + */ + + /** + * Constructs a new GetServiceConfigRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a GetServiceConfigRequest. + * @implements IGetServiceConfigRequest + * @constructor + * @param {google.api.servicemanagement.v1.IGetServiceConfigRequest=} [properties] Properties to set + */ + function GetServiceConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetServiceConfigRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @instance + */ + GetServiceConfigRequest.prototype.serviceName = ""; + + /** + * GetServiceConfigRequest configId. + * @member {string} configId + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @instance + */ + GetServiceConfigRequest.prototype.configId = ""; + + /** + * GetServiceConfigRequest view. + * @member {google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView} view + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @instance + */ + GetServiceConfigRequest.prototype.view = 0; + + /** + * Creates a new GetServiceConfigRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @static + * @param {google.api.servicemanagement.v1.IGetServiceConfigRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.GetServiceConfigRequest} GetServiceConfigRequest instance + */ + GetServiceConfigRequest.create = function create(properties) { + return new GetServiceConfigRequest(properties); + }; + + /** + * Encodes the specified GetServiceConfigRequest message. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @static + * @param {google.api.servicemanagement.v1.IGetServiceConfigRequest} message GetServiceConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + if (message.configId != null && Object.hasOwnProperty.call(message, "configId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.configId); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetServiceConfigRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @static + * @param {google.api.servicemanagement.v1.IGetServiceConfigRequest} message GetServiceConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetServiceConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.GetServiceConfigRequest} GetServiceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceConfigRequest.decode = function 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.servicemanagement.v1.GetServiceConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + case 2: + message.configId = reader.string(); + break; + case 3: + message.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetServiceConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.GetServiceConfigRequest} GetServiceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetServiceConfigRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetServiceConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + if (message.configId != null && message.hasOwnProperty("configId")) + if (!$util.isString(message.configId)) + return "configId: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a GetServiceConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.GetServiceConfigRequest} GetServiceConfigRequest + */ + GetServiceConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.GetServiceConfigRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.GetServiceConfigRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + if (object.configId != null) + message.configId = String(object.configId); + switch (object.view) { + case "BASIC": + case 0: + message.view = 0; + break; + case "FULL": + case 1: + message.view = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetServiceConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @static + * @param {google.api.servicemanagement.v1.GetServiceConfigRequest} message GetServiceConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetServiceConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceName = ""; + object.configId = ""; + object.view = options.enums === String ? "BASIC" : 0; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.configId != null && message.hasOwnProperty("configId")) + object.configId = message.configId; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetServiceConfigRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetServiceConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ConfigView enum. + * @name google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView + * @enum {number} + * @property {number} BASIC=0 BASIC value + * @property {number} FULL=1 FULL value + */ + GetServiceConfigRequest.ConfigView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BASIC"] = 0; + values[valuesById[1] = "FULL"] = 1; + return values; + })(); + + return GetServiceConfigRequest; + })(); + + v1.ListServiceConfigsRequest = (function() { + + /** + * Properties of a ListServiceConfigsRequest. + * @memberof google.api.servicemanagement.v1 + * @interface IListServiceConfigsRequest + * @property {string|null} [serviceName] ListServiceConfigsRequest serviceName + * @property {string|null} [pageToken] ListServiceConfigsRequest pageToken + * @property {number|null} [pageSize] ListServiceConfigsRequest pageSize + */ + + /** + * Constructs a new ListServiceConfigsRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ListServiceConfigsRequest. + * @implements IListServiceConfigsRequest + * @constructor + * @param {google.api.servicemanagement.v1.IListServiceConfigsRequest=} [properties] Properties to set + */ + function ListServiceConfigsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServiceConfigsRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @instance + */ + ListServiceConfigsRequest.prototype.serviceName = ""; + + /** + * ListServiceConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @instance + */ + ListServiceConfigsRequest.prototype.pageToken = ""; + + /** + * ListServiceConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @instance + */ + ListServiceConfigsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListServiceConfigsRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @static + * @param {google.api.servicemanagement.v1.IListServiceConfigsRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.ListServiceConfigsRequest} ListServiceConfigsRequest instance + */ + ListServiceConfigsRequest.create = function create(properties) { + return new ListServiceConfigsRequest(properties); + }; + + /** + * Encodes the specified ListServiceConfigsRequest message. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @static + * @param {google.api.servicemanagement.v1.IListServiceConfigsRequest} message ListServiceConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceConfigsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListServiceConfigsRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @static + * @param {google.api.servicemanagement.v1.IListServiceConfigsRequest} message ListServiceConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServiceConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.ListServiceConfigsRequest} ListServiceConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceConfigsRequest.decode = function 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.servicemanagement.v1.ListServiceConfigsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServiceConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.ListServiceConfigsRequest} ListServiceConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServiceConfigsRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServiceConfigsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListServiceConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.ListServiceConfigsRequest} ListServiceConfigsRequest + */ + ListServiceConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.ListServiceConfigsRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.ListServiceConfigsRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListServiceConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @static + * @param {google.api.servicemanagement.v1.ListServiceConfigsRequest} message ListServiceConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServiceConfigsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceName = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListServiceConfigsRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListServiceConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListServiceConfigsRequest; + })(); + + v1.ListServiceConfigsResponse = (function() { + + /** + * Properties of a ListServiceConfigsResponse. + * @memberof google.api.servicemanagement.v1 + * @interface IListServiceConfigsResponse + * @property {Array.|null} [serviceConfigs] ListServiceConfigsResponse serviceConfigs + * @property {string|null} [nextPageToken] ListServiceConfigsResponse nextPageToken + */ + + /** + * Constructs a new ListServiceConfigsResponse. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ListServiceConfigsResponse. + * @implements IListServiceConfigsResponse + * @constructor + * @param {google.api.servicemanagement.v1.IListServiceConfigsResponse=} [properties] Properties to set + */ + function ListServiceConfigsResponse(properties) { + this.serviceConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServiceConfigsResponse serviceConfigs. + * @member {Array.} serviceConfigs + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @instance + */ + ListServiceConfigsResponse.prototype.serviceConfigs = $util.emptyArray; + + /** + * ListServiceConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @instance + */ + ListServiceConfigsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListServiceConfigsResponse instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @static + * @param {google.api.servicemanagement.v1.IListServiceConfigsResponse=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.ListServiceConfigsResponse} ListServiceConfigsResponse instance + */ + ListServiceConfigsResponse.create = function create(properties) { + return new ListServiceConfigsResponse(properties); + }; + + /** + * Encodes the specified ListServiceConfigsResponse message. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @static + * @param {google.api.servicemanagement.v1.IListServiceConfigsResponse} message ListServiceConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceConfigs != null && message.serviceConfigs.length) + for (var i = 0; i < message.serviceConfigs.length; ++i) + $root.google.api.Service.encode(message.serviceConfigs[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 ListServiceConfigsResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @static + * @param {google.api.servicemanagement.v1.IListServiceConfigsResponse} message ListServiceConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServiceConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.ListServiceConfigsResponse} ListServiceConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceConfigsResponse.decode = function 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.servicemanagement.v1.ListServiceConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.serviceConfigs && message.serviceConfigs.length)) + message.serviceConfigs = []; + message.serviceConfigs.push($root.google.api.Service.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServiceConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.ListServiceConfigsResponse} ListServiceConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServiceConfigsResponse message. + * @function verify + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServiceConfigsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceConfigs != null && message.hasOwnProperty("serviceConfigs")) { + if (!Array.isArray(message.serviceConfigs)) + return "serviceConfigs: array expected"; + for (var i = 0; i < message.serviceConfigs.length; ++i) { + var error = $root.google.api.Service.verify(message.serviceConfigs[i]); + if (error) + return "serviceConfigs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListServiceConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.ListServiceConfigsResponse} ListServiceConfigsResponse + */ + ListServiceConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.ListServiceConfigsResponse) + return object; + var message = new $root.google.api.servicemanagement.v1.ListServiceConfigsResponse(); + if (object.serviceConfigs) { + if (!Array.isArray(object.serviceConfigs)) + throw TypeError(".google.api.servicemanagement.v1.ListServiceConfigsResponse.serviceConfigs: array expected"); + message.serviceConfigs = []; + for (var i = 0; i < object.serviceConfigs.length; ++i) { + if (typeof object.serviceConfigs[i] !== "object") + throw TypeError(".google.api.servicemanagement.v1.ListServiceConfigsResponse.serviceConfigs: object expected"); + message.serviceConfigs[i] = $root.google.api.Service.fromObject(object.serviceConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListServiceConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @static + * @param {google.api.servicemanagement.v1.ListServiceConfigsResponse} message ListServiceConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServiceConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.serviceConfigs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.serviceConfigs && message.serviceConfigs.length) { + object.serviceConfigs = []; + for (var j = 0; j < message.serviceConfigs.length; ++j) + object.serviceConfigs[j] = $root.google.api.Service.toObject(message.serviceConfigs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListServiceConfigsResponse to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListServiceConfigsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListServiceConfigsResponse; + })(); + + v1.CreateServiceConfigRequest = (function() { + + /** + * Properties of a CreateServiceConfigRequest. + * @memberof google.api.servicemanagement.v1 + * @interface ICreateServiceConfigRequest + * @property {string|null} [serviceName] CreateServiceConfigRequest serviceName + * @property {google.api.IService|null} [serviceConfig] CreateServiceConfigRequest serviceConfig + */ + + /** + * Constructs a new CreateServiceConfigRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a CreateServiceConfigRequest. + * @implements ICreateServiceConfigRequest + * @constructor + * @param {google.api.servicemanagement.v1.ICreateServiceConfigRequest=} [properties] Properties to set + */ + function CreateServiceConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateServiceConfigRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @instance + */ + CreateServiceConfigRequest.prototype.serviceName = ""; + + /** + * CreateServiceConfigRequest serviceConfig. + * @member {google.api.IService|null|undefined} serviceConfig + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @instance + */ + CreateServiceConfigRequest.prototype.serviceConfig = null; + + /** + * Creates a new CreateServiceConfigRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @static + * @param {google.api.servicemanagement.v1.ICreateServiceConfigRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.CreateServiceConfigRequest} CreateServiceConfigRequest instance + */ + CreateServiceConfigRequest.create = function create(properties) { + return new CreateServiceConfigRequest(properties); + }; + + /** + * Encodes the specified CreateServiceConfigRequest message. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @static + * @param {google.api.servicemanagement.v1.ICreateServiceConfigRequest} message CreateServiceConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + if (message.serviceConfig != null && Object.hasOwnProperty.call(message, "serviceConfig")) + $root.google.api.Service.encode(message.serviceConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateServiceConfigRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @static + * @param {google.api.servicemanagement.v1.ICreateServiceConfigRequest} message CreateServiceConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateServiceConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.CreateServiceConfigRequest} CreateServiceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceConfigRequest.decode = function 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.servicemanagement.v1.CreateServiceConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + case 2: + message.serviceConfig = $root.google.api.Service.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateServiceConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.CreateServiceConfigRequest} CreateServiceConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateServiceConfigRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateServiceConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + if (message.serviceConfig != null && message.hasOwnProperty("serviceConfig")) { + var error = $root.google.api.Service.verify(message.serviceConfig); + if (error) + return "serviceConfig." + error; + } + return null; + }; + + /** + * Creates a CreateServiceConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.CreateServiceConfigRequest} CreateServiceConfigRequest + */ + CreateServiceConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.CreateServiceConfigRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.CreateServiceConfigRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + if (object.serviceConfig != null) { + if (typeof object.serviceConfig !== "object") + throw TypeError(".google.api.servicemanagement.v1.CreateServiceConfigRequest.serviceConfig: object expected"); + message.serviceConfig = $root.google.api.Service.fromObject(object.serviceConfig); + } + return message; + }; + + /** + * Creates a plain object from a CreateServiceConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @static + * @param {google.api.servicemanagement.v1.CreateServiceConfigRequest} message CreateServiceConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateServiceConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceName = ""; + object.serviceConfig = null; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.serviceConfig != null && message.hasOwnProperty("serviceConfig")) + object.serviceConfig = $root.google.api.Service.toObject(message.serviceConfig, options); + return object; + }; + + /** + * Converts this CreateServiceConfigRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateServiceConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateServiceConfigRequest; + })(); + + v1.SubmitConfigSourceRequest = (function() { + + /** + * Properties of a SubmitConfigSourceRequest. + * @memberof google.api.servicemanagement.v1 + * @interface ISubmitConfigSourceRequest + * @property {string|null} [serviceName] SubmitConfigSourceRequest serviceName + * @property {google.api.servicemanagement.v1.IConfigSource|null} [configSource] SubmitConfigSourceRequest configSource + * @property {boolean|null} [validateOnly] SubmitConfigSourceRequest validateOnly + */ + + /** + * Constructs a new SubmitConfigSourceRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a SubmitConfigSourceRequest. + * @implements ISubmitConfigSourceRequest + * @constructor + * @param {google.api.servicemanagement.v1.ISubmitConfigSourceRequest=} [properties] Properties to set + */ + function SubmitConfigSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubmitConfigSourceRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @instance + */ + SubmitConfigSourceRequest.prototype.serviceName = ""; + + /** + * SubmitConfigSourceRequest configSource. + * @member {google.api.servicemanagement.v1.IConfigSource|null|undefined} configSource + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @instance + */ + SubmitConfigSourceRequest.prototype.configSource = null; + + /** + * SubmitConfigSourceRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @instance + */ + SubmitConfigSourceRequest.prototype.validateOnly = false; + + /** + * Creates a new SubmitConfigSourceRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @static + * @param {google.api.servicemanagement.v1.ISubmitConfigSourceRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.SubmitConfigSourceRequest} SubmitConfigSourceRequest instance + */ + SubmitConfigSourceRequest.create = function create(properties) { + return new SubmitConfigSourceRequest(properties); + }; + + /** + * Encodes the specified SubmitConfigSourceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.SubmitConfigSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @static + * @param {google.api.servicemanagement.v1.ISubmitConfigSourceRequest} message SubmitConfigSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitConfigSourceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + if (message.configSource != null && Object.hasOwnProperty.call(message, "configSource")) + $root.google.api.servicemanagement.v1.ConfigSource.encode(message.configSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified SubmitConfigSourceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.SubmitConfigSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @static + * @param {google.api.servicemanagement.v1.ISubmitConfigSourceRequest} message SubmitConfigSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitConfigSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitConfigSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.SubmitConfigSourceRequest} SubmitConfigSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitConfigSourceRequest.decode = function 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.servicemanagement.v1.SubmitConfigSourceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + case 2: + message.configSource = $root.google.api.servicemanagement.v1.ConfigSource.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubmitConfigSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.SubmitConfigSourceRequest} SubmitConfigSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitConfigSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitConfigSourceRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubmitConfigSourceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + if (message.configSource != null && message.hasOwnProperty("configSource")) { + var error = $root.google.api.servicemanagement.v1.ConfigSource.verify(message.configSource); + if (error) + return "configSource." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a SubmitConfigSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.SubmitConfigSourceRequest} SubmitConfigSourceRequest + */ + SubmitConfigSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.SubmitConfigSourceRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.SubmitConfigSourceRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + if (object.configSource != null) { + if (typeof object.configSource !== "object") + throw TypeError(".google.api.servicemanagement.v1.SubmitConfigSourceRequest.configSource: object expected"); + message.configSource = $root.google.api.servicemanagement.v1.ConfigSource.fromObject(object.configSource); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a SubmitConfigSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @static + * @param {google.api.servicemanagement.v1.SubmitConfigSourceRequest} message SubmitConfigSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitConfigSourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceName = ""; + object.configSource = null; + object.validateOnly = false; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.configSource != null && message.hasOwnProperty("configSource")) + object.configSource = $root.google.api.servicemanagement.v1.ConfigSource.toObject(message.configSource, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this SubmitConfigSourceRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @instance + * @returns {Object.} JSON object + */ + SubmitConfigSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SubmitConfigSourceRequest; + })(); + + v1.SubmitConfigSourceResponse = (function() { + + /** + * Properties of a SubmitConfigSourceResponse. + * @memberof google.api.servicemanagement.v1 + * @interface ISubmitConfigSourceResponse + * @property {google.api.IService|null} [serviceConfig] SubmitConfigSourceResponse serviceConfig + */ + + /** + * Constructs a new SubmitConfigSourceResponse. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a SubmitConfigSourceResponse. + * @implements ISubmitConfigSourceResponse + * @constructor + * @param {google.api.servicemanagement.v1.ISubmitConfigSourceResponse=} [properties] Properties to set + */ + function SubmitConfigSourceResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubmitConfigSourceResponse serviceConfig. + * @member {google.api.IService|null|undefined} serviceConfig + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceResponse + * @instance + */ + SubmitConfigSourceResponse.prototype.serviceConfig = null; + + /** + * Creates a new SubmitConfigSourceResponse instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceResponse + * @static + * @param {google.api.servicemanagement.v1.ISubmitConfigSourceResponse=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.SubmitConfigSourceResponse} SubmitConfigSourceResponse instance + */ + SubmitConfigSourceResponse.create = function create(properties) { + return new SubmitConfigSourceResponse(properties); + }; + + /** + * Encodes the specified SubmitConfigSourceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.SubmitConfigSourceResponse.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceResponse + * @static + * @param {google.api.servicemanagement.v1.ISubmitConfigSourceResponse} message SubmitConfigSourceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitConfigSourceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceConfig != null && Object.hasOwnProperty.call(message, "serviceConfig")) + $root.google.api.Service.encode(message.serviceConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SubmitConfigSourceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.SubmitConfigSourceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceResponse + * @static + * @param {google.api.servicemanagement.v1.ISubmitConfigSourceResponse} message SubmitConfigSourceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitConfigSourceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitConfigSourceResponse message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.SubmitConfigSourceResponse} SubmitConfigSourceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitConfigSourceResponse.decode = function 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.servicemanagement.v1.SubmitConfigSourceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceConfig = $root.google.api.Service.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubmitConfigSourceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.SubmitConfigSourceResponse} SubmitConfigSourceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitConfigSourceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitConfigSourceResponse message. + * @function verify + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubmitConfigSourceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceConfig != null && message.hasOwnProperty("serviceConfig")) { + var error = $root.google.api.Service.verify(message.serviceConfig); + if (error) + return "serviceConfig." + error; + } + return null; + }; + + /** + * Creates a SubmitConfigSourceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceResponse + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.SubmitConfigSourceResponse} SubmitConfigSourceResponse + */ + SubmitConfigSourceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.SubmitConfigSourceResponse) + return object; + var message = new $root.google.api.servicemanagement.v1.SubmitConfigSourceResponse(); + if (object.serviceConfig != null) { + if (typeof object.serviceConfig !== "object") + throw TypeError(".google.api.servicemanagement.v1.SubmitConfigSourceResponse.serviceConfig: object expected"); + message.serviceConfig = $root.google.api.Service.fromObject(object.serviceConfig); + } + return message; + }; + + /** + * Creates a plain object from a SubmitConfigSourceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceResponse + * @static + * @param {google.api.servicemanagement.v1.SubmitConfigSourceResponse} message SubmitConfigSourceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitConfigSourceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.serviceConfig = null; + if (message.serviceConfig != null && message.hasOwnProperty("serviceConfig")) + object.serviceConfig = $root.google.api.Service.toObject(message.serviceConfig, options); + return object; + }; + + /** + * Converts this SubmitConfigSourceResponse to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceResponse + * @instance + * @returns {Object.} JSON object + */ + SubmitConfigSourceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SubmitConfigSourceResponse; + })(); + + v1.CreateServiceRolloutRequest = (function() { + + /** + * Properties of a CreateServiceRolloutRequest. + * @memberof google.api.servicemanagement.v1 + * @interface ICreateServiceRolloutRequest + * @property {string|null} [serviceName] CreateServiceRolloutRequest serviceName + * @property {google.api.servicemanagement.v1.IRollout|null} [rollout] CreateServiceRolloutRequest rollout + */ + + /** + * Constructs a new CreateServiceRolloutRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a CreateServiceRolloutRequest. + * @implements ICreateServiceRolloutRequest + * @constructor + * @param {google.api.servicemanagement.v1.ICreateServiceRolloutRequest=} [properties] Properties to set + */ + function CreateServiceRolloutRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateServiceRolloutRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @instance + */ + CreateServiceRolloutRequest.prototype.serviceName = ""; + + /** + * CreateServiceRolloutRequest rollout. + * @member {google.api.servicemanagement.v1.IRollout|null|undefined} rollout + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @instance + */ + CreateServiceRolloutRequest.prototype.rollout = null; + + /** + * Creates a new CreateServiceRolloutRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @static + * @param {google.api.servicemanagement.v1.ICreateServiceRolloutRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.CreateServiceRolloutRequest} CreateServiceRolloutRequest instance + */ + CreateServiceRolloutRequest.create = function create(properties) { + return new CreateServiceRolloutRequest(properties); + }; + + /** + * Encodes the specified CreateServiceRolloutRequest message. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceRolloutRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @static + * @param {google.api.servicemanagement.v1.ICreateServiceRolloutRequest} message CreateServiceRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceRolloutRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.api.servicemanagement.v1.Rollout.encode(message.rollout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateServiceRolloutRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.CreateServiceRolloutRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @static + * @param {google.api.servicemanagement.v1.ICreateServiceRolloutRequest} message CreateServiceRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateServiceRolloutRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.CreateServiceRolloutRequest} CreateServiceRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceRolloutRequest.decode = function 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.servicemanagement.v1.CreateServiceRolloutRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + case 2: + message.rollout = $root.google.api.servicemanagement.v1.Rollout.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateServiceRolloutRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.CreateServiceRolloutRequest} CreateServiceRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateServiceRolloutRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateServiceRolloutRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.api.servicemanagement.v1.Rollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + return null; + }; + + /** + * Creates a CreateServiceRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.CreateServiceRolloutRequest} CreateServiceRolloutRequest + */ + CreateServiceRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.CreateServiceRolloutRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.CreateServiceRolloutRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.api.servicemanagement.v1.CreateServiceRolloutRequest.rollout: object expected"); + message.rollout = $root.google.api.servicemanagement.v1.Rollout.fromObject(object.rollout); + } + return message; + }; + + /** + * Creates a plain object from a CreateServiceRolloutRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @static + * @param {google.api.servicemanagement.v1.CreateServiceRolloutRequest} message CreateServiceRolloutRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateServiceRolloutRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceName = ""; + object.rollout = null; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.api.servicemanagement.v1.Rollout.toObject(message.rollout, options); + return object; + }; + + /** + * Converts this CreateServiceRolloutRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @instance + * @returns {Object.} JSON object + */ + CreateServiceRolloutRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateServiceRolloutRequest; + })(); + + v1.ListServiceRolloutsRequest = (function() { + + /** + * Properties of a ListServiceRolloutsRequest. + * @memberof google.api.servicemanagement.v1 + * @interface IListServiceRolloutsRequest + * @property {string|null} [serviceName] ListServiceRolloutsRequest serviceName + * @property {string|null} [pageToken] ListServiceRolloutsRequest pageToken + * @property {number|null} [pageSize] ListServiceRolloutsRequest pageSize + * @property {string|null} [filter] ListServiceRolloutsRequest filter + */ + + /** + * Constructs a new ListServiceRolloutsRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ListServiceRolloutsRequest. + * @implements IListServiceRolloutsRequest + * @constructor + * @param {google.api.servicemanagement.v1.IListServiceRolloutsRequest=} [properties] Properties to set + */ + function ListServiceRolloutsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServiceRolloutsRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @instance + */ + ListServiceRolloutsRequest.prototype.serviceName = ""; + + /** + * ListServiceRolloutsRequest pageToken. + * @member {string} pageToken + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @instance + */ + ListServiceRolloutsRequest.prototype.pageToken = ""; + + /** + * ListServiceRolloutsRequest pageSize. + * @member {number} pageSize + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @instance + */ + ListServiceRolloutsRequest.prototype.pageSize = 0; + + /** + * ListServiceRolloutsRequest filter. + * @member {string} filter + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @instance + */ + ListServiceRolloutsRequest.prototype.filter = ""; + + /** + * Creates a new ListServiceRolloutsRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @static + * @param {google.api.servicemanagement.v1.IListServiceRolloutsRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.ListServiceRolloutsRequest} ListServiceRolloutsRequest instance + */ + ListServiceRolloutsRequest.create = function create(properties) { + return new ListServiceRolloutsRequest(properties); + }; + + /** + * Encodes the specified ListServiceRolloutsRequest message. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceRolloutsRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @static + * @param {google.api.servicemanagement.v1.IListServiceRolloutsRequest} message ListServiceRolloutsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceRolloutsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListServiceRolloutsRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceRolloutsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @static + * @param {google.api.servicemanagement.v1.IListServiceRolloutsRequest} message ListServiceRolloutsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceRolloutsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServiceRolloutsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.ListServiceRolloutsRequest} ListServiceRolloutsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceRolloutsRequest.decode = function 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.servicemanagement.v1.ListServiceRolloutsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServiceRolloutsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.ListServiceRolloutsRequest} ListServiceRolloutsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceRolloutsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServiceRolloutsRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServiceRolloutsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListServiceRolloutsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.ListServiceRolloutsRequest} ListServiceRolloutsRequest + */ + ListServiceRolloutsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.ListServiceRolloutsRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.ListServiceRolloutsRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListServiceRolloutsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @static + * @param {google.api.servicemanagement.v1.ListServiceRolloutsRequest} message ListServiceRolloutsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServiceRolloutsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceName = ""; + object.pageToken = ""; + object.pageSize = 0; + object.filter = ""; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListServiceRolloutsRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @instance + * @returns {Object.} JSON object + */ + ListServiceRolloutsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListServiceRolloutsRequest; + })(); + + v1.ListServiceRolloutsResponse = (function() { + + /** + * Properties of a ListServiceRolloutsResponse. + * @memberof google.api.servicemanagement.v1 + * @interface IListServiceRolloutsResponse + * @property {Array.|null} [rollouts] ListServiceRolloutsResponse rollouts + * @property {string|null} [nextPageToken] ListServiceRolloutsResponse nextPageToken + */ + + /** + * Constructs a new ListServiceRolloutsResponse. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a ListServiceRolloutsResponse. + * @implements IListServiceRolloutsResponse + * @constructor + * @param {google.api.servicemanagement.v1.IListServiceRolloutsResponse=} [properties] Properties to set + */ + function ListServiceRolloutsResponse(properties) { + this.rollouts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServiceRolloutsResponse rollouts. + * @member {Array.} rollouts + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @instance + */ + ListServiceRolloutsResponse.prototype.rollouts = $util.emptyArray; + + /** + * ListServiceRolloutsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @instance + */ + ListServiceRolloutsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListServiceRolloutsResponse instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @static + * @param {google.api.servicemanagement.v1.IListServiceRolloutsResponse=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.ListServiceRolloutsResponse} ListServiceRolloutsResponse instance + */ + ListServiceRolloutsResponse.create = function create(properties) { + return new ListServiceRolloutsResponse(properties); + }; + + /** + * Encodes the specified ListServiceRolloutsResponse message. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceRolloutsResponse.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @static + * @param {google.api.servicemanagement.v1.IListServiceRolloutsResponse} message ListServiceRolloutsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceRolloutsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rollouts != null && message.rollouts.length) + for (var i = 0; i < message.rollouts.length; ++i) + $root.google.api.servicemanagement.v1.Rollout.encode(message.rollouts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListServiceRolloutsResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.ListServiceRolloutsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @static + * @param {google.api.servicemanagement.v1.IListServiceRolloutsResponse} message ListServiceRolloutsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceRolloutsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServiceRolloutsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.ListServiceRolloutsResponse} ListServiceRolloutsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceRolloutsResponse.decode = function 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.servicemanagement.v1.ListServiceRolloutsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rollouts && message.rollouts.length)) + message.rollouts = []; + message.rollouts.push($root.google.api.servicemanagement.v1.Rollout.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServiceRolloutsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.ListServiceRolloutsResponse} ListServiceRolloutsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceRolloutsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServiceRolloutsResponse message. + * @function verify + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServiceRolloutsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rollouts != null && message.hasOwnProperty("rollouts")) { + if (!Array.isArray(message.rollouts)) + return "rollouts: array expected"; + for (var i = 0; i < message.rollouts.length; ++i) { + var error = $root.google.api.servicemanagement.v1.Rollout.verify(message.rollouts[i]); + if (error) + return "rollouts." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListServiceRolloutsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.ListServiceRolloutsResponse} ListServiceRolloutsResponse + */ + ListServiceRolloutsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.ListServiceRolloutsResponse) + return object; + var message = new $root.google.api.servicemanagement.v1.ListServiceRolloutsResponse(); + if (object.rollouts) { + if (!Array.isArray(object.rollouts)) + throw TypeError(".google.api.servicemanagement.v1.ListServiceRolloutsResponse.rollouts: array expected"); + message.rollouts = []; + for (var i = 0; i < object.rollouts.length; ++i) { + if (typeof object.rollouts[i] !== "object") + throw TypeError(".google.api.servicemanagement.v1.ListServiceRolloutsResponse.rollouts: object expected"); + message.rollouts[i] = $root.google.api.servicemanagement.v1.Rollout.fromObject(object.rollouts[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListServiceRolloutsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @static + * @param {google.api.servicemanagement.v1.ListServiceRolloutsResponse} message ListServiceRolloutsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServiceRolloutsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rollouts = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.rollouts && message.rollouts.length) { + object.rollouts = []; + for (var j = 0; j < message.rollouts.length; ++j) + object.rollouts[j] = $root.google.api.servicemanagement.v1.Rollout.toObject(message.rollouts[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListServiceRolloutsResponse to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @instance + * @returns {Object.} JSON object + */ + ListServiceRolloutsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListServiceRolloutsResponse; + })(); + + v1.GetServiceRolloutRequest = (function() { + + /** + * Properties of a GetServiceRolloutRequest. + * @memberof google.api.servicemanagement.v1 + * @interface IGetServiceRolloutRequest + * @property {string|null} [serviceName] GetServiceRolloutRequest serviceName + * @property {string|null} [rolloutId] GetServiceRolloutRequest rolloutId + */ + + /** + * Constructs a new GetServiceRolloutRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a GetServiceRolloutRequest. + * @implements IGetServiceRolloutRequest + * @constructor + * @param {google.api.servicemanagement.v1.IGetServiceRolloutRequest=} [properties] Properties to set + */ + function GetServiceRolloutRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetServiceRolloutRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @instance + */ + GetServiceRolloutRequest.prototype.serviceName = ""; + + /** + * GetServiceRolloutRequest rolloutId. + * @member {string} rolloutId + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @instance + */ + GetServiceRolloutRequest.prototype.rolloutId = ""; + + /** + * Creates a new GetServiceRolloutRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @static + * @param {google.api.servicemanagement.v1.IGetServiceRolloutRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.GetServiceRolloutRequest} GetServiceRolloutRequest instance + */ + GetServiceRolloutRequest.create = function create(properties) { + return new GetServiceRolloutRequest(properties); + }; + + /** + * Encodes the specified GetServiceRolloutRequest message. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceRolloutRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @static + * @param {google.api.servicemanagement.v1.IGetServiceRolloutRequest} message GetServiceRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceRolloutRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + if (message.rolloutId != null && Object.hasOwnProperty.call(message, "rolloutId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutId); + return writer; + }; + + /** + * Encodes the specified GetServiceRolloutRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.GetServiceRolloutRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @static + * @param {google.api.servicemanagement.v1.IGetServiceRolloutRequest} message GetServiceRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetServiceRolloutRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.GetServiceRolloutRequest} GetServiceRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceRolloutRequest.decode = function 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.servicemanagement.v1.GetServiceRolloutRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + case 2: + message.rolloutId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetServiceRolloutRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.GetServiceRolloutRequest} GetServiceRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetServiceRolloutRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetServiceRolloutRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + if (!$util.isString(message.rolloutId)) + return "rolloutId: string expected"; + return null; + }; + + /** + * Creates a GetServiceRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.GetServiceRolloutRequest} GetServiceRolloutRequest + */ + GetServiceRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.GetServiceRolloutRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.GetServiceRolloutRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + if (object.rolloutId != null) + message.rolloutId = String(object.rolloutId); + return message; + }; + + /** + * Creates a plain object from a GetServiceRolloutRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @static + * @param {google.api.servicemanagement.v1.GetServiceRolloutRequest} message GetServiceRolloutRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetServiceRolloutRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceName = ""; + object.rolloutId = ""; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + object.rolloutId = message.rolloutId; + return object; + }; + + /** + * Converts this GetServiceRolloutRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @instance + * @returns {Object.} JSON object + */ + GetServiceRolloutRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetServiceRolloutRequest; + })(); + + v1.EnableServiceRequest = (function() { + + /** + * Properties of an EnableServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @interface IEnableServiceRequest + * @property {string|null} [serviceName] EnableServiceRequest serviceName + * @property {string|null} [consumerId] EnableServiceRequest consumerId + */ + + /** + * Constructs a new EnableServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents an EnableServiceRequest. + * @implements IEnableServiceRequest + * @constructor + * @param {google.api.servicemanagement.v1.IEnableServiceRequest=} [properties] Properties to set + */ + function EnableServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnableServiceRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.EnableServiceRequest + * @instance + */ + EnableServiceRequest.prototype.serviceName = ""; + + /** + * EnableServiceRequest consumerId. + * @member {string} consumerId + * @memberof google.api.servicemanagement.v1.EnableServiceRequest + * @instance + */ + EnableServiceRequest.prototype.consumerId = ""; + + /** + * Creates a new EnableServiceRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.EnableServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IEnableServiceRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.EnableServiceRequest} EnableServiceRequest instance + */ + EnableServiceRequest.create = function create(properties) { + return new EnableServiceRequest(properties); + }; + + /** + * Encodes the specified EnableServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.EnableServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IEnableServiceRequest} message EnableServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnableServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + if (message.consumerId != null && Object.hasOwnProperty.call(message, "consumerId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.consumerId); + return writer; + }; + + /** + * Encodes the specified EnableServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.EnableServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IEnableServiceRequest} message EnableServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnableServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnableServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.EnableServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.EnableServiceRequest} EnableServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnableServiceRequest.decode = function 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.servicemanagement.v1.EnableServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + case 2: + message.consumerId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnableServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.EnableServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.EnableServiceRequest} EnableServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnableServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnableServiceRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.EnableServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnableServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + if (message.consumerId != null && message.hasOwnProperty("consumerId")) + if (!$util.isString(message.consumerId)) + return "consumerId: string expected"; + return null; + }; + + /** + * Creates an EnableServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.EnableServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.EnableServiceRequest} EnableServiceRequest + */ + EnableServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.EnableServiceRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.EnableServiceRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + if (object.consumerId != null) + message.consumerId = String(object.consumerId); + return message; + }; + + /** + * Creates a plain object from an EnableServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.EnableServiceRequest + * @static + * @param {google.api.servicemanagement.v1.EnableServiceRequest} message EnableServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnableServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceName = ""; + object.consumerId = ""; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.consumerId != null && message.hasOwnProperty("consumerId")) + object.consumerId = message.consumerId; + return object; + }; + + /** + * Converts this EnableServiceRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.EnableServiceRequest + * @instance + * @returns {Object.} JSON object + */ + EnableServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnableServiceRequest; + })(); + + v1.EnableServiceResponse = (function() { + + /** + * Properties of an EnableServiceResponse. + * @memberof google.api.servicemanagement.v1 + * @interface IEnableServiceResponse + */ + + /** + * Constructs a new EnableServiceResponse. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents an EnableServiceResponse. + * @implements IEnableServiceResponse + * @constructor + * @param {google.api.servicemanagement.v1.IEnableServiceResponse=} [properties] Properties to set + */ + function EnableServiceResponse(properties) { + if (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 EnableServiceResponse instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.EnableServiceResponse + * @static + * @param {google.api.servicemanagement.v1.IEnableServiceResponse=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.EnableServiceResponse} EnableServiceResponse instance + */ + EnableServiceResponse.create = function create(properties) { + return new EnableServiceResponse(properties); + }; + + /** + * Encodes the specified EnableServiceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceResponse.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.EnableServiceResponse + * @static + * @param {google.api.servicemanagement.v1.IEnableServiceResponse} message EnableServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnableServiceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified EnableServiceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.EnableServiceResponse + * @static + * @param {google.api.servicemanagement.v1.IEnableServiceResponse} message EnableServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnableServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnableServiceResponse message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.EnableServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.EnableServiceResponse} EnableServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnableServiceResponse.decode = function 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.servicemanagement.v1.EnableServiceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnableServiceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.EnableServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.EnableServiceResponse} EnableServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnableServiceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnableServiceResponse message. + * @function verify + * @memberof google.api.servicemanagement.v1.EnableServiceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnableServiceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an EnableServiceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.EnableServiceResponse + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.EnableServiceResponse} EnableServiceResponse + */ + EnableServiceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.EnableServiceResponse) + return object; + return new $root.google.api.servicemanagement.v1.EnableServiceResponse(); + }; + + /** + * Creates a plain object from an EnableServiceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.EnableServiceResponse + * @static + * @param {google.api.servicemanagement.v1.EnableServiceResponse} message EnableServiceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnableServiceResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this EnableServiceResponse to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.EnableServiceResponse + * @instance + * @returns {Object.} JSON object + */ + EnableServiceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnableServiceResponse; + })(); + + v1.DisableServiceRequest = (function() { + + /** + * Properties of a DisableServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @interface IDisableServiceRequest + * @property {string|null} [serviceName] DisableServiceRequest serviceName + * @property {string|null} [consumerId] DisableServiceRequest consumerId + */ + + /** + * Constructs a new DisableServiceRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a DisableServiceRequest. + * @implements IDisableServiceRequest + * @constructor + * @param {google.api.servicemanagement.v1.IDisableServiceRequest=} [properties] Properties to set + */ + function DisableServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DisableServiceRequest serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.DisableServiceRequest + * @instance + */ + DisableServiceRequest.prototype.serviceName = ""; + + /** + * DisableServiceRequest consumerId. + * @member {string} consumerId + * @memberof google.api.servicemanagement.v1.DisableServiceRequest + * @instance + */ + DisableServiceRequest.prototype.consumerId = ""; + + /** + * Creates a new DisableServiceRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.DisableServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IDisableServiceRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.DisableServiceRequest} DisableServiceRequest instance + */ + DisableServiceRequest.create = function create(properties) { + return new DisableServiceRequest(properties); + }; + + /** + * Encodes the specified DisableServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.DisableServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IDisableServiceRequest} message DisableServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisableServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + if (message.consumerId != null && Object.hasOwnProperty.call(message, "consumerId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.consumerId); + return writer; + }; + + /** + * Encodes the specified DisableServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.DisableServiceRequest + * @static + * @param {google.api.servicemanagement.v1.IDisableServiceRequest} message DisableServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisableServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DisableServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.DisableServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.DisableServiceRequest} DisableServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisableServiceRequest.decode = function 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.servicemanagement.v1.DisableServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + case 2: + message.consumerId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DisableServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.DisableServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.DisableServiceRequest} DisableServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisableServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DisableServiceRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.DisableServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DisableServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + if (message.consumerId != null && message.hasOwnProperty("consumerId")) + if (!$util.isString(message.consumerId)) + return "consumerId: string expected"; + return null; + }; + + /** + * Creates a DisableServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.DisableServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.DisableServiceRequest} DisableServiceRequest + */ + DisableServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.DisableServiceRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.DisableServiceRequest(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + if (object.consumerId != null) + message.consumerId = String(object.consumerId); + return message; + }; + + /** + * Creates a plain object from a DisableServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.DisableServiceRequest + * @static + * @param {google.api.servicemanagement.v1.DisableServiceRequest} message DisableServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisableServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceName = ""; + object.consumerId = ""; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.consumerId != null && message.hasOwnProperty("consumerId")) + object.consumerId = message.consumerId; + return object; + }; + + /** + * Converts this DisableServiceRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.DisableServiceRequest + * @instance + * @returns {Object.} JSON object + */ + DisableServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DisableServiceRequest; + })(); + + v1.DisableServiceResponse = (function() { + + /** + * Properties of a DisableServiceResponse. + * @memberof google.api.servicemanagement.v1 + * @interface IDisableServiceResponse + */ + + /** + * Constructs a new DisableServiceResponse. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a DisableServiceResponse. + * @implements IDisableServiceResponse + * @constructor + * @param {google.api.servicemanagement.v1.IDisableServiceResponse=} [properties] Properties to set + */ + function DisableServiceResponse(properties) { + if (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 DisableServiceResponse instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.DisableServiceResponse + * @static + * @param {google.api.servicemanagement.v1.IDisableServiceResponse=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.DisableServiceResponse} DisableServiceResponse instance + */ + DisableServiceResponse.create = function create(properties) { + return new DisableServiceResponse(properties); + }; + + /** + * Encodes the specified DisableServiceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceResponse.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.DisableServiceResponse + * @static + * @param {google.api.servicemanagement.v1.IDisableServiceResponse} message DisableServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisableServiceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DisableServiceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.DisableServiceResponse + * @static + * @param {google.api.servicemanagement.v1.IDisableServiceResponse} message DisableServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisableServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DisableServiceResponse message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.DisableServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.DisableServiceResponse} DisableServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisableServiceResponse.decode = function 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.servicemanagement.v1.DisableServiceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DisableServiceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.DisableServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.DisableServiceResponse} DisableServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisableServiceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DisableServiceResponse message. + * @function verify + * @memberof google.api.servicemanagement.v1.DisableServiceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DisableServiceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DisableServiceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.DisableServiceResponse + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.DisableServiceResponse} DisableServiceResponse + */ + DisableServiceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.DisableServiceResponse) + return object; + return new $root.google.api.servicemanagement.v1.DisableServiceResponse(); + }; + + /** + * Creates a plain object from a DisableServiceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.DisableServiceResponse + * @static + * @param {google.api.servicemanagement.v1.DisableServiceResponse} message DisableServiceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisableServiceResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DisableServiceResponse to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.DisableServiceResponse + * @instance + * @returns {Object.} JSON object + */ + DisableServiceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DisableServiceResponse; + })(); + + v1.GenerateConfigReportRequest = (function() { + + /** + * Properties of a GenerateConfigReportRequest. + * @memberof google.api.servicemanagement.v1 + * @interface IGenerateConfigReportRequest + * @property {google.protobuf.IAny|null} [newConfig] GenerateConfigReportRequest newConfig + * @property {google.protobuf.IAny|null} [oldConfig] GenerateConfigReportRequest oldConfig + */ + + /** + * Constructs a new GenerateConfigReportRequest. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a GenerateConfigReportRequest. + * @implements IGenerateConfigReportRequest + * @constructor + * @param {google.api.servicemanagement.v1.IGenerateConfigReportRequest=} [properties] Properties to set + */ + function GenerateConfigReportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateConfigReportRequest newConfig. + * @member {google.protobuf.IAny|null|undefined} newConfig + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @instance + */ + GenerateConfigReportRequest.prototype.newConfig = null; + + /** + * GenerateConfigReportRequest oldConfig. + * @member {google.protobuf.IAny|null|undefined} oldConfig + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @instance + */ + GenerateConfigReportRequest.prototype.oldConfig = null; + + /** + * Creates a new GenerateConfigReportRequest instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @static + * @param {google.api.servicemanagement.v1.IGenerateConfigReportRequest=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.GenerateConfigReportRequest} GenerateConfigReportRequest instance + */ + GenerateConfigReportRequest.create = function create(properties) { + return new GenerateConfigReportRequest(properties); + }; + + /** + * Encodes the specified GenerateConfigReportRequest message. Does not implicitly {@link google.api.servicemanagement.v1.GenerateConfigReportRequest.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @static + * @param {google.api.servicemanagement.v1.IGenerateConfigReportRequest} message GenerateConfigReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConfigReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.newConfig != null && Object.hasOwnProperty.call(message, "newConfig")) + $root.google.protobuf.Any.encode(message.newConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.oldConfig != null && Object.hasOwnProperty.call(message, "oldConfig")) + $root.google.protobuf.Any.encode(message.oldConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenerateConfigReportRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.GenerateConfigReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @static + * @param {google.api.servicemanagement.v1.IGenerateConfigReportRequest} message GenerateConfigReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConfigReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateConfigReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.GenerateConfigReportRequest} GenerateConfigReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConfigReportRequest.decode = function 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.servicemanagement.v1.GenerateConfigReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.newConfig = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.oldConfig = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateConfigReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.GenerateConfigReportRequest} GenerateConfigReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConfigReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateConfigReportRequest message. + * @function verify + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateConfigReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.newConfig != null && message.hasOwnProperty("newConfig")) { + var error = $root.google.protobuf.Any.verify(message.newConfig); + if (error) + return "newConfig." + error; + } + if (message.oldConfig != null && message.hasOwnProperty("oldConfig")) { + var error = $root.google.protobuf.Any.verify(message.oldConfig); + if (error) + return "oldConfig." + error; + } + return null; + }; + + /** + * Creates a GenerateConfigReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.GenerateConfigReportRequest} GenerateConfigReportRequest + */ + GenerateConfigReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.GenerateConfigReportRequest) + return object; + var message = new $root.google.api.servicemanagement.v1.GenerateConfigReportRequest(); + if (object.newConfig != null) { + if (typeof object.newConfig !== "object") + throw TypeError(".google.api.servicemanagement.v1.GenerateConfigReportRequest.newConfig: object expected"); + message.newConfig = $root.google.protobuf.Any.fromObject(object.newConfig); + } + if (object.oldConfig != null) { + if (typeof object.oldConfig !== "object") + throw TypeError(".google.api.servicemanagement.v1.GenerateConfigReportRequest.oldConfig: object expected"); + message.oldConfig = $root.google.protobuf.Any.fromObject(object.oldConfig); + } + return message; + }; + + /** + * Creates a plain object from a GenerateConfigReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @static + * @param {google.api.servicemanagement.v1.GenerateConfigReportRequest} message GenerateConfigReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateConfigReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.newConfig = null; + object.oldConfig = null; + } + if (message.newConfig != null && message.hasOwnProperty("newConfig")) + object.newConfig = $root.google.protobuf.Any.toObject(message.newConfig, options); + if (message.oldConfig != null && message.hasOwnProperty("oldConfig")) + object.oldConfig = $root.google.protobuf.Any.toObject(message.oldConfig, options); + return object; + }; + + /** + * Converts this GenerateConfigReportRequest to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @instance + * @returns {Object.} JSON object + */ + GenerateConfigReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenerateConfigReportRequest; + })(); + + v1.GenerateConfigReportResponse = (function() { + + /** + * Properties of a GenerateConfigReportResponse. + * @memberof google.api.servicemanagement.v1 + * @interface IGenerateConfigReportResponse + * @property {string|null} [serviceName] GenerateConfigReportResponse serviceName + * @property {string|null} [id] GenerateConfigReportResponse id + * @property {Array.|null} [changeReports] GenerateConfigReportResponse changeReports + * @property {Array.|null} [diagnostics] GenerateConfigReportResponse diagnostics + */ + + /** + * Constructs a new GenerateConfigReportResponse. + * @memberof google.api.servicemanagement.v1 + * @classdesc Represents a GenerateConfigReportResponse. + * @implements IGenerateConfigReportResponse + * @constructor + * @param {google.api.servicemanagement.v1.IGenerateConfigReportResponse=} [properties] Properties to set + */ + function GenerateConfigReportResponse(properties) { + this.changeReports = []; + this.diagnostics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateConfigReportResponse serviceName. + * @member {string} serviceName + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @instance + */ + GenerateConfigReportResponse.prototype.serviceName = ""; + + /** + * GenerateConfigReportResponse id. + * @member {string} id + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @instance + */ + GenerateConfigReportResponse.prototype.id = ""; + + /** + * GenerateConfigReportResponse changeReports. + * @member {Array.} changeReports + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @instance + */ + GenerateConfigReportResponse.prototype.changeReports = $util.emptyArray; + + /** + * GenerateConfigReportResponse diagnostics. + * @member {Array.} diagnostics + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @instance + */ + GenerateConfigReportResponse.prototype.diagnostics = $util.emptyArray; + + /** + * Creates a new GenerateConfigReportResponse instance using the specified properties. + * @function create + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @static + * @param {google.api.servicemanagement.v1.IGenerateConfigReportResponse=} [properties] Properties to set + * @returns {google.api.servicemanagement.v1.GenerateConfigReportResponse} GenerateConfigReportResponse instance + */ + GenerateConfigReportResponse.create = function create(properties) { + return new GenerateConfigReportResponse(properties); + }; + + /** + * Encodes the specified GenerateConfigReportResponse message. Does not implicitly {@link google.api.servicemanagement.v1.GenerateConfigReportResponse.verify|verify} messages. + * @function encode + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @static + * @param {google.api.servicemanagement.v1.IGenerateConfigReportResponse} message GenerateConfigReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConfigReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.changeReports != null && message.changeReports.length) + for (var i = 0; i < message.changeReports.length; ++i) + $root.google.api.servicemanagement.v1.ChangeReport.encode(message.changeReports[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.diagnostics != null && message.diagnostics.length) + for (var i = 0; i < message.diagnostics.length; ++i) + $root.google.api.servicemanagement.v1.Diagnostic.encode(message.diagnostics[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenerateConfigReportResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.GenerateConfigReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @static + * @param {google.api.servicemanagement.v1.IGenerateConfigReportResponse} message GenerateConfigReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConfigReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateConfigReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicemanagement.v1.GenerateConfigReportResponse} GenerateConfigReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConfigReportResponse.decode = function 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.servicemanagement.v1.GenerateConfigReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceName = reader.string(); + break; + case 2: + message.id = reader.string(); + break; + case 3: + if (!(message.changeReports && message.changeReports.length)) + message.changeReports = []; + message.changeReports.push($root.google.api.servicemanagement.v1.ChangeReport.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.diagnostics && message.diagnostics.length)) + message.diagnostics = []; + message.diagnostics.push($root.google.api.servicemanagement.v1.Diagnostic.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateConfigReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicemanagement.v1.GenerateConfigReportResponse} GenerateConfigReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConfigReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateConfigReportResponse message. + * @function verify + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateConfigReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.changeReports != null && message.hasOwnProperty("changeReports")) { + if (!Array.isArray(message.changeReports)) + return "changeReports: array expected"; + for (var i = 0; i < message.changeReports.length; ++i) { + var error = $root.google.api.servicemanagement.v1.ChangeReport.verify(message.changeReports[i]); + if (error) + return "changeReports." + error; + } + } + if (message.diagnostics != null && message.hasOwnProperty("diagnostics")) { + if (!Array.isArray(message.diagnostics)) + return "diagnostics: array expected"; + for (var i = 0; i < message.diagnostics.length; ++i) { + var error = $root.google.api.servicemanagement.v1.Diagnostic.verify(message.diagnostics[i]); + if (error) + return "diagnostics." + error; + } + } + return null; + }; + + /** + * Creates a GenerateConfigReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicemanagement.v1.GenerateConfigReportResponse} GenerateConfigReportResponse + */ + GenerateConfigReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicemanagement.v1.GenerateConfigReportResponse) + return object; + var message = new $root.google.api.servicemanagement.v1.GenerateConfigReportResponse(); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + if (object.id != null) + message.id = String(object.id); + if (object.changeReports) { + if (!Array.isArray(object.changeReports)) + throw TypeError(".google.api.servicemanagement.v1.GenerateConfigReportResponse.changeReports: array expected"); + message.changeReports = []; + for (var i = 0; i < object.changeReports.length; ++i) { + if (typeof object.changeReports[i] !== "object") + throw TypeError(".google.api.servicemanagement.v1.GenerateConfigReportResponse.changeReports: object expected"); + message.changeReports[i] = $root.google.api.servicemanagement.v1.ChangeReport.fromObject(object.changeReports[i]); + } + } + if (object.diagnostics) { + if (!Array.isArray(object.diagnostics)) + throw TypeError(".google.api.servicemanagement.v1.GenerateConfigReportResponse.diagnostics: array expected"); + message.diagnostics = []; + for (var i = 0; i < object.diagnostics.length; ++i) { + if (typeof object.diagnostics[i] !== "object") + throw TypeError(".google.api.servicemanagement.v1.GenerateConfigReportResponse.diagnostics: object expected"); + message.diagnostics[i] = $root.google.api.servicemanagement.v1.Diagnostic.fromObject(object.diagnostics[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GenerateConfigReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @static + * @param {google.api.servicemanagement.v1.GenerateConfigReportResponse} message GenerateConfigReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateConfigReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.changeReports = []; + object.diagnostics = []; + } + if (options.defaults) { + object.serviceName = ""; + object.id = ""; + } + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.changeReports && message.changeReports.length) { + object.changeReports = []; + for (var j = 0; j < message.changeReports.length; ++j) + object.changeReports[j] = $root.google.api.servicemanagement.v1.ChangeReport.toObject(message.changeReports[j], options); + } + if (message.diagnostics && message.diagnostics.length) { + object.diagnostics = []; + for (var j = 0; j < message.diagnostics.length; ++j) + object.diagnostics[j] = $root.google.api.servicemanagement.v1.Diagnostic.toObject(message.diagnostics[j], options); + } + return object; + }; + + /** + * Converts this GenerateConfigReportResponse to JSON. + * @function toJSON + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @instance + * @returns {Object.} JSON object + */ + GenerateConfigReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenerateConfigReportResponse; + })(); + + return v1; + })(); + + return servicemanagement; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + api.ConfigChange = (function() { + + /** + * Properties of a ConfigChange. + * @memberof google.api + * @interface IConfigChange + * @property {string|null} [element] ConfigChange element + * @property {string|null} [oldValue] ConfigChange oldValue + * @property {string|null} [newValue] ConfigChange newValue + * @property {google.api.ChangeType|null} [changeType] ConfigChange changeType + * @property {Array.|null} [advices] ConfigChange advices + */ + + /** + * Constructs a new ConfigChange. + * @memberof google.api + * @classdesc Represents a ConfigChange. + * @implements IConfigChange + * @constructor + * @param {google.api.IConfigChange=} [properties] Properties to set + */ + function ConfigChange(properties) { + this.advices = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfigChange element. + * @member {string} element + * @memberof google.api.ConfigChange + * @instance + */ + ConfigChange.prototype.element = ""; + + /** + * ConfigChange oldValue. + * @member {string} oldValue + * @memberof google.api.ConfigChange + * @instance + */ + ConfigChange.prototype.oldValue = ""; + + /** + * ConfigChange newValue. + * @member {string} newValue + * @memberof google.api.ConfigChange + * @instance + */ + ConfigChange.prototype.newValue = ""; + + /** + * ConfigChange changeType. + * @member {google.api.ChangeType} changeType + * @memberof google.api.ConfigChange + * @instance + */ + ConfigChange.prototype.changeType = 0; + + /** + * ConfigChange advices. + * @member {Array.} advices + * @memberof google.api.ConfigChange + * @instance + */ + ConfigChange.prototype.advices = $util.emptyArray; + + /** + * Creates a new ConfigChange instance using the specified properties. + * @function create + * @memberof google.api.ConfigChange + * @static + * @param {google.api.IConfigChange=} [properties] Properties to set + * @returns {google.api.ConfigChange} ConfigChange instance + */ + ConfigChange.create = function create(properties) { + return new ConfigChange(properties); + }; + + /** + * Encodes the specified ConfigChange message. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. + * @function encode + * @memberof google.api.ConfigChange + * @static + * @param {google.api.IConfigChange} message ConfigChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.element != null && Object.hasOwnProperty.call(message, "element")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.element); + if (message.oldValue != null && Object.hasOwnProperty.call(message, "oldValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldValue); + if (message.newValue != null && Object.hasOwnProperty.call(message, "newValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newValue); + if (message.changeType != null && Object.hasOwnProperty.call(message, "changeType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.changeType); + if (message.advices != null && message.advices.length) + for (var i = 0; i < message.advices.length; ++i) + $root.google.api.Advice.encode(message.advices[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConfigChange message, length delimited. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ConfigChange + * @static + * @param {google.api.IConfigChange} message ConfigChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigChange message from the specified reader or buffer. + * @function decode + * @memberof google.api.ConfigChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ConfigChange} ConfigChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigChange.decode = function 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.ConfigChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.element = reader.string(); + break; + case 2: + message.oldValue = reader.string(); + break; + case 3: + message.newValue = reader.string(); + break; + case 4: + message.changeType = reader.int32(); + break; + case 5: + if (!(message.advices && message.advices.length)) + message.advices = []; + message.advices.push($root.google.api.Advice.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfigChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ConfigChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ConfigChange} ConfigChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfigChange message. + * @function verify + * @memberof google.api.ConfigChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.element != null && message.hasOwnProperty("element")) + if (!$util.isString(message.element)) + return "element: string expected"; + if (message.oldValue != null && message.hasOwnProperty("oldValue")) + if (!$util.isString(message.oldValue)) + return "oldValue: string expected"; + if (message.newValue != null && message.hasOwnProperty("newValue")) + if (!$util.isString(message.newValue)) + return "newValue: string expected"; + if (message.changeType != null && message.hasOwnProperty("changeType")) + switch (message.changeType) { + default: + return "changeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.advices != null && message.hasOwnProperty("advices")) { + if (!Array.isArray(message.advices)) + return "advices: array expected"; + for (var i = 0; i < message.advices.length; ++i) { + var error = $root.google.api.Advice.verify(message.advices[i]); + if (error) + return "advices." + error; + } + } + return null; + }; + + /** + * Creates a ConfigChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ConfigChange + * @static + * @param {Object.} object Plain object + * @returns {google.api.ConfigChange} ConfigChange + */ + ConfigChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ConfigChange) + return object; + var message = new $root.google.api.ConfigChange(); + if (object.element != null) + message.element = String(object.element); + if (object.oldValue != null) + message.oldValue = String(object.oldValue); + if (object.newValue != null) + message.newValue = String(object.newValue); + switch (object.changeType) { + case "CHANGE_TYPE_UNSPECIFIED": + case 0: + message.changeType = 0; + break; + case "ADDED": + case 1: + message.changeType = 1; + break; + case "REMOVED": + case 2: + message.changeType = 2; + break; + case "MODIFIED": + case 3: + message.changeType = 3; + break; + } + if (object.advices) { + if (!Array.isArray(object.advices)) + throw TypeError(".google.api.ConfigChange.advices: array expected"); + message.advices = []; + for (var i = 0; i < object.advices.length; ++i) { + if (typeof object.advices[i] !== "object") + throw TypeError(".google.api.ConfigChange.advices: object expected"); + message.advices[i] = $root.google.api.Advice.fromObject(object.advices[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ConfigChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ConfigChange + * @static + * @param {google.api.ConfigChange} message ConfigChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.advices = []; + if (options.defaults) { + object.element = ""; + object.oldValue = ""; + object.newValue = ""; + object.changeType = options.enums === String ? "CHANGE_TYPE_UNSPECIFIED" : 0; + } + if (message.element != null && message.hasOwnProperty("element")) + object.element = message.element; + if (message.oldValue != null && message.hasOwnProperty("oldValue")) + object.oldValue = message.oldValue; + if (message.newValue != null && message.hasOwnProperty("newValue")) + object.newValue = message.newValue; + if (message.changeType != null && message.hasOwnProperty("changeType")) + object.changeType = options.enums === String ? $root.google.api.ChangeType[message.changeType] : message.changeType; + if (message.advices && message.advices.length) { + object.advices = []; + for (var j = 0; j < message.advices.length; ++j) + object.advices[j] = $root.google.api.Advice.toObject(message.advices[j], options); + } + return object; + }; + + /** + * Converts this ConfigChange to JSON. + * @function toJSON + * @memberof google.api.ConfigChange + * @instance + * @returns {Object.} JSON object + */ + ConfigChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConfigChange; + })(); + + api.Advice = (function() { + + /** + * Properties of an Advice. + * @memberof google.api + * @interface IAdvice + * @property {string|null} [description] Advice description + */ + + /** + * Constructs a new Advice. + * @memberof google.api + * @classdesc Represents an Advice. + * @implements IAdvice + * @constructor + * @param {google.api.IAdvice=} [properties] Properties to set + */ + function Advice(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Advice description. + * @member {string} description + * @memberof google.api.Advice + * @instance + */ + Advice.prototype.description = ""; + + /** + * Creates a new Advice instance using the specified properties. + * @function create + * @memberof google.api.Advice + * @static + * @param {google.api.IAdvice=} [properties] Properties to set + * @returns {google.api.Advice} Advice instance + */ + Advice.create = function create(properties) { + return new Advice(properties); + }; + + /** + * Encodes the specified Advice message. Does not implicitly {@link google.api.Advice.verify|verify} messages. + * @function encode + * @memberof google.api.Advice + * @static + * @param {google.api.IAdvice} message Advice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Advice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified Advice message, length delimited. Does not implicitly {@link google.api.Advice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Advice + * @static + * @param {google.api.IAdvice} message Advice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Advice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Advice message from the specified reader or buffer. + * @function decode + * @memberof google.api.Advice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Advice} Advice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Advice.decode = function 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.Advice(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Advice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Advice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Advice} Advice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Advice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Advice message. + * @function verify + * @memberof google.api.Advice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Advice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an Advice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Advice + * @static + * @param {Object.} object Plain object + * @returns {google.api.Advice} Advice + */ + Advice.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Advice) + return object; + var message = new $root.google.api.Advice(); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an Advice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Advice + * @static + * @param {google.api.Advice} message Advice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Advice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.description = ""; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this Advice to JSON. + * @function toJSON + * @memberof google.api.Advice + * @instance + * @returns {Object.} JSON object + */ + Advice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Advice; + })(); + + /** + * ChangeType enum. + * @name google.api.ChangeType + * @enum {number} + * @property {number} CHANGE_TYPE_UNSPECIFIED=0 CHANGE_TYPE_UNSPECIFIED value + * @property {number} ADDED=1 ADDED value + * @property {number} REMOVED=2 REMOVED value + * @property {number} MODIFIED=3 MODIFIED value + */ + api.ChangeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHANGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADDED"] = 1; + values[valuesById[2] = "REMOVED"] = 2; + values[valuesById[3] = "MODIFIED"] = 3; + return values; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + return values; + })(); + + api.MetricDescriptor = (function() { + + /** + * Properties of a MetricDescriptor. + * @memberof google.api + * @interface IMetricDescriptor + * @property {string|null} [name] MetricDescriptor name + * @property {string|null} [type] MetricDescriptor type + * @property {Array.|null} [labels] MetricDescriptor labels + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType + * @property {string|null} [unit] MetricDescriptor unit + * @property {string|null} [description] MetricDescriptor description + * @property {string|null} [displayName] MetricDescriptor displayName + * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage + * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes + */ + + /** + * Constructs a new MetricDescriptor. + * @memberof google.api + * @classdesc Represents a MetricDescriptor. + * @implements IMetricDescriptor + * @constructor + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + */ + function MetricDescriptor(properties) { + this.labels = []; + this.monitoredResourceTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricDescriptor name. + * @member {string} name + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.name = ""; + + /** + * MetricDescriptor type. + * @member {string} type + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.type = ""; + + /** + * MetricDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.labels = $util.emptyArray; + + /** + * MetricDescriptor metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.metricKind = 0; + + /** + * MetricDescriptor valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.valueType = 0; + + /** + * MetricDescriptor unit. + * @member {string} unit + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.unit = ""; + + /** + * MetricDescriptor description. + * @member {string} description + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.description = ""; + + /** + * MetricDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.displayName = ""; + + /** + * MetricDescriptor metadata. + * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.metadata = null; + + /** + * MetricDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.launchStage = 0; + + /** + * MetricDescriptor monitoredResourceTypes. + * @member {Array.} monitoredResourceTypes + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; + + /** + * Creates a new MetricDescriptor instance using the specified properties. + * @function create + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @returns {google.api.MetricDescriptor} MetricDescriptor instance + */ + MetricDescriptor.create = function create(properties) { + return new MetricDescriptor(properties); + }; + + /** + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptor.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.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); + if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); + return writer; + }; + + /** + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.MetricDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MetricDescriptor} MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptor.decode = function 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.MetricDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 8: + message.type = reader.string(); + break; + case 2: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 3: + message.metricKind = reader.int32(); + break; + case 4: + message.valueType = reader.int32(); + break; + case 5: + message.unit = reader.string(); + break; + case 6: + message.description = reader.string(); + break; + case 7: + message.displayName = reader.string(); + break; + case 10: + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); + break; + case 12: + message.launchStage = reader.int32(); + break; + case 13: + if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) + message.monitoredResourceTypes = []; + message.monitoredResourceTypes.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MetricDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MetricDescriptor} MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricDescriptor message. + * @function verify + * @memberof google.api.MetricDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + switch (message.metricKind) { + default: + return "metricKind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + 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.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { + if (!Array.isArray(message.monitoredResourceTypes)) + return "monitoredResourceTypes: array expected"; + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + if (!$util.isString(message.monitoredResourceTypes[i])) + return "monitoredResourceTypes: string[] expected"; + } + return null; + }; + + /** + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor} MetricDescriptor + */ + MetricDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor) + return object; + var message = new $root.google.api.MetricDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MetricDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MetricDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.metricKind) { + case "METRIC_KIND_UNSPECIFIED": + case 0: + message.metricKind = 0; + break; + case "GAUGE": + case 1: + message.metricKind = 1; + break; + case "DELTA": + case 2: + message.metricKind = 2; + break; + case "CUMULATIVE": + case 3: + message.metricKind = 3; + break; + } + switch (object.valueType) { + case "VALUE_TYPE_UNSPECIFIED": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + case "DOUBLE": + case 3: + message.valueType = 3; + break; + case "STRING": + case 4: + message.valueType = 4; + break; + case "DISTRIBUTION": + case 5: + message.valueType = 5; + break; + case "MONEY": + case 6: + message.valueType = 6; + break; + } + if (object.unit != null) + message.unit = String(object.unit); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); + } + switch (object.launchStage) { + 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.monitoredResourceTypes) { + if (!Array.isArray(object.monitoredResourceTypes)) + throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); + message.monitoredResourceTypes = []; + for (var i = 0; i < object.monitoredResourceTypes.length; ++i) + message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.MetricDescriptor} message MetricDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.labels = []; + object.monitoredResourceTypes = []; + } + if (options.defaults) { + object.name = ""; + object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.unit = ""; + object.description = ""; + object.displayName = ""; + object.type = ""; + object.metadata = null; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { + object.monitoredResourceTypes = []; + for (var j = 0; j < message.monitoredResourceTypes.length; ++j) + object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; + } + return object; + }; + + /** + * Converts this MetricDescriptor to JSON. + * @function toJSON + * @memberof google.api.MetricDescriptor + * @instance + * @returns {Object.} JSON object + */ + MetricDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + MetricDescriptor.MetricDescriptorMetadata = (function() { + + /** + * Properties of a MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @interface IMetricDescriptorMetadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage + * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod + * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay + */ + + /** + * Constructs a new MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @classdesc Represents a MetricDescriptorMetadata. + * @implements IMetricDescriptorMetadata + * @constructor + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + */ + function MetricDescriptorMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricDescriptorMetadata launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.launchStage = 0; + + /** + * MetricDescriptorMetadata samplePeriod. + * @member {google.protobuf.IDuration|null|undefined} samplePeriod + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.samplePeriod = null; + + /** + * MetricDescriptorMetadata ingestDelay. + * @member {google.protobuf.IDuration|null|undefined} ingestDelay + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.ingestDelay = null; + + /** + * Creates a new MetricDescriptorMetadata instance using the specified properties. + * @function create + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance + */ + MetricDescriptorMetadata.create = function create(properties) { + return new MetricDescriptorMetadata(properties); + }; + + /** + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); + if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) + $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) + $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decode = function 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.MetricDescriptor.MetricDescriptorMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.launchStage = reader.int32(); + break; + case 2: + message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricDescriptorMetadata message. + * @function verify + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricDescriptorMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { + var error = $root.google.protobuf.Duration.verify(message.samplePeriod); + if (error) + return "samplePeriod." + error; + } + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { + var error = $root.google.protobuf.Duration.verify(message.ingestDelay); + if (error) + return "ingestDelay." + error; + } + return null; + }; + + /** + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + */ + MetricDescriptorMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) + return object; + var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + switch (object.launchStage) { + 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.samplePeriod != null) { + if (typeof object.samplePeriod !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); + message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); + } + if (object.ingestDelay != null) { + if (typeof object.ingestDelay !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); + message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); + } + return message; + }; + + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricDescriptorMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.samplePeriod = null; + object.ingestDelay = null; + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) + object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) + object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); + return object; + }; + + /** + * Converts this MetricDescriptorMetadata to JSON. + * @function toJSON + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + * @returns {Object.} JSON object + */ + MetricDescriptorMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MetricDescriptorMetadata; + })(); + + /** + * MetricKind enum. + * @name google.api.MetricDescriptor.MetricKind + * @enum {number} + * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value + * @property {number} GAUGE=1 GAUGE value + * @property {number} DELTA=2 DELTA value + * @property {number} CUMULATIVE=3 CUMULATIVE value + */ + MetricDescriptor.MetricKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "GAUGE"] = 1; + values[valuesById[2] = "DELTA"] = 2; + values[valuesById[3] = "CUMULATIVE"] = 3; + return values; + })(); + + /** + * ValueType enum. + * @name google.api.MetricDescriptor.ValueType + * @enum {number} + * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + * @property {number} DOUBLE=3 DOUBLE value + * @property {number} STRING=4 STRING value + * @property {number} DISTRIBUTION=5 DISTRIBUTION value + * @property {number} MONEY=6 MONEY value + */ + MetricDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + values[valuesById[3] = "DOUBLE"] = 3; + values[valuesById[4] = "STRING"] = 4; + values[valuesById[5] = "DISTRIBUTION"] = 5; + values[valuesById[6] = "MONEY"] = 6; + return values; + })(); + + return MetricDescriptor; + })(); + + api.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.api + * @interface IMetric + * @property {string|null} [type] Metric type + * @property {Object.|null} [labels] Metric labels + */ + + /** + * Constructs a new Metric. + * @memberof google.api + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.api.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metric type. + * @member {string} type + * @memberof google.api.Metric + * @instance + */ + Metric.prototype.type = ""; + + /** + * Metric labels. + * @member {Object.} labels + * @memberof google.api.Metric + * @instance + */ + Metric.prototype.labels = $util.emptyObject; + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric=} [properties] Properties to set + * @returns {google.api.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @function encode + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.api.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function 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.Metric(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.type = reader.string(); + break; + case 2: + 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; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metric message. + * @function verify + * @memberof google.api.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.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.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"; + } + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.api.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Metric) + return object; + var message = new $root.google.api.Metric(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.Metric.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]]); + } + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Metric + * @static + * @param {google.api.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + 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.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.api.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Metric; + })(); + + api.LabelDescriptor = (function() { + + /** + * Properties of a LabelDescriptor. + * @memberof google.api + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description + */ + + /** + * Constructs a new LabelDescriptor. + * @memberof google.api + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor + * @constructor + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + */ + function LabelDescriptor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.key = ""; + + /** + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.valueType = 0; + + /** + * LabelDescriptor description. + * @member {string} description + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.description = ""; + + /** + * Creates a new LabelDescriptor instance using the specified properties. + * @function create + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance + */ + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); + }; + + /** + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decode = function 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.LabelDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.valueType = reader.int32(); + break; + case 3: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelDescriptor message. + * @function verify + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.LabelDescriptor} LabelDescriptor + */ + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) + return object; + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { + case "STRING": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; + object.description = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this LabelDescriptor to JSON. + * @function toJSON + * @memberof google.api.LabelDescriptor + * @instance + * @returns {Object.} JSON object + */ + LabelDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; + })(); + + return LabelDescriptor; + })(); + + /** + * 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; + })(); + + api.Quota = (function() { + + /** + * Properties of a Quota. + * @memberof google.api + * @interface IQuota + * @property {Array.|null} [limits] Quota limits + * @property {Array.|null} [metricRules] Quota metricRules + */ + + /** + * Constructs a new Quota. + * @memberof google.api + * @classdesc Represents a Quota. + * @implements IQuota + * @constructor + * @param {google.api.IQuota=} [properties] Properties to set + */ + function Quota(properties) { + this.limits = []; + this.metricRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Quota limits. + * @member {Array.} limits + * @memberof google.api.Quota + * @instance + */ + Quota.prototype.limits = $util.emptyArray; + + /** + * Quota metricRules. + * @member {Array.} metricRules + * @memberof google.api.Quota + * @instance + */ + Quota.prototype.metricRules = $util.emptyArray; + + /** + * Creates a new Quota instance using the specified properties. + * @function create + * @memberof google.api.Quota + * @static + * @param {google.api.IQuota=} [properties] Properties to set + * @returns {google.api.Quota} Quota instance + */ + Quota.create = function create(properties) { + return new Quota(properties); + }; + + /** + * Encodes the specified Quota message. Does not implicitly {@link google.api.Quota.verify|verify} messages. + * @function encode + * @memberof google.api.Quota + * @static + * @param {google.api.IQuota} message Quota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Quota.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.limits != null && message.limits.length) + for (var i = 0; i < message.limits.length; ++i) + $root.google.api.QuotaLimit.encode(message.limits[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.metricRules != null && message.metricRules.length) + for (var i = 0; i < message.metricRules.length; ++i) + $root.google.api.MetricRule.encode(message.metricRules[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Quota message, length delimited. Does not implicitly {@link google.api.Quota.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Quota + * @static + * @param {google.api.IQuota} message Quota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Quota.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Quota message from the specified reader or buffer. + * @function decode + * @memberof google.api.Quota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Quota} Quota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Quota.decode = function 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.Quota(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + if (!(message.limits && message.limits.length)) + message.limits = []; + message.limits.push($root.google.api.QuotaLimit.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.metricRules && message.metricRules.length)) + message.metricRules = []; + message.metricRules.push($root.google.api.MetricRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Quota message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Quota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Quota} Quota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Quota.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Quota message. + * @function verify + * @memberof google.api.Quota + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Quota.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.limits != null && message.hasOwnProperty("limits")) { + if (!Array.isArray(message.limits)) + return "limits: array expected"; + for (var i = 0; i < message.limits.length; ++i) { + var error = $root.google.api.QuotaLimit.verify(message.limits[i]); + if (error) + return "limits." + error; + } + } + if (message.metricRules != null && message.hasOwnProperty("metricRules")) { + if (!Array.isArray(message.metricRules)) + return "metricRules: array expected"; + for (var i = 0; i < message.metricRules.length; ++i) { + var error = $root.google.api.MetricRule.verify(message.metricRules[i]); + if (error) + return "metricRules." + error; + } + } + return null; + }; + + /** + * Creates a Quota message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Quota + * @static + * @param {Object.} object Plain object + * @returns {google.api.Quota} Quota + */ + Quota.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Quota) + return object; + var message = new $root.google.api.Quota(); + if (object.limits) { + if (!Array.isArray(object.limits)) + throw TypeError(".google.api.Quota.limits: array expected"); + message.limits = []; + for (var i = 0; i < object.limits.length; ++i) { + if (typeof object.limits[i] !== "object") + throw TypeError(".google.api.Quota.limits: object expected"); + message.limits[i] = $root.google.api.QuotaLimit.fromObject(object.limits[i]); + } + } + if (object.metricRules) { + if (!Array.isArray(object.metricRules)) + throw TypeError(".google.api.Quota.metricRules: array expected"); + message.metricRules = []; + for (var i = 0; i < object.metricRules.length; ++i) { + if (typeof object.metricRules[i] !== "object") + throw TypeError(".google.api.Quota.metricRules: object expected"); + message.metricRules[i] = $root.google.api.MetricRule.fromObject(object.metricRules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Quota message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Quota + * @static + * @param {google.api.Quota} message Quota + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Quota.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.limits = []; + object.metricRules = []; + } + if (message.limits && message.limits.length) { + object.limits = []; + for (var j = 0; j < message.limits.length; ++j) + object.limits[j] = $root.google.api.QuotaLimit.toObject(message.limits[j], options); + } + if (message.metricRules && message.metricRules.length) { + object.metricRules = []; + for (var j = 0; j < message.metricRules.length; ++j) + object.metricRules[j] = $root.google.api.MetricRule.toObject(message.metricRules[j], options); + } + return object; + }; + + /** + * Converts this Quota to JSON. + * @function toJSON + * @memberof google.api.Quota + * @instance + * @returns {Object.} JSON object + */ + Quota.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Quota; + })(); + + api.MetricRule = (function() { + + /** + * Properties of a MetricRule. + * @memberof google.api + * @interface IMetricRule + * @property {string|null} [selector] MetricRule selector + * @property {Object.|null} [metricCosts] MetricRule metricCosts + */ + + /** + * Constructs a new MetricRule. + * @memberof google.api + * @classdesc Represents a MetricRule. + * @implements IMetricRule + * @constructor + * @param {google.api.IMetricRule=} [properties] Properties to set + */ + function MetricRule(properties) { + this.metricCosts = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricRule selector. + * @member {string} selector + * @memberof google.api.MetricRule + * @instance + */ + MetricRule.prototype.selector = ""; + + /** + * MetricRule metricCosts. + * @member {Object.} metricCosts + * @memberof google.api.MetricRule + * @instance + */ + MetricRule.prototype.metricCosts = $util.emptyObject; + + /** + * Creates a new MetricRule instance using the specified properties. + * @function create + * @memberof google.api.MetricRule + * @static + * @param {google.api.IMetricRule=} [properties] Properties to set + * @returns {google.api.MetricRule} MetricRule instance + */ + MetricRule.create = function create(properties) { + return new MetricRule(properties); + }; + + /** + * Encodes the specified MetricRule message. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. + * @function encode + * @memberof google.api.MetricRule + * @static + * @param {google.api.IMetricRule} message MetricRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricRule.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.metricCosts != null && Object.hasOwnProperty.call(message, "metricCosts")) + for (var keys = Object.keys(message.metricCosts), 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 0 =*/16).int64(message.metricCosts[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetricRule message, length delimited. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MetricRule + * @static + * @param {google.api.IMetricRule} message MetricRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.MetricRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MetricRule} MetricRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricRule.decode = function 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.MetricRule(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + if (message.metricCosts === $util.emptyObject) + message.metricCosts = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.metricCosts[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MetricRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MetricRule} MetricRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricRule message. + * @function verify + * @memberof google.api.MetricRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricRule.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.metricCosts != null && message.hasOwnProperty("metricCosts")) { + if (!$util.isObject(message.metricCosts)) + return "metricCosts: object expected"; + var key = Object.keys(message.metricCosts); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.metricCosts[key[i]]) && !(message.metricCosts[key[i]] && $util.isInteger(message.metricCosts[key[i]].low) && $util.isInteger(message.metricCosts[key[i]].high))) + return "metricCosts: integer|Long{k:string} expected"; + } + return null; + }; + + /** + * Creates a MetricRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricRule} MetricRule + */ + MetricRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricRule) + return object; + var message = new $root.google.api.MetricRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.metricCosts) { + if (typeof object.metricCosts !== "object") + throw TypeError(".google.api.MetricRule.metricCosts: object expected"); + message.metricCosts = {}; + for (var keys = Object.keys(object.metricCosts), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.metricCosts[keys[i]] = $util.Long.fromValue(object.metricCosts[keys[i]])).unsigned = false; + else if (typeof object.metricCosts[keys[i]] === "string") + message.metricCosts[keys[i]] = parseInt(object.metricCosts[keys[i]], 10); + else if (typeof object.metricCosts[keys[i]] === "number") + message.metricCosts[keys[i]] = object.metricCosts[keys[i]]; + else if (typeof object.metricCosts[keys[i]] === "object") + message.metricCosts[keys[i]] = new $util.LongBits(object.metricCosts[keys[i]].low >>> 0, object.metricCosts[keys[i]].high >>> 0).toNumber(); + } + return message; + }; + + /** + * Creates a plain object from a MetricRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricRule + * @static + * @param {google.api.MetricRule} message MetricRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.metricCosts = {}; + if (options.defaults) + object.selector = ""; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + var keys2; + if (message.metricCosts && (keys2 = Object.keys(message.metricCosts)).length) { + object.metricCosts = {}; + for (var j = 0; j < keys2.length; ++j) + if (typeof message.metricCosts[keys2[j]] === "number") + object.metricCosts[keys2[j]] = options.longs === String ? String(message.metricCosts[keys2[j]]) : message.metricCosts[keys2[j]]; + else + object.metricCosts[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.metricCosts[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.metricCosts[keys2[j]].low >>> 0, message.metricCosts[keys2[j]].high >>> 0).toNumber() : message.metricCosts[keys2[j]]; + } + return object; + }; + + /** + * Converts this MetricRule to JSON. + * @function toJSON + * @memberof google.api.MetricRule + * @instance + * @returns {Object.} JSON object + */ + MetricRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MetricRule; + })(); + + api.QuotaLimit = (function() { + + /** + * Properties of a QuotaLimit. + * @memberof google.api + * @interface IQuotaLimit + * @property {string|null} [name] QuotaLimit name + * @property {string|null} [description] QuotaLimit description + * @property {number|Long|null} [defaultLimit] QuotaLimit defaultLimit + * @property {number|Long|null} [maxLimit] QuotaLimit maxLimit + * @property {number|Long|null} [freeTier] QuotaLimit freeTier + * @property {string|null} [duration] QuotaLimit duration + * @property {string|null} [metric] QuotaLimit metric + * @property {string|null} [unit] QuotaLimit unit + * @property {Object.|null} [values] QuotaLimit values + * @property {string|null} [displayName] QuotaLimit displayName + */ + + /** + * Constructs a new QuotaLimit. + * @memberof google.api + * @classdesc Represents a QuotaLimit. + * @implements IQuotaLimit + * @constructor + * @param {google.api.IQuotaLimit=} [properties] Properties to set + */ + function QuotaLimit(properties) { + this.values = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuotaLimit name. + * @member {string} name + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.name = ""; + + /** + * QuotaLimit description. + * @member {string} description + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.description = ""; + + /** + * QuotaLimit defaultLimit. + * @member {number|Long} defaultLimit + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.defaultLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QuotaLimit maxLimit. + * @member {number|Long} maxLimit + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.maxLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QuotaLimit freeTier. + * @member {number|Long} freeTier + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.freeTier = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QuotaLimit duration. + * @member {string} duration + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.duration = ""; + + /** + * QuotaLimit metric. + * @member {string} metric + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.metric = ""; + + /** + * QuotaLimit unit. + * @member {string} unit + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.unit = ""; + + /** + * QuotaLimit values. + * @member {Object.} values + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.values = $util.emptyObject; + + /** + * QuotaLimit displayName. + * @member {string} displayName + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.displayName = ""; + + /** + * Creates a new QuotaLimit instance using the specified properties. + * @function create + * @memberof google.api.QuotaLimit + * @static + * @param {google.api.IQuotaLimit=} [properties] Properties to set + * @returns {google.api.QuotaLimit} QuotaLimit instance + */ + QuotaLimit.create = function create(properties) { + return new QuotaLimit(properties); + }; + + /** + * Encodes the specified QuotaLimit message. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. + * @function encode + * @memberof google.api.QuotaLimit + * @static + * @param {google.api.IQuotaLimit} message QuotaLimit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaLimit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.defaultLimit != null && Object.hasOwnProperty.call(message, "defaultLimit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.defaultLimit); + if (message.maxLimit != null && Object.hasOwnProperty.call(message, "maxLimit")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.maxLimit); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.duration); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.freeTier != null && Object.hasOwnProperty.call(message, "freeTier")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.freeTier); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.metric); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.unit); + if (message.values != null && Object.hasOwnProperty.call(message, "values")) + for (var keys = Object.keys(message.values), 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 0 =*/16).int64(message.values[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified QuotaLimit message, length delimited. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.QuotaLimit + * @static + * @param {google.api.IQuotaLimit} message QuotaLimit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaLimit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuotaLimit message from the specified reader or buffer. + * @function decode + * @memberof google.api.QuotaLimit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.QuotaLimit} QuotaLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaLimit.decode = function 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.QuotaLimit(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.defaultLimit = reader.int64(); + break; + case 4: + message.maxLimit = reader.int64(); + break; + case 7: + message.freeTier = reader.int64(); + break; + case 5: + message.duration = reader.string(); + break; + case 8: + message.metric = reader.string(); + break; + case 9: + message.unit = reader.string(); + break; + case 10: + if (message.values === $util.emptyObject) + message.values = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.values[key] = value; + break; + case 12: + message.displayName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuotaLimit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.QuotaLimit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.QuotaLimit} QuotaLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaLimit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuotaLimit message. + * @function verify + * @memberof google.api.QuotaLimit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuotaLimit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.defaultLimit != null && message.hasOwnProperty("defaultLimit")) + if (!$util.isInteger(message.defaultLimit) && !(message.defaultLimit && $util.isInteger(message.defaultLimit.low) && $util.isInteger(message.defaultLimit.high))) + return "defaultLimit: integer|Long expected"; + if (message.maxLimit != null && message.hasOwnProperty("maxLimit")) + if (!$util.isInteger(message.maxLimit) && !(message.maxLimit && $util.isInteger(message.maxLimit.low) && $util.isInteger(message.maxLimit.high))) + return "maxLimit: integer|Long expected"; + if (message.freeTier != null && message.hasOwnProperty("freeTier")) + if (!$util.isInteger(message.freeTier) && !(message.freeTier && $util.isInteger(message.freeTier.low) && $util.isInteger(message.freeTier.high))) + return "freeTier: integer|Long expected"; + if (message.duration != null && message.hasOwnProperty("duration")) + if (!$util.isString(message.duration)) + return "duration: string expected"; + if (message.metric != null && message.hasOwnProperty("metric")) + if (!$util.isString(message.metric)) + return "metric: string expected"; + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!$util.isObject(message.values)) + return "values: object expected"; + var key = Object.keys(message.values); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.values[key[i]]) && !(message.values[key[i]] && $util.isInteger(message.values[key[i]].low) && $util.isInteger(message.values[key[i]].high))) + return "values: integer|Long{k:string} expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a QuotaLimit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.QuotaLimit + * @static + * @param {Object.} object Plain object + * @returns {google.api.QuotaLimit} QuotaLimit + */ + QuotaLimit.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.QuotaLimit) + return object; + var message = new $root.google.api.QuotaLimit(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.defaultLimit != null) + if ($util.Long) + (message.defaultLimit = $util.Long.fromValue(object.defaultLimit)).unsigned = false; + else if (typeof object.defaultLimit === "string") + message.defaultLimit = parseInt(object.defaultLimit, 10); + else if (typeof object.defaultLimit === "number") + message.defaultLimit = object.defaultLimit; + else if (typeof object.defaultLimit === "object") + message.defaultLimit = new $util.LongBits(object.defaultLimit.low >>> 0, object.defaultLimit.high >>> 0).toNumber(); + if (object.maxLimit != null) + if ($util.Long) + (message.maxLimit = $util.Long.fromValue(object.maxLimit)).unsigned = false; + else if (typeof object.maxLimit === "string") + message.maxLimit = parseInt(object.maxLimit, 10); + else if (typeof object.maxLimit === "number") + message.maxLimit = object.maxLimit; + else if (typeof object.maxLimit === "object") + message.maxLimit = new $util.LongBits(object.maxLimit.low >>> 0, object.maxLimit.high >>> 0).toNumber(); + if (object.freeTier != null) + if ($util.Long) + (message.freeTier = $util.Long.fromValue(object.freeTier)).unsigned = false; + else if (typeof object.freeTier === "string") + message.freeTier = parseInt(object.freeTier, 10); + else if (typeof object.freeTier === "number") + message.freeTier = object.freeTier; + else if (typeof object.freeTier === "object") + message.freeTier = new $util.LongBits(object.freeTier.low >>> 0, object.freeTier.high >>> 0).toNumber(); + if (object.duration != null) + message.duration = String(object.duration); + if (object.metric != null) + message.metric = String(object.metric); + if (object.unit != null) + message.unit = String(object.unit); + if (object.values) { + if (typeof object.values !== "object") + throw TypeError(".google.api.QuotaLimit.values: object expected"); + message.values = {}; + for (var keys = Object.keys(object.values), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.values[keys[i]] = $util.Long.fromValue(object.values[keys[i]])).unsigned = false; + else if (typeof object.values[keys[i]] === "string") + message.values[keys[i]] = parseInt(object.values[keys[i]], 10); + else if (typeof object.values[keys[i]] === "number") + message.values[keys[i]] = object.values[keys[i]]; + else if (typeof object.values[keys[i]] === "object") + message.values[keys[i]] = new $util.LongBits(object.values[keys[i]].low >>> 0, object.values[keys[i]].high >>> 0).toNumber(); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a QuotaLimit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.QuotaLimit + * @static + * @param {google.api.QuotaLimit} message QuotaLimit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuotaLimit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.values = {}; + if (options.defaults) { + object.description = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.defaultLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.defaultLimit = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxLimit = options.longs === String ? "0" : 0; + object.duration = ""; + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.freeTier = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.freeTier = options.longs === String ? "0" : 0; + object.metric = ""; + object.unit = ""; + object.displayName = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.defaultLimit != null && message.hasOwnProperty("defaultLimit")) + if (typeof message.defaultLimit === "number") + object.defaultLimit = options.longs === String ? String(message.defaultLimit) : message.defaultLimit; + else + object.defaultLimit = options.longs === String ? $util.Long.prototype.toString.call(message.defaultLimit) : options.longs === Number ? new $util.LongBits(message.defaultLimit.low >>> 0, message.defaultLimit.high >>> 0).toNumber() : message.defaultLimit; + if (message.maxLimit != null && message.hasOwnProperty("maxLimit")) + if (typeof message.maxLimit === "number") + object.maxLimit = options.longs === String ? String(message.maxLimit) : message.maxLimit; + else + object.maxLimit = options.longs === String ? $util.Long.prototype.toString.call(message.maxLimit) : options.longs === Number ? new $util.LongBits(message.maxLimit.low >>> 0, message.maxLimit.high >>> 0).toNumber() : message.maxLimit; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = message.duration; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.freeTier != null && message.hasOwnProperty("freeTier")) + if (typeof message.freeTier === "number") + object.freeTier = options.longs === String ? String(message.freeTier) : message.freeTier; + else + object.freeTier = options.longs === String ? $util.Long.prototype.toString.call(message.freeTier) : options.longs === Number ? new $util.LongBits(message.freeTier.low >>> 0, message.freeTier.high >>> 0).toNumber() : message.freeTier; + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = message.metric; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + var keys2; + if (message.values && (keys2 = Object.keys(message.values)).length) { + object.values = {}; + for (var j = 0; j < keys2.length; ++j) + if (typeof message.values[keys2[j]] === "number") + object.values[keys2[j]] = options.longs === String ? String(message.values[keys2[j]]) : message.values[keys2[j]]; + else + object.values[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.values[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.values[keys2[j]].low >>> 0, message.values[keys2[j]].high >>> 0).toNumber() : message.values[keys2[j]]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this QuotaLimit to JSON. + * @function toJSON + * @memberof google.api.QuotaLimit + * @instance + * @returns {Object.} JSON object + */ + QuotaLimit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuotaLimit; + })(); + + api.Service = (function() { + + /** + * Properties of a Service. + * @memberof google.api + * @interface IService + * @property {google.protobuf.IUInt32Value|null} [configVersion] Service configVersion + * @property {string|null} [name] Service name + * @property {string|null} [id] Service id + * @property {string|null} [title] Service title + * @property {string|null} [producerProjectId] Service producerProjectId + * @property {Array.|null} [apis] Service apis + * @property {Array.|null} [types] Service types + * @property {Array.|null} [enums] Service enums + * @property {google.api.IDocumentation|null} [documentation] Service documentation + * @property {google.api.IBackend|null} [backend] Service backend + * @property {google.api.IHttp|null} [http] Service http + * @property {google.api.IQuota|null} [quota] Service quota + * @property {google.api.IAuthentication|null} [authentication] Service authentication + * @property {google.api.IContext|null} [context] Service context + * @property {google.api.IUsage|null} [usage] Service usage + * @property {Array.|null} [endpoints] Service endpoints + * @property {google.api.IControl|null} [control] Service control + * @property {Array.|null} [logs] Service logs + * @property {Array.|null} [metrics] Service metrics + * @property {Array.|null} [monitoredResources] Service monitoredResources + * @property {google.api.IBilling|null} [billing] Service billing + * @property {google.api.ILogging|null} [logging] Service logging + * @property {google.api.IMonitoring|null} [monitoring] Service monitoring + * @property {google.api.ISystemParameters|null} [systemParameters] Service systemParameters + * @property {google.api.ISourceInfo|null} [sourceInfo] Service sourceInfo + */ + + /** + * Constructs a new Service. + * @memberof google.api + * @classdesc Represents a Service. + * @implements IService + * @constructor + * @param {google.api.IService=} [properties] Properties to set + */ + function Service(properties) { + this.apis = []; + this.types = []; + this.enums = []; + this.endpoints = []; + this.logs = []; + this.metrics = []; + this.monitoredResources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Service configVersion. + * @member {google.protobuf.IUInt32Value|null|undefined} configVersion + * @memberof google.api.Service + * @instance + */ + Service.prototype.configVersion = null; + + /** + * Service name. + * @member {string} name + * @memberof google.api.Service + * @instance + */ + Service.prototype.name = ""; + + /** + * Service id. + * @member {string} id + * @memberof google.api.Service + * @instance + */ + Service.prototype.id = ""; + + /** + * Service title. + * @member {string} title + * @memberof google.api.Service + * @instance + */ + Service.prototype.title = ""; + + /** + * Service producerProjectId. + * @member {string} producerProjectId + * @memberof google.api.Service + * @instance + */ + Service.prototype.producerProjectId = ""; + + /** + * Service apis. + * @member {Array.} apis + * @memberof google.api.Service + * @instance + */ + Service.prototype.apis = $util.emptyArray; + + /** + * Service types. + * @member {Array.} types + * @memberof google.api.Service + * @instance + */ + Service.prototype.types = $util.emptyArray; + + /** + * Service enums. + * @member {Array.} enums + * @memberof google.api.Service + * @instance + */ + Service.prototype.enums = $util.emptyArray; + + /** + * Service documentation. + * @member {google.api.IDocumentation|null|undefined} documentation + * @memberof google.api.Service + * @instance + */ + Service.prototype.documentation = null; + + /** + * Service backend. + * @member {google.api.IBackend|null|undefined} backend + * @memberof google.api.Service + * @instance + */ + Service.prototype.backend = null; + + /** + * Service http. + * @member {google.api.IHttp|null|undefined} http + * @memberof google.api.Service + * @instance + */ + Service.prototype.http = null; + + /** + * Service quota. + * @member {google.api.IQuota|null|undefined} quota + * @memberof google.api.Service + * @instance + */ + Service.prototype.quota = null; + + /** + * Service authentication. + * @member {google.api.IAuthentication|null|undefined} authentication + * @memberof google.api.Service + * @instance + */ + Service.prototype.authentication = null; + + /** + * Service context. + * @member {google.api.IContext|null|undefined} context + * @memberof google.api.Service + * @instance + */ + Service.prototype.context = null; + + /** + * Service usage. + * @member {google.api.IUsage|null|undefined} usage + * @memberof google.api.Service + * @instance + */ + Service.prototype.usage = null; + + /** + * Service endpoints. + * @member {Array.} endpoints + * @memberof google.api.Service + * @instance + */ + Service.prototype.endpoints = $util.emptyArray; + + /** + * Service control. + * @member {google.api.IControl|null|undefined} control + * @memberof google.api.Service + * @instance + */ + Service.prototype.control = null; + + /** + * Service logs. + * @member {Array.} logs + * @memberof google.api.Service + * @instance + */ + Service.prototype.logs = $util.emptyArray; + + /** + * Service metrics. + * @member {Array.} metrics + * @memberof google.api.Service + * @instance + */ + Service.prototype.metrics = $util.emptyArray; + + /** + * Service monitoredResources. + * @member {Array.} monitoredResources + * @memberof google.api.Service + * @instance + */ + Service.prototype.monitoredResources = $util.emptyArray; + + /** + * Service billing. + * @member {google.api.IBilling|null|undefined} billing + * @memberof google.api.Service + * @instance + */ + Service.prototype.billing = null; + + /** + * Service logging. + * @member {google.api.ILogging|null|undefined} logging + * @memberof google.api.Service + * @instance + */ + Service.prototype.logging = null; + + /** + * Service monitoring. + * @member {google.api.IMonitoring|null|undefined} monitoring + * @memberof google.api.Service + * @instance + */ + Service.prototype.monitoring = null; + + /** + * Service systemParameters. + * @member {google.api.ISystemParameters|null|undefined} systemParameters + * @memberof google.api.Service + * @instance + */ + Service.prototype.systemParameters = null; + + /** + * Service sourceInfo. + * @member {google.api.ISourceInfo|null|undefined} sourceInfo + * @memberof google.api.Service + * @instance + */ + Service.prototype.sourceInfo = null; + + /** + * Creates a new Service instance using the specified properties. + * @function create + * @memberof google.api.Service + * @static + * @param {google.api.IService=} [properties] Properties to set + * @returns {google.api.Service} Service instance + */ + Service.create = function create(properties) { + return new Service(properties); + }; + + /** + * Encodes the specified Service message. Does not implicitly {@link google.api.Service.verify|verify} messages. + * @function encode + * @memberof google.api.Service + * @static + * @param {google.api.IService} message Service message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Service.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.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.apis != null && message.apis.length) + for (var i = 0; i < message.apis.length; ++i) + $root.google.protobuf.Api.encode(message.apis[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.types != null && message.types.length) + for (var i = 0; i < message.types.length; ++i) + $root.google.protobuf.Type.encode(message.types[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enums != null && message.enums.length) + for (var i = 0; i < message.enums.length; ++i) + $root.google.protobuf.Enum.encode(message.enums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.documentation != null && Object.hasOwnProperty.call(message, "documentation")) + $root.google.api.Documentation.encode(message.documentation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.backend != null && Object.hasOwnProperty.call(message, "backend")) + $root.google.api.Backend.encode(message.backend, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.http != null && Object.hasOwnProperty.call(message, "http")) + $root.google.api.Http.encode(message.http, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.quota != null && Object.hasOwnProperty.call(message, "quota")) + $root.google.api.Quota.encode(message.quota, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.authentication != null && Object.hasOwnProperty.call(message, "authentication")) + $root.google.api.Authentication.encode(message.authentication, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + $root.google.api.Context.encode(message.context, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.usage != null && Object.hasOwnProperty.call(message, "usage")) + $root.google.api.Usage.encode(message.usage, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.endpoints != null && message.endpoints.length) + for (var i = 0; i < message.endpoints.length; ++i) + $root.google.api.Endpoint.encode(message.endpoints[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.configVersion != null && Object.hasOwnProperty.call(message, "configVersion")) + $root.google.protobuf.UInt32Value.encode(message.configVersion, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.control != null && Object.hasOwnProperty.call(message, "control")) + $root.google.api.Control.encode(message.control, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.producerProjectId != null && Object.hasOwnProperty.call(message, "producerProjectId")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.producerProjectId); + if (message.logs != null && message.logs.length) + for (var i = 0; i < message.logs.length; ++i) + $root.google.api.LogDescriptor.encode(message.logs[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.api.MetricDescriptor.encode(message.metrics[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.monitoredResources != null && message.monitoredResources.length) + for (var i = 0; i < message.monitoredResources.length; ++i) + $root.google.api.MonitoredResourceDescriptor.encode(message.monitoredResources[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.billing != null && Object.hasOwnProperty.call(message, "billing")) + $root.google.api.Billing.encode(message.billing, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.logging != null && Object.hasOwnProperty.call(message, "logging")) + $root.google.api.Logging.encode(message.logging, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.monitoring != null && Object.hasOwnProperty.call(message, "monitoring")) + $root.google.api.Monitoring.encode(message.monitoring, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.systemParameters != null && Object.hasOwnProperty.call(message, "systemParameters")) + $root.google.api.SystemParameters.encode(message.systemParameters, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 33, wireType 2 =*/266).string(message.id); + if (message.sourceInfo != null && Object.hasOwnProperty.call(message, "sourceInfo")) + $root.google.api.SourceInfo.encode(message.sourceInfo, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.api.Service.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Service + * @static + * @param {google.api.IService} message Service message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Service.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Service message from the specified reader or buffer. + * @function decode + * @memberof google.api.Service + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Service} Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Service.decode = function 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.Service(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 20: + message.configVersion = $root.google.protobuf.UInt32Value.decode(reader, reader.uint32()); + break; + case 1: + message.name = reader.string(); + break; + case 33: + message.id = reader.string(); + break; + case 2: + message.title = reader.string(); + break; + case 22: + message.producerProjectId = reader.string(); + break; + case 3: + if (!(message.apis && message.apis.length)) + message.apis = []; + message.apis.push($root.google.protobuf.Api.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.types && message.types.length)) + message.types = []; + message.types.push($root.google.protobuf.Type.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enums && message.enums.length)) + message.enums = []; + message.enums.push($root.google.protobuf.Enum.decode(reader, reader.uint32())); + break; + case 6: + message.documentation = $root.google.api.Documentation.decode(reader, reader.uint32()); + break; + case 8: + message.backend = $root.google.api.Backend.decode(reader, reader.uint32()); + break; + case 9: + message.http = $root.google.api.Http.decode(reader, reader.uint32()); + break; + case 10: + message.quota = $root.google.api.Quota.decode(reader, reader.uint32()); + break; + case 11: + message.authentication = $root.google.api.Authentication.decode(reader, reader.uint32()); + break; + case 12: + message.context = $root.google.api.Context.decode(reader, reader.uint32()); + break; + case 15: + message.usage = $root.google.api.Usage.decode(reader, reader.uint32()); + break; + case 18: + if (!(message.endpoints && message.endpoints.length)) + message.endpoints = []; + message.endpoints.push($root.google.api.Endpoint.decode(reader, reader.uint32())); + break; + case 21: + message.control = $root.google.api.Control.decode(reader, reader.uint32()); + break; + case 23: + if (!(message.logs && message.logs.length)) + message.logs = []; + message.logs.push($root.google.api.LogDescriptor.decode(reader, reader.uint32())); + break; + case 24: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); + break; + case 25: + if (!(message.monitoredResources && message.monitoredResources.length)) + message.monitoredResources = []; + message.monitoredResources.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); + break; + case 26: + message.billing = $root.google.api.Billing.decode(reader, reader.uint32()); + break; + case 27: + message.logging = $root.google.api.Logging.decode(reader, reader.uint32()); + break; + case 28: + message.monitoring = $root.google.api.Monitoring.decode(reader, reader.uint32()); + break; + case 29: + message.systemParameters = $root.google.api.SystemParameters.decode(reader, reader.uint32()); + break; + case 37: + message.sourceInfo = $root.google.api.SourceInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Service message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Service + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Service} Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Service.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Service message. + * @function verify + * @memberof google.api.Service + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Service.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.configVersion != null && message.hasOwnProperty("configVersion")) { + var error = $root.google.protobuf.UInt32Value.verify(message.configVersion); + if (error) + return "configVersion." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.producerProjectId != null && message.hasOwnProperty("producerProjectId")) + if (!$util.isString(message.producerProjectId)) + return "producerProjectId: string 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.protobuf.Api.verify(message.apis[i]); + if (error) + return "apis." + error; + } + } + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) { + var error = $root.google.protobuf.Type.verify(message.types[i]); + if (error) + return "types." + error; + } + } + if (message.enums != null && message.hasOwnProperty("enums")) { + if (!Array.isArray(message.enums)) + return "enums: array expected"; + for (var i = 0; i < message.enums.length; ++i) { + var error = $root.google.protobuf.Enum.verify(message.enums[i]); + if (error) + return "enums." + error; + } + } + if (message.documentation != null && message.hasOwnProperty("documentation")) { + var error = $root.google.api.Documentation.verify(message.documentation); + if (error) + return "documentation." + error; + } + if (message.backend != null && message.hasOwnProperty("backend")) { + var error = $root.google.api.Backend.verify(message.backend); + if (error) + return "backend." + error; + } + if (message.http != null && message.hasOwnProperty("http")) { + var error = $root.google.api.Http.verify(message.http); + if (error) + return "http." + error; + } + if (message.quota != null && message.hasOwnProperty("quota")) { + var error = $root.google.api.Quota.verify(message.quota); + if (error) + return "quota." + error; + } + if (message.authentication != null && message.hasOwnProperty("authentication")) { + var error = $root.google.api.Authentication.verify(message.authentication); + if (error) + return "authentication." + error; + } + if (message.context != null && message.hasOwnProperty("context")) { + var error = $root.google.api.Context.verify(message.context); + if (error) + return "context." + error; + } + if (message.usage != null && message.hasOwnProperty("usage")) { + var error = $root.google.api.Usage.verify(message.usage); + if (error) + return "usage." + error; + } + if (message.endpoints != null && message.hasOwnProperty("endpoints")) { + if (!Array.isArray(message.endpoints)) + return "endpoints: array expected"; + for (var i = 0; i < message.endpoints.length; ++i) { + var error = $root.google.api.Endpoint.verify(message.endpoints[i]); + if (error) + return "endpoints." + error; + } + } + if (message.control != null && message.hasOwnProperty("control")) { + var error = $root.google.api.Control.verify(message.control); + if (error) + return "control." + error; + } + if (message.logs != null && message.hasOwnProperty("logs")) { + if (!Array.isArray(message.logs)) + return "logs: array expected"; + for (var i = 0; i < message.logs.length; ++i) { + var error = $root.google.api.LogDescriptor.verify(message.logs[i]); + if (error) + return "logs." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.api.MetricDescriptor.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.monitoredResources != null && message.hasOwnProperty("monitoredResources")) { + if (!Array.isArray(message.monitoredResources)) + return "monitoredResources: array expected"; + for (var i = 0; i < message.monitoredResources.length; ++i) { + var error = $root.google.api.MonitoredResourceDescriptor.verify(message.monitoredResources[i]); + if (error) + return "monitoredResources." + error; + } + } + if (message.billing != null && message.hasOwnProperty("billing")) { + var error = $root.google.api.Billing.verify(message.billing); + if (error) + return "billing." + error; + } + if (message.logging != null && message.hasOwnProperty("logging")) { + var error = $root.google.api.Logging.verify(message.logging); + if (error) + return "logging." + error; + } + if (message.monitoring != null && message.hasOwnProperty("monitoring")) { + var error = $root.google.api.Monitoring.verify(message.monitoring); + if (error) + return "monitoring." + error; + } + if (message.systemParameters != null && message.hasOwnProperty("systemParameters")) { + var error = $root.google.api.SystemParameters.verify(message.systemParameters); + if (error) + return "systemParameters." + error; + } + if (message.sourceInfo != null && message.hasOwnProperty("sourceInfo")) { + var error = $root.google.api.SourceInfo.verify(message.sourceInfo); + if (error) + return "sourceInfo." + error; + } + return null; + }; + + /** + * Creates a Service message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Service + * @static + * @param {Object.} object Plain object + * @returns {google.api.Service} Service + */ + Service.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Service) + return object; + var message = new $root.google.api.Service(); + if (object.configVersion != null) { + if (typeof object.configVersion !== "object") + throw TypeError(".google.api.Service.configVersion: object expected"); + message.configVersion = $root.google.protobuf.UInt32Value.fromObject(object.configVersion); + } + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + if (object.title != null) + message.title = String(object.title); + if (object.producerProjectId != null) + message.producerProjectId = String(object.producerProjectId); + if (object.apis) { + if (!Array.isArray(object.apis)) + throw TypeError(".google.api.Service.apis: array expected"); + message.apis = []; + for (var i = 0; i < object.apis.length; ++i) { + if (typeof object.apis[i] !== "object") + throw TypeError(".google.api.Service.apis: object expected"); + message.apis[i] = $root.google.protobuf.Api.fromObject(object.apis[i]); + } + } + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.api.Service.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) { + if (typeof object.types[i] !== "object") + throw TypeError(".google.api.Service.types: object expected"); + message.types[i] = $root.google.protobuf.Type.fromObject(object.types[i]); + } + } + if (object.enums) { + if (!Array.isArray(object.enums)) + throw TypeError(".google.api.Service.enums: array expected"); + message.enums = []; + for (var i = 0; i < object.enums.length; ++i) { + if (typeof object.enums[i] !== "object") + throw TypeError(".google.api.Service.enums: object expected"); + message.enums[i] = $root.google.protobuf.Enum.fromObject(object.enums[i]); + } + } + if (object.documentation != null) { + if (typeof object.documentation !== "object") + throw TypeError(".google.api.Service.documentation: object expected"); + message.documentation = $root.google.api.Documentation.fromObject(object.documentation); + } + if (object.backend != null) { + if (typeof object.backend !== "object") + throw TypeError(".google.api.Service.backend: object expected"); + message.backend = $root.google.api.Backend.fromObject(object.backend); + } + if (object.http != null) { + if (typeof object.http !== "object") + throw TypeError(".google.api.Service.http: object expected"); + message.http = $root.google.api.Http.fromObject(object.http); + } + if (object.quota != null) { + if (typeof object.quota !== "object") + throw TypeError(".google.api.Service.quota: object expected"); + message.quota = $root.google.api.Quota.fromObject(object.quota); + } + if (object.authentication != null) { + if (typeof object.authentication !== "object") + throw TypeError(".google.api.Service.authentication: object expected"); + message.authentication = $root.google.api.Authentication.fromObject(object.authentication); + } + if (object.context != null) { + if (typeof object.context !== "object") + throw TypeError(".google.api.Service.context: object expected"); + message.context = $root.google.api.Context.fromObject(object.context); + } + if (object.usage != null) { + if (typeof object.usage !== "object") + throw TypeError(".google.api.Service.usage: object expected"); + message.usage = $root.google.api.Usage.fromObject(object.usage); + } + if (object.endpoints) { + if (!Array.isArray(object.endpoints)) + throw TypeError(".google.api.Service.endpoints: array expected"); + message.endpoints = []; + for (var i = 0; i < object.endpoints.length; ++i) { + if (typeof object.endpoints[i] !== "object") + throw TypeError(".google.api.Service.endpoints: object expected"); + message.endpoints[i] = $root.google.api.Endpoint.fromObject(object.endpoints[i]); + } + } + if (object.control != null) { + if (typeof object.control !== "object") + throw TypeError(".google.api.Service.control: object expected"); + message.control = $root.google.api.Control.fromObject(object.control); + } + if (object.logs) { + if (!Array.isArray(object.logs)) + throw TypeError(".google.api.Service.logs: array expected"); + message.logs = []; + for (var i = 0; i < object.logs.length; ++i) { + if (typeof object.logs[i] !== "object") + throw TypeError(".google.api.Service.logs: object expected"); + message.logs[i] = $root.google.api.LogDescriptor.fromObject(object.logs[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.api.Service.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.api.Service.metrics: object expected"); + message.metrics[i] = $root.google.api.MetricDescriptor.fromObject(object.metrics[i]); + } + } + if (object.monitoredResources) { + if (!Array.isArray(object.monitoredResources)) + throw TypeError(".google.api.Service.monitoredResources: array expected"); + message.monitoredResources = []; + for (var i = 0; i < object.monitoredResources.length; ++i) { + if (typeof object.monitoredResources[i] !== "object") + throw TypeError(".google.api.Service.monitoredResources: object expected"); + message.monitoredResources[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.monitoredResources[i]); + } + } + if (object.billing != null) { + if (typeof object.billing !== "object") + throw TypeError(".google.api.Service.billing: object expected"); + message.billing = $root.google.api.Billing.fromObject(object.billing); + } + if (object.logging != null) { + if (typeof object.logging !== "object") + throw TypeError(".google.api.Service.logging: object expected"); + message.logging = $root.google.api.Logging.fromObject(object.logging); + } + if (object.monitoring != null) { + if (typeof object.monitoring !== "object") + throw TypeError(".google.api.Service.monitoring: object expected"); + message.monitoring = $root.google.api.Monitoring.fromObject(object.monitoring); + } + if (object.systemParameters != null) { + if (typeof object.systemParameters !== "object") + throw TypeError(".google.api.Service.systemParameters: object expected"); + message.systemParameters = $root.google.api.SystemParameters.fromObject(object.systemParameters); + } + if (object.sourceInfo != null) { + if (typeof object.sourceInfo !== "object") + throw TypeError(".google.api.Service.sourceInfo: object expected"); + message.sourceInfo = $root.google.api.SourceInfo.fromObject(object.sourceInfo); + } + return message; + }; + + /** + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Service + * @static + * @param {google.api.Service} message Service + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Service.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.apis = []; + object.types = []; + object.enums = []; + object.endpoints = []; + object.logs = []; + object.metrics = []; + object.monitoredResources = []; + } + if (options.defaults) { + object.name = ""; + object.title = ""; + object.documentation = null; + object.backend = null; + object.http = null; + object.quota = null; + object.authentication = null; + object.context = null; + object.usage = null; + object.configVersion = null; + object.control = null; + object.producerProjectId = ""; + object.billing = null; + object.logging = null; + object.monitoring = null; + object.systemParameters = null; + object.id = ""; + object.sourceInfo = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.apis && message.apis.length) { + object.apis = []; + for (var j = 0; j < message.apis.length; ++j) + object.apis[j] = $root.google.protobuf.Api.toObject(message.apis[j], options); + } + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = $root.google.protobuf.Type.toObject(message.types[j], options); + } + if (message.enums && message.enums.length) { + object.enums = []; + for (var j = 0; j < message.enums.length; ++j) + object.enums[j] = $root.google.protobuf.Enum.toObject(message.enums[j], options); + } + if (message.documentation != null && message.hasOwnProperty("documentation")) + object.documentation = $root.google.api.Documentation.toObject(message.documentation, options); + if (message.backend != null && message.hasOwnProperty("backend")) + object.backend = $root.google.api.Backend.toObject(message.backend, options); + if (message.http != null && message.hasOwnProperty("http")) + object.http = $root.google.api.Http.toObject(message.http, options); + if (message.quota != null && message.hasOwnProperty("quota")) + object.quota = $root.google.api.Quota.toObject(message.quota, options); + if (message.authentication != null && message.hasOwnProperty("authentication")) + object.authentication = $root.google.api.Authentication.toObject(message.authentication, options); + if (message.context != null && message.hasOwnProperty("context")) + object.context = $root.google.api.Context.toObject(message.context, options); + if (message.usage != null && message.hasOwnProperty("usage")) + object.usage = $root.google.api.Usage.toObject(message.usage, options); + if (message.endpoints && message.endpoints.length) { + object.endpoints = []; + for (var j = 0; j < message.endpoints.length; ++j) + object.endpoints[j] = $root.google.api.Endpoint.toObject(message.endpoints[j], options); + } + if (message.configVersion != null && message.hasOwnProperty("configVersion")) + object.configVersion = $root.google.protobuf.UInt32Value.toObject(message.configVersion, options); + if (message.control != null && message.hasOwnProperty("control")) + object.control = $root.google.api.Control.toObject(message.control, options); + if (message.producerProjectId != null && message.hasOwnProperty("producerProjectId")) + object.producerProjectId = message.producerProjectId; + if (message.logs && message.logs.length) { + object.logs = []; + for (var j = 0; j < message.logs.length; ++j) + object.logs[j] = $root.google.api.LogDescriptor.toObject(message.logs[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.api.MetricDescriptor.toObject(message.metrics[j], options); + } + if (message.monitoredResources && message.monitoredResources.length) { + object.monitoredResources = []; + for (var j = 0; j < message.monitoredResources.length; ++j) + object.monitoredResources[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.monitoredResources[j], options); + } + if (message.billing != null && message.hasOwnProperty("billing")) + object.billing = $root.google.api.Billing.toObject(message.billing, options); + if (message.logging != null && message.hasOwnProperty("logging")) + object.logging = $root.google.api.Logging.toObject(message.logging, options); + if (message.monitoring != null && message.hasOwnProperty("monitoring")) + object.monitoring = $root.google.api.Monitoring.toObject(message.monitoring, options); + if (message.systemParameters != null && message.hasOwnProperty("systemParameters")) + object.systemParameters = $root.google.api.SystemParameters.toObject(message.systemParameters, options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.sourceInfo != null && message.hasOwnProperty("sourceInfo")) + object.sourceInfo = $root.google.api.SourceInfo.toObject(message.sourceInfo, options); + return object; + }; + + /** + * Converts this Service to JSON. + * @function toJSON + * @memberof google.api.Service + * @instance + * @returns {Object.} JSON object + */ + Service.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Service; + })(); + + api.Authentication = (function() { + + /** + * Properties of an Authentication. + * @memberof google.api + * @interface IAuthentication + * @property {Array.|null} [rules] Authentication rules + * @property {Array.|null} [providers] Authentication providers + */ + + /** + * Constructs a new Authentication. + * @memberof google.api + * @classdesc Represents an Authentication. + * @implements IAuthentication + * @constructor + * @param {google.api.IAuthentication=} [properties] Properties to set + */ + function Authentication(properties) { + this.rules = []; + this.providers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Authentication rules. + * @member {Array.} rules + * @memberof google.api.Authentication + * @instance + */ + Authentication.prototype.rules = $util.emptyArray; + + /** + * Authentication providers. + * @member {Array.} providers + * @memberof google.api.Authentication + * @instance + */ + Authentication.prototype.providers = $util.emptyArray; + + /** + * Creates a new Authentication instance using the specified properties. + * @function create + * @memberof google.api.Authentication + * @static + * @param {google.api.IAuthentication=} [properties] Properties to set + * @returns {google.api.Authentication} Authentication instance + */ + Authentication.create = function create(properties) { + return new Authentication(properties); + }; + + /** + * Encodes the specified Authentication message. Does not implicitly {@link google.api.Authentication.verify|verify} messages. + * @function encode + * @memberof google.api.Authentication + * @static + * @param {google.api.IAuthentication} message Authentication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Authentication.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.AuthenticationRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.providers != null && message.providers.length) + for (var i = 0; i < message.providers.length; ++i) + $root.google.api.AuthProvider.encode(message.providers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Authentication message, length delimited. Does not implicitly {@link google.api.Authentication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Authentication + * @static + * @param {google.api.IAuthentication} message Authentication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Authentication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Authentication message from the specified reader or buffer. + * @function decode + * @memberof google.api.Authentication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Authentication} Authentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Authentication.decode = function 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.Authentication(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.AuthenticationRule.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.providers && message.providers.length)) + message.providers = []; + message.providers.push($root.google.api.AuthProvider.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Authentication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Authentication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Authentication} Authentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Authentication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Authentication message. + * @function verify + * @memberof google.api.Authentication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Authentication.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.AuthenticationRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.providers != null && message.hasOwnProperty("providers")) { + if (!Array.isArray(message.providers)) + return "providers: array expected"; + for (var i = 0; i < message.providers.length; ++i) { + var error = $root.google.api.AuthProvider.verify(message.providers[i]); + if (error) + return "providers." + error; + } + } + return null; + }; + + /** + * Creates an Authentication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Authentication + * @static + * @param {Object.} object Plain object + * @returns {google.api.Authentication} Authentication + */ + Authentication.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Authentication) + return object; + var message = new $root.google.api.Authentication(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Authentication.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Authentication.rules: object expected"); + message.rules[i] = $root.google.api.AuthenticationRule.fromObject(object.rules[i]); + } + } + if (object.providers) { + if (!Array.isArray(object.providers)) + throw TypeError(".google.api.Authentication.providers: array expected"); + message.providers = []; + for (var i = 0; i < object.providers.length; ++i) { + if (typeof object.providers[i] !== "object") + throw TypeError(".google.api.Authentication.providers: object expected"); + message.providers[i] = $root.google.api.AuthProvider.fromObject(object.providers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Authentication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Authentication + * @static + * @param {google.api.Authentication} message Authentication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Authentication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.rules = []; + object.providers = []; + } + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.AuthenticationRule.toObject(message.rules[j], options); + } + if (message.providers && message.providers.length) { + object.providers = []; + for (var j = 0; j < message.providers.length; ++j) + object.providers[j] = $root.google.api.AuthProvider.toObject(message.providers[j], options); + } + return object; + }; + + /** + * Converts this Authentication to JSON. + * @function toJSON + * @memberof google.api.Authentication + * @instance + * @returns {Object.} JSON object + */ + Authentication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Authentication; + })(); + + api.AuthenticationRule = (function() { + + /** + * Properties of an AuthenticationRule. + * @memberof google.api + * @interface IAuthenticationRule + * @property {string|null} [selector] AuthenticationRule selector + * @property {google.api.IOAuthRequirements|null} [oauth] AuthenticationRule oauth + * @property {boolean|null} [allowWithoutCredential] AuthenticationRule allowWithoutCredential + * @property {Array.|null} [requirements] AuthenticationRule requirements + */ + + /** + * Constructs a new AuthenticationRule. + * @memberof google.api + * @classdesc Represents an AuthenticationRule. + * @implements IAuthenticationRule + * @constructor + * @param {google.api.IAuthenticationRule=} [properties] Properties to set + */ + function AuthenticationRule(properties) { + this.requirements = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthenticationRule selector. + * @member {string} selector + * @memberof google.api.AuthenticationRule + * @instance + */ + AuthenticationRule.prototype.selector = ""; + + /** + * AuthenticationRule oauth. + * @member {google.api.IOAuthRequirements|null|undefined} oauth + * @memberof google.api.AuthenticationRule + * @instance + */ + AuthenticationRule.prototype.oauth = null; + + /** + * AuthenticationRule allowWithoutCredential. + * @member {boolean} allowWithoutCredential + * @memberof google.api.AuthenticationRule + * @instance + */ + AuthenticationRule.prototype.allowWithoutCredential = false; + + /** + * AuthenticationRule requirements. + * @member {Array.} requirements + * @memberof google.api.AuthenticationRule + * @instance + */ + AuthenticationRule.prototype.requirements = $util.emptyArray; + + /** + * Creates a new AuthenticationRule instance using the specified properties. + * @function create + * @memberof google.api.AuthenticationRule + * @static + * @param {google.api.IAuthenticationRule=} [properties] Properties to set + * @returns {google.api.AuthenticationRule} AuthenticationRule instance + */ + AuthenticationRule.create = function create(properties) { + return new AuthenticationRule(properties); + }; + + /** + * Encodes the specified AuthenticationRule message. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. + * @function encode + * @memberof google.api.AuthenticationRule + * @static + * @param {google.api.IAuthenticationRule} message AuthenticationRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthenticationRule.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.oauth != null && Object.hasOwnProperty.call(message, "oauth")) + $root.google.api.OAuthRequirements.encode(message.oauth, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowWithoutCredential != null && Object.hasOwnProperty.call(message, "allowWithoutCredential")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowWithoutCredential); + if (message.requirements != null && message.requirements.length) + for (var i = 0; i < message.requirements.length; ++i) + $root.google.api.AuthRequirement.encode(message.requirements[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuthenticationRule message, length delimited. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.AuthenticationRule + * @static + * @param {google.api.IAuthenticationRule} message AuthenticationRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthenticationRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthenticationRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.AuthenticationRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.AuthenticationRule} AuthenticationRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthenticationRule.decode = function 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.AuthenticationRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.oauth = $root.google.api.OAuthRequirements.decode(reader, reader.uint32()); + break; + case 5: + message.allowWithoutCredential = reader.bool(); + break; + case 7: + if (!(message.requirements && message.requirements.length)) + message.requirements = []; + message.requirements.push($root.google.api.AuthRequirement.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthenticationRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.AuthenticationRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.AuthenticationRule} AuthenticationRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthenticationRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthenticationRule message. + * @function verify + * @memberof google.api.AuthenticationRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthenticationRule.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.oauth != null && message.hasOwnProperty("oauth")) { + var error = $root.google.api.OAuthRequirements.verify(message.oauth); + if (error) + return "oauth." + error; + } + if (message.allowWithoutCredential != null && message.hasOwnProperty("allowWithoutCredential")) + if (typeof message.allowWithoutCredential !== "boolean") + return "allowWithoutCredential: boolean expected"; + if (message.requirements != null && message.hasOwnProperty("requirements")) { + if (!Array.isArray(message.requirements)) + return "requirements: array expected"; + for (var i = 0; i < message.requirements.length; ++i) { + var error = $root.google.api.AuthRequirement.verify(message.requirements[i]); + if (error) + return "requirements." + error; + } + } + return null; + }; + + /** + * Creates an AuthenticationRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.AuthenticationRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.AuthenticationRule} AuthenticationRule + */ + AuthenticationRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.AuthenticationRule) + return object; + var message = new $root.google.api.AuthenticationRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.oauth != null) { + if (typeof object.oauth !== "object") + throw TypeError(".google.api.AuthenticationRule.oauth: object expected"); + message.oauth = $root.google.api.OAuthRequirements.fromObject(object.oauth); + } + if (object.allowWithoutCredential != null) + message.allowWithoutCredential = Boolean(object.allowWithoutCredential); + if (object.requirements) { + if (!Array.isArray(object.requirements)) + throw TypeError(".google.api.AuthenticationRule.requirements: array expected"); + message.requirements = []; + for (var i = 0; i < object.requirements.length; ++i) { + if (typeof object.requirements[i] !== "object") + throw TypeError(".google.api.AuthenticationRule.requirements: object expected"); + message.requirements[i] = $root.google.api.AuthRequirement.fromObject(object.requirements[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuthenticationRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.AuthenticationRule + * @static + * @param {google.api.AuthenticationRule} message AuthenticationRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthenticationRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requirements = []; + if (options.defaults) { + object.selector = ""; + object.oauth = null; + object.allowWithoutCredential = false; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.oauth != null && message.hasOwnProperty("oauth")) + object.oauth = $root.google.api.OAuthRequirements.toObject(message.oauth, options); + if (message.allowWithoutCredential != null && message.hasOwnProperty("allowWithoutCredential")) + object.allowWithoutCredential = message.allowWithoutCredential; + if (message.requirements && message.requirements.length) { + object.requirements = []; + for (var j = 0; j < message.requirements.length; ++j) + object.requirements[j] = $root.google.api.AuthRequirement.toObject(message.requirements[j], options); + } + return object; + }; + + /** + * Converts this AuthenticationRule to JSON. + * @function toJSON + * @memberof google.api.AuthenticationRule + * @instance + * @returns {Object.} JSON object + */ + AuthenticationRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AuthenticationRule; + })(); + + api.JwtLocation = (function() { + + /** + * Properties of a JwtLocation. + * @memberof google.api + * @interface IJwtLocation + * @property {string|null} [header] JwtLocation header + * @property {string|null} [query] JwtLocation query + * @property {string|null} [valuePrefix] JwtLocation valuePrefix + */ + + /** + * Constructs a new JwtLocation. + * @memberof google.api + * @classdesc Represents a JwtLocation. + * @implements IJwtLocation + * @constructor + * @param {google.api.IJwtLocation=} [properties] Properties to set + */ + function JwtLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JwtLocation header. + * @member {string} header + * @memberof google.api.JwtLocation + * @instance + */ + JwtLocation.prototype.header = ""; + + /** + * JwtLocation query. + * @member {string} query + * @memberof google.api.JwtLocation + * @instance + */ + JwtLocation.prototype.query = ""; + + /** + * JwtLocation valuePrefix. + * @member {string} valuePrefix + * @memberof google.api.JwtLocation + * @instance + */ + JwtLocation.prototype.valuePrefix = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * JwtLocation in. + * @member {"header"|"query"|undefined} in_ + * @memberof google.api.JwtLocation + * @instance + */ + Object.defineProperty(JwtLocation.prototype, "in", { + get: $util.oneOfGetter($oneOfFields = ["header", "query"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new JwtLocation instance using the specified properties. + * @function create + * @memberof google.api.JwtLocation + * @static + * @param {google.api.IJwtLocation=} [properties] Properties to set + * @returns {google.api.JwtLocation} JwtLocation instance + */ + JwtLocation.create = function create(properties) { + return new JwtLocation(properties); + }; + + /** + * Encodes the specified JwtLocation message. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. + * @function encode + * @memberof google.api.JwtLocation + * @static + * @param {google.api.IJwtLocation} message JwtLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JwtLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.header); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.valuePrefix != null && Object.hasOwnProperty.call(message, "valuePrefix")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.valuePrefix); + return writer; + }; + + /** + * Encodes the specified JwtLocation message, length delimited. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JwtLocation + * @static + * @param {google.api.IJwtLocation} message JwtLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JwtLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JwtLocation message from the specified reader or buffer. + * @function decode + * @memberof google.api.JwtLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JwtLocation} JwtLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JwtLocation.decode = function 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.JwtLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = reader.string(); + break; + case 2: + message.query = reader.string(); + break; + case 3: + message.valuePrefix = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JwtLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JwtLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JwtLocation} JwtLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JwtLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JwtLocation message. + * @function verify + * @memberof google.api.JwtLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JwtLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.header != null && message.hasOwnProperty("header")) { + properties["in"] = 1; + if (!$util.isString(message.header)) + return "header: string expected"; + } + if (message.query != null && message.hasOwnProperty("query")) { + if (properties["in"] === 1) + return "in: multiple values"; + properties["in"] = 1; + if (!$util.isString(message.query)) + return "query: string expected"; + } + if (message.valuePrefix != null && message.hasOwnProperty("valuePrefix")) + if (!$util.isString(message.valuePrefix)) + return "valuePrefix: string expected"; + return null; + }; + + /** + * Creates a JwtLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JwtLocation + * @static + * @param {Object.} object Plain object + * @returns {google.api.JwtLocation} JwtLocation + */ + JwtLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JwtLocation) + return object; + var message = new $root.google.api.JwtLocation(); + if (object.header != null) + message.header = String(object.header); + if (object.query != null) + message.query = String(object.query); + if (object.valuePrefix != null) + message.valuePrefix = String(object.valuePrefix); + return message; + }; + + /** + * Creates a plain object from a JwtLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JwtLocation + * @static + * @param {google.api.JwtLocation} message JwtLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JwtLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.valuePrefix = ""; + if (message.header != null && message.hasOwnProperty("header")) { + object.header = message.header; + if (options.oneofs) + object["in"] = "header"; + } + if (message.query != null && message.hasOwnProperty("query")) { + object.query = message.query; + if (options.oneofs) + object["in"] = "query"; + } + if (message.valuePrefix != null && message.hasOwnProperty("valuePrefix")) + object.valuePrefix = message.valuePrefix; + return object; + }; + + /** + * Converts this JwtLocation to JSON. + * @function toJSON + * @memberof google.api.JwtLocation + * @instance + * @returns {Object.} JSON object + */ + JwtLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JwtLocation; + })(); + + api.AuthProvider = (function() { + + /** + * Properties of an AuthProvider. + * @memberof google.api + * @interface IAuthProvider + * @property {string|null} [id] AuthProvider id + * @property {string|null} [issuer] AuthProvider issuer + * @property {string|null} [jwksUri] AuthProvider jwksUri + * @property {string|null} [audiences] AuthProvider audiences + * @property {string|null} [authorizationUrl] AuthProvider authorizationUrl + * @property {Array.|null} [jwtLocations] AuthProvider jwtLocations + */ + + /** + * Constructs a new AuthProvider. + * @memberof google.api + * @classdesc Represents an AuthProvider. + * @implements IAuthProvider + * @constructor + * @param {google.api.IAuthProvider=} [properties] Properties to set + */ + function AuthProvider(properties) { + this.jwtLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthProvider id. + * @member {string} id + * @memberof google.api.AuthProvider + * @instance + */ + AuthProvider.prototype.id = ""; + + /** + * AuthProvider issuer. + * @member {string} issuer + * @memberof google.api.AuthProvider + * @instance + */ + AuthProvider.prototype.issuer = ""; + + /** + * AuthProvider jwksUri. + * @member {string} jwksUri + * @memberof google.api.AuthProvider + * @instance + */ + AuthProvider.prototype.jwksUri = ""; + + /** + * AuthProvider audiences. + * @member {string} audiences + * @memberof google.api.AuthProvider + * @instance + */ + AuthProvider.prototype.audiences = ""; + + /** + * AuthProvider authorizationUrl. + * @member {string} authorizationUrl + * @memberof google.api.AuthProvider + * @instance + */ + AuthProvider.prototype.authorizationUrl = ""; + + /** + * AuthProvider jwtLocations. + * @member {Array.} jwtLocations + * @memberof google.api.AuthProvider + * @instance + */ + AuthProvider.prototype.jwtLocations = $util.emptyArray; + + /** + * Creates a new AuthProvider instance using the specified properties. + * @function create + * @memberof google.api.AuthProvider + * @static + * @param {google.api.IAuthProvider=} [properties] Properties to set + * @returns {google.api.AuthProvider} AuthProvider instance + */ + AuthProvider.create = function create(properties) { + return new AuthProvider(properties); + }; + + /** + * Encodes the specified AuthProvider message. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. + * @function encode + * @memberof google.api.AuthProvider + * @static + * @param {google.api.IAuthProvider} message AuthProvider message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthProvider.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.issuer); + if (message.jwksUri != null && Object.hasOwnProperty.call(message, "jwksUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jwksUri); + if (message.audiences != null && Object.hasOwnProperty.call(message, "audiences")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.audiences); + if (message.authorizationUrl != null && Object.hasOwnProperty.call(message, "authorizationUrl")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.authorizationUrl); + if (message.jwtLocations != null && message.jwtLocations.length) + for (var i = 0; i < message.jwtLocations.length; ++i) + $root.google.api.JwtLocation.encode(message.jwtLocations[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuthProvider message, length delimited. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.AuthProvider + * @static + * @param {google.api.IAuthProvider} message AuthProvider message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthProvider.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthProvider message from the specified reader or buffer. + * @function decode + * @memberof google.api.AuthProvider + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.AuthProvider} AuthProvider + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthProvider.decode = function 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.AuthProvider(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.issuer = reader.string(); + break; + case 3: + message.jwksUri = reader.string(); + break; + case 4: + message.audiences = reader.string(); + break; + case 5: + message.authorizationUrl = reader.string(); + break; + case 6: + if (!(message.jwtLocations && message.jwtLocations.length)) + message.jwtLocations = []; + message.jwtLocations.push($root.google.api.JwtLocation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthProvider message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.AuthProvider + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.AuthProvider} AuthProvider + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthProvider.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthProvider message. + * @function verify + * @memberof google.api.AuthProvider + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthProvider.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.issuer != null && message.hasOwnProperty("issuer")) + if (!$util.isString(message.issuer)) + return "issuer: string expected"; + if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) + if (!$util.isString(message.jwksUri)) + return "jwksUri: string expected"; + if (message.audiences != null && message.hasOwnProperty("audiences")) + if (!$util.isString(message.audiences)) + return "audiences: string expected"; + if (message.authorizationUrl != null && message.hasOwnProperty("authorizationUrl")) + if (!$util.isString(message.authorizationUrl)) + return "authorizationUrl: string expected"; + if (message.jwtLocations != null && message.hasOwnProperty("jwtLocations")) { + if (!Array.isArray(message.jwtLocations)) + return "jwtLocations: array expected"; + for (var i = 0; i < message.jwtLocations.length; ++i) { + var error = $root.google.api.JwtLocation.verify(message.jwtLocations[i]); + if (error) + return "jwtLocations." + error; + } + } + return null; + }; + + /** + * Creates an AuthProvider message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.AuthProvider + * @static + * @param {Object.} object Plain object + * @returns {google.api.AuthProvider} AuthProvider + */ + AuthProvider.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.AuthProvider) + return object; + var message = new $root.google.api.AuthProvider(); + if (object.id != null) + message.id = String(object.id); + if (object.issuer != null) + message.issuer = String(object.issuer); + if (object.jwksUri != null) + message.jwksUri = String(object.jwksUri); + if (object.audiences != null) + message.audiences = String(object.audiences); + if (object.authorizationUrl != null) + message.authorizationUrl = String(object.authorizationUrl); + if (object.jwtLocations) { + if (!Array.isArray(object.jwtLocations)) + throw TypeError(".google.api.AuthProvider.jwtLocations: array expected"); + message.jwtLocations = []; + for (var i = 0; i < object.jwtLocations.length; ++i) { + if (typeof object.jwtLocations[i] !== "object") + throw TypeError(".google.api.AuthProvider.jwtLocations: object expected"); + message.jwtLocations[i] = $root.google.api.JwtLocation.fromObject(object.jwtLocations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuthProvider message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.AuthProvider + * @static + * @param {google.api.AuthProvider} message AuthProvider + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthProvider.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.jwtLocations = []; + if (options.defaults) { + object.id = ""; + object.issuer = ""; + object.jwksUri = ""; + object.audiences = ""; + object.authorizationUrl = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.issuer != null && message.hasOwnProperty("issuer")) + object.issuer = message.issuer; + if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) + object.jwksUri = message.jwksUri; + if (message.audiences != null && message.hasOwnProperty("audiences")) + object.audiences = message.audiences; + if (message.authorizationUrl != null && message.hasOwnProperty("authorizationUrl")) + object.authorizationUrl = message.authorizationUrl; + if (message.jwtLocations && message.jwtLocations.length) { + object.jwtLocations = []; + for (var j = 0; j < message.jwtLocations.length; ++j) + object.jwtLocations[j] = $root.google.api.JwtLocation.toObject(message.jwtLocations[j], options); + } + return object; + }; + + /** + * Converts this AuthProvider to JSON. + * @function toJSON + * @memberof google.api.AuthProvider + * @instance + * @returns {Object.} JSON object + */ + AuthProvider.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AuthProvider; + })(); + + api.OAuthRequirements = (function() { + + /** + * Properties of a OAuthRequirements. + * @memberof google.api + * @interface IOAuthRequirements + * @property {string|null} [canonicalScopes] OAuthRequirements canonicalScopes + */ + + /** + * Constructs a new OAuthRequirements. + * @memberof google.api + * @classdesc Represents a OAuthRequirements. + * @implements IOAuthRequirements + * @constructor + * @param {google.api.IOAuthRequirements=} [properties] Properties to set + */ + function OAuthRequirements(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OAuthRequirements canonicalScopes. + * @member {string} canonicalScopes + * @memberof google.api.OAuthRequirements + * @instance + */ + OAuthRequirements.prototype.canonicalScopes = ""; + + /** + * Creates a new OAuthRequirements instance using the specified properties. + * @function create + * @memberof google.api.OAuthRequirements + * @static + * @param {google.api.IOAuthRequirements=} [properties] Properties to set + * @returns {google.api.OAuthRequirements} OAuthRequirements instance + */ + OAuthRequirements.create = function create(properties) { + return new OAuthRequirements(properties); + }; + + /** + * Encodes the specified OAuthRequirements message. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. + * @function encode + * @memberof google.api.OAuthRequirements + * @static + * @param {google.api.IOAuthRequirements} message OAuthRequirements message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthRequirements.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.canonicalScopes != null && Object.hasOwnProperty.call(message, "canonicalScopes")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.canonicalScopes); + return writer; + }; + + /** + * Encodes the specified OAuthRequirements message, length delimited. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.OAuthRequirements + * @static + * @param {google.api.IOAuthRequirements} message OAuthRequirements message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthRequirements.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OAuthRequirements message from the specified reader or buffer. + * @function decode + * @memberof google.api.OAuthRequirements + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.OAuthRequirements} OAuthRequirements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthRequirements.decode = function 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.OAuthRequirements(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.canonicalScopes = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OAuthRequirements message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.OAuthRequirements + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.OAuthRequirements} OAuthRequirements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthRequirements.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OAuthRequirements message. + * @function verify + * @memberof google.api.OAuthRequirements + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OAuthRequirements.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.canonicalScopes != null && message.hasOwnProperty("canonicalScopes")) + if (!$util.isString(message.canonicalScopes)) + return "canonicalScopes: string expected"; + return null; + }; + + /** + * Creates a OAuthRequirements message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.OAuthRequirements + * @static + * @param {Object.} object Plain object + * @returns {google.api.OAuthRequirements} OAuthRequirements + */ + OAuthRequirements.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.OAuthRequirements) + return object; + var message = new $root.google.api.OAuthRequirements(); + if (object.canonicalScopes != null) + message.canonicalScopes = String(object.canonicalScopes); + return message; + }; + + /** + * Creates a plain object from a OAuthRequirements message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.OAuthRequirements + * @static + * @param {google.api.OAuthRequirements} message OAuthRequirements + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OAuthRequirements.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.canonicalScopes = ""; + if (message.canonicalScopes != null && message.hasOwnProperty("canonicalScopes")) + object.canonicalScopes = message.canonicalScopes; + return object; + }; + + /** + * Converts this OAuthRequirements to JSON. + * @function toJSON + * @memberof google.api.OAuthRequirements + * @instance + * @returns {Object.} JSON object + */ + OAuthRequirements.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OAuthRequirements; + })(); + + api.AuthRequirement = (function() { + + /** + * Properties of an AuthRequirement. + * @memberof google.api + * @interface IAuthRequirement + * @property {string|null} [providerId] AuthRequirement providerId + * @property {string|null} [audiences] AuthRequirement audiences + */ + + /** + * Constructs a new AuthRequirement. + * @memberof google.api + * @classdesc Represents an AuthRequirement. + * @implements IAuthRequirement + * @constructor + * @param {google.api.IAuthRequirement=} [properties] Properties to set + */ + function AuthRequirement(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthRequirement providerId. + * @member {string} providerId + * @memberof google.api.AuthRequirement + * @instance + */ + AuthRequirement.prototype.providerId = ""; + + /** + * AuthRequirement audiences. + * @member {string} audiences + * @memberof google.api.AuthRequirement + * @instance + */ + AuthRequirement.prototype.audiences = ""; + + /** + * Creates a new AuthRequirement instance using the specified properties. + * @function create + * @memberof google.api.AuthRequirement + * @static + * @param {google.api.IAuthRequirement=} [properties] Properties to set + * @returns {google.api.AuthRequirement} AuthRequirement instance + */ + AuthRequirement.create = function create(properties) { + return new AuthRequirement(properties); + }; + + /** + * Encodes the specified AuthRequirement message. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. + * @function encode + * @memberof google.api.AuthRequirement + * @static + * @param {google.api.IAuthRequirement} message AuthRequirement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthRequirement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.providerId != null && Object.hasOwnProperty.call(message, "providerId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.providerId); + if (message.audiences != null && Object.hasOwnProperty.call(message, "audiences")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audiences); + return writer; + }; + + /** + * Encodes the specified AuthRequirement message, length delimited. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.AuthRequirement + * @static + * @param {google.api.IAuthRequirement} message AuthRequirement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthRequirement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthRequirement message from the specified reader or buffer. + * @function decode + * @memberof google.api.AuthRequirement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.AuthRequirement} AuthRequirement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthRequirement.decode = function 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.AuthRequirement(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.providerId = reader.string(); + break; + case 2: + message.audiences = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthRequirement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.AuthRequirement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.AuthRequirement} AuthRequirement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthRequirement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthRequirement message. + * @function verify + * @memberof google.api.AuthRequirement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthRequirement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.providerId != null && message.hasOwnProperty("providerId")) + if (!$util.isString(message.providerId)) + return "providerId: string expected"; + if (message.audiences != null && message.hasOwnProperty("audiences")) + if (!$util.isString(message.audiences)) + return "audiences: string expected"; + return null; + }; + + /** + * Creates an AuthRequirement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.AuthRequirement + * @static + * @param {Object.} object Plain object + * @returns {google.api.AuthRequirement} AuthRequirement + */ + AuthRequirement.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.AuthRequirement) + return object; + var message = new $root.google.api.AuthRequirement(); + if (object.providerId != null) + message.providerId = String(object.providerId); + if (object.audiences != null) + message.audiences = String(object.audiences); + return message; + }; + + /** + * Creates a plain object from an AuthRequirement message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.AuthRequirement + * @static + * @param {google.api.AuthRequirement} message AuthRequirement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthRequirement.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.providerId = ""; + object.audiences = ""; + } + if (message.providerId != null && message.hasOwnProperty("providerId")) + object.providerId = message.providerId; + if (message.audiences != null && message.hasOwnProperty("audiences")) + object.audiences = message.audiences; + return object; + }; + + /** + * Converts this AuthRequirement to JSON. + * @function toJSON + * @memberof google.api.AuthRequirement + * @instance + * @returns {Object.} JSON object + */ + AuthRequirement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AuthRequirement; + })(); + + api.Backend = (function() { + + /** + * Properties of a Backend. + * @memberof google.api + * @interface IBackend + * @property {Array.|null} [rules] Backend rules + */ + + /** + * Constructs a new Backend. + * @memberof google.api + * @classdesc Represents a Backend. + * @implements IBackend + * @constructor + * @param {google.api.IBackend=} [properties] Properties to set + */ + function Backend(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]]; + } + + /** + * Backend rules. + * @member {Array.} rules + * @memberof google.api.Backend + * @instance + */ + Backend.prototype.rules = $util.emptyArray; + + /** + * Creates a new Backend instance using the specified properties. + * @function create + * @memberof google.api.Backend + * @static + * @param {google.api.IBackend=} [properties] Properties to set + * @returns {google.api.Backend} Backend instance + */ + Backend.create = function create(properties) { + return new Backend(properties); + }; + + /** + * Encodes the specified Backend message. Does not implicitly {@link google.api.Backend.verify|verify} messages. + * @function encode + * @memberof google.api.Backend + * @static + * @param {google.api.IBackend} message Backend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backend.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.BackendRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Backend message, length delimited. Does not implicitly {@link google.api.Backend.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Backend + * @static + * @param {google.api.IBackend} message Backend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Backend message from the specified reader or buffer. + * @function decode + * @memberof google.api.Backend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Backend} Backend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backend.decode = function 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.Backend(); + 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.BackendRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Backend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Backend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Backend} Backend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Backend message. + * @function verify + * @memberof google.api.Backend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Backend.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.BackendRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates a Backend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Backend + * @static + * @param {Object.} object Plain object + * @returns {google.api.Backend} Backend + */ + Backend.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Backend) + return object; + var message = new $root.google.api.Backend(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Backend.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Backend.rules: object expected"); + message.rules[i] = $root.google.api.BackendRule.fromObject(object.rules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Backend message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Backend + * @static + * @param {google.api.Backend} message Backend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Backend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.BackendRule.toObject(message.rules[j], options); + } + return object; + }; + + /** + * Converts this Backend to JSON. + * @function toJSON + * @memberof google.api.Backend + * @instance + * @returns {Object.} JSON object + */ + Backend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Backend; + })(); + + api.BackendRule = (function() { + + /** + * Properties of a BackendRule. + * @memberof google.api + * @interface IBackendRule + * @property {string|null} [selector] BackendRule selector + * @property {string|null} [address] BackendRule address + * @property {number|null} [deadline] BackendRule deadline + * @property {number|null} [minDeadline] BackendRule minDeadline + * @property {number|null} [operationDeadline] BackendRule operationDeadline + * @property {google.api.BackendRule.PathTranslation|null} [pathTranslation] BackendRule pathTranslation + * @property {string|null} [jwtAudience] BackendRule jwtAudience + * @property {boolean|null} [disableAuth] BackendRule disableAuth + * @property {string|null} [protocol] BackendRule protocol + */ + + /** + * Constructs a new BackendRule. + * @memberof google.api + * @classdesc Represents a BackendRule. + * @implements IBackendRule + * @constructor + * @param {google.api.IBackendRule=} [properties] Properties to set + */ + function BackendRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackendRule selector. + * @member {string} selector + * @memberof google.api.BackendRule + * @instance + */ + BackendRule.prototype.selector = ""; + + /** + * BackendRule address. + * @member {string} address + * @memberof google.api.BackendRule + * @instance + */ + BackendRule.prototype.address = ""; + + /** + * BackendRule deadline. + * @member {number} deadline + * @memberof google.api.BackendRule + * @instance + */ + BackendRule.prototype.deadline = 0; + + /** + * BackendRule minDeadline. + * @member {number} minDeadline + * @memberof google.api.BackendRule + * @instance + */ + BackendRule.prototype.minDeadline = 0; + + /** + * BackendRule operationDeadline. + * @member {number} operationDeadline + * @memberof google.api.BackendRule + * @instance + */ + BackendRule.prototype.operationDeadline = 0; + + /** + * BackendRule pathTranslation. + * @member {google.api.BackendRule.PathTranslation} pathTranslation + * @memberof google.api.BackendRule + * @instance + */ + BackendRule.prototype.pathTranslation = 0; + + /** + * BackendRule jwtAudience. + * @member {string} jwtAudience + * @memberof google.api.BackendRule + * @instance + */ + BackendRule.prototype.jwtAudience = ""; + + /** + * BackendRule disableAuth. + * @member {boolean} disableAuth + * @memberof google.api.BackendRule + * @instance + */ + BackendRule.prototype.disableAuth = false; + + /** + * BackendRule protocol. + * @member {string} protocol + * @memberof google.api.BackendRule + * @instance + */ + BackendRule.prototype.protocol = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackendRule authentication. + * @member {"jwtAudience"|"disableAuth"|undefined} authentication + * @memberof google.api.BackendRule + * @instance + */ + Object.defineProperty(BackendRule.prototype, "authentication", { + get: $util.oneOfGetter($oneOfFields = ["jwtAudience", "disableAuth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackendRule instance using the specified properties. + * @function create + * @memberof google.api.BackendRule + * @static + * @param {google.api.IBackendRule=} [properties] Properties to set + * @returns {google.api.BackendRule} BackendRule instance + */ + BackendRule.create = function create(properties) { + return new BackendRule(properties); + }; + + /** + * Encodes the specified BackendRule message. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. + * @function encode + * @memberof google.api.BackendRule + * @static + * @param {google.api.IBackendRule} message BackendRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackendRule.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.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.address); + if (message.deadline != null && Object.hasOwnProperty.call(message, "deadline")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.deadline); + if (message.minDeadline != null && Object.hasOwnProperty.call(message, "minDeadline")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.minDeadline); + if (message.operationDeadline != null && Object.hasOwnProperty.call(message, "operationDeadline")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.operationDeadline); + if (message.pathTranslation != null && Object.hasOwnProperty.call(message, "pathTranslation")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.pathTranslation); + if (message.jwtAudience != null && Object.hasOwnProperty.call(message, "jwtAudience")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.jwtAudience); + if (message.disableAuth != null && Object.hasOwnProperty.call(message, "disableAuth")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.disableAuth); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.protocol); + return writer; + }; + + /** + * Encodes the specified BackendRule message, length delimited. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.BackendRule + * @static + * @param {google.api.IBackendRule} message BackendRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackendRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackendRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.BackendRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.BackendRule} BackendRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackendRule.decode = function 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.BackendRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.address = reader.string(); + break; + case 3: + message.deadline = reader.double(); + break; + case 4: + message.minDeadline = reader.double(); + break; + case 5: + message.operationDeadline = reader.double(); + break; + case 6: + message.pathTranslation = reader.int32(); + break; + case 7: + message.jwtAudience = reader.string(); + break; + case 8: + message.disableAuth = reader.bool(); + break; + case 9: + message.protocol = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackendRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.BackendRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.BackendRule} BackendRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackendRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackendRule message. + * @function verify + * @memberof google.api.BackendRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackendRule.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.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.deadline != null && message.hasOwnProperty("deadline")) + if (typeof message.deadline !== "number") + return "deadline: number expected"; + if (message.minDeadline != null && message.hasOwnProperty("minDeadline")) + if (typeof message.minDeadline !== "number") + return "minDeadline: number expected"; + if (message.operationDeadline != null && message.hasOwnProperty("operationDeadline")) + if (typeof message.operationDeadline !== "number") + return "operationDeadline: number expected"; + if (message.pathTranslation != null && message.hasOwnProperty("pathTranslation")) + switch (message.pathTranslation) { + default: + return "pathTranslation: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jwtAudience != null && message.hasOwnProperty("jwtAudience")) { + properties.authentication = 1; + if (!$util.isString(message.jwtAudience)) + return "jwtAudience: string expected"; + } + if (message.disableAuth != null && message.hasOwnProperty("disableAuth")) { + if (properties.authentication === 1) + return "authentication: multiple values"; + properties.authentication = 1; + if (typeof message.disableAuth !== "boolean") + return "disableAuth: boolean expected"; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + return null; + }; + + /** + * Creates a BackendRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.BackendRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.BackendRule} BackendRule + */ + BackendRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.BackendRule) + return object; + var message = new $root.google.api.BackendRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.address != null) + message.address = String(object.address); + if (object.deadline != null) + message.deadline = Number(object.deadline); + if (object.minDeadline != null) + message.minDeadline = Number(object.minDeadline); + if (object.operationDeadline != null) + message.operationDeadline = Number(object.operationDeadline); + switch (object.pathTranslation) { + case "PATH_TRANSLATION_UNSPECIFIED": + case 0: + message.pathTranslation = 0; + break; + case "CONSTANT_ADDRESS": + case 1: + message.pathTranslation = 1; + break; + case "APPEND_PATH_TO_ADDRESS": + case 2: + message.pathTranslation = 2; + break; + } + if (object.jwtAudience != null) + message.jwtAudience = String(object.jwtAudience); + if (object.disableAuth != null) + message.disableAuth = Boolean(object.disableAuth); + if (object.protocol != null) + message.protocol = String(object.protocol); + return message; + }; + + /** + * Creates a plain object from a BackendRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.BackendRule + * @static + * @param {google.api.BackendRule} message BackendRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackendRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selector = ""; + object.address = ""; + object.deadline = 0; + object.minDeadline = 0; + object.operationDeadline = 0; + object.pathTranslation = options.enums === String ? "PATH_TRANSLATION_UNSPECIFIED" : 0; + object.protocol = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.deadline != null && message.hasOwnProperty("deadline")) + object.deadline = options.json && !isFinite(message.deadline) ? String(message.deadline) : message.deadline; + if (message.minDeadline != null && message.hasOwnProperty("minDeadline")) + object.minDeadline = options.json && !isFinite(message.minDeadline) ? String(message.minDeadline) : message.minDeadline; + if (message.operationDeadline != null && message.hasOwnProperty("operationDeadline")) + object.operationDeadline = options.json && !isFinite(message.operationDeadline) ? String(message.operationDeadline) : message.operationDeadline; + if (message.pathTranslation != null && message.hasOwnProperty("pathTranslation")) + object.pathTranslation = options.enums === String ? $root.google.api.BackendRule.PathTranslation[message.pathTranslation] : message.pathTranslation; + if (message.jwtAudience != null && message.hasOwnProperty("jwtAudience")) { + object.jwtAudience = message.jwtAudience; + if (options.oneofs) + object.authentication = "jwtAudience"; + } + if (message.disableAuth != null && message.hasOwnProperty("disableAuth")) { + object.disableAuth = message.disableAuth; + if (options.oneofs) + object.authentication = "disableAuth"; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + return object; + }; + + /** + * Converts this BackendRule to JSON. + * @function toJSON + * @memberof google.api.BackendRule + * @instance + * @returns {Object.} JSON object + */ + BackendRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * PathTranslation enum. + * @name google.api.BackendRule.PathTranslation + * @enum {number} + * @property {number} PATH_TRANSLATION_UNSPECIFIED=0 PATH_TRANSLATION_UNSPECIFIED value + * @property {number} CONSTANT_ADDRESS=1 CONSTANT_ADDRESS value + * @property {number} APPEND_PATH_TO_ADDRESS=2 APPEND_PATH_TO_ADDRESS value + */ + BackendRule.PathTranslation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PATH_TRANSLATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONSTANT_ADDRESS"] = 1; + values[valuesById[2] = "APPEND_PATH_TO_ADDRESS"] = 2; + return values; + })(); + + return BackendRule; + })(); + + api.Billing = (function() { + + /** + * Properties of a Billing. + * @memberof google.api + * @interface IBilling + * @property {Array.|null} [consumerDestinations] Billing consumerDestinations + */ + + /** + * Constructs a new Billing. + * @memberof google.api + * @classdesc Represents a Billing. + * @implements IBilling + * @constructor + * @param {google.api.IBilling=} [properties] Properties to set + */ + function Billing(properties) { + this.consumerDestinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Billing consumerDestinations. + * @member {Array.} consumerDestinations + * @memberof google.api.Billing + * @instance + */ + Billing.prototype.consumerDestinations = $util.emptyArray; + + /** + * Creates a new Billing instance using the specified properties. + * @function create + * @memberof google.api.Billing + * @static + * @param {google.api.IBilling=} [properties] Properties to set + * @returns {google.api.Billing} Billing instance + */ + Billing.create = function create(properties) { + return new Billing(properties); + }; + + /** + * Encodes the specified Billing message. Does not implicitly {@link google.api.Billing.verify|verify} messages. + * @function encode + * @memberof google.api.Billing + * @static + * @param {google.api.IBilling} message Billing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Billing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumerDestinations != null && message.consumerDestinations.length) + for (var i = 0; i < message.consumerDestinations.length; ++i) + $root.google.api.Billing.BillingDestination.encode(message.consumerDestinations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Billing message, length delimited. Does not implicitly {@link google.api.Billing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Billing + * @static + * @param {google.api.IBilling} message Billing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Billing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Billing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Billing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Billing} Billing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Billing.decode = function 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.Billing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 8: + if (!(message.consumerDestinations && message.consumerDestinations.length)) + message.consumerDestinations = []; + message.consumerDestinations.push($root.google.api.Billing.BillingDestination.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Billing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Billing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Billing} Billing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Billing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Billing message. + * @function verify + * @memberof google.api.Billing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Billing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consumerDestinations != null && message.hasOwnProperty("consumerDestinations")) { + if (!Array.isArray(message.consumerDestinations)) + return "consumerDestinations: array expected"; + for (var i = 0; i < message.consumerDestinations.length; ++i) { + var error = $root.google.api.Billing.BillingDestination.verify(message.consumerDestinations[i]); + if (error) + return "consumerDestinations." + error; + } + } + return null; + }; + + /** + * Creates a Billing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Billing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Billing} Billing + */ + Billing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Billing) + return object; + var message = new $root.google.api.Billing(); + if (object.consumerDestinations) { + if (!Array.isArray(object.consumerDestinations)) + throw TypeError(".google.api.Billing.consumerDestinations: array expected"); + message.consumerDestinations = []; + for (var i = 0; i < object.consumerDestinations.length; ++i) { + if (typeof object.consumerDestinations[i] !== "object") + throw TypeError(".google.api.Billing.consumerDestinations: object expected"); + message.consumerDestinations[i] = $root.google.api.Billing.BillingDestination.fromObject(object.consumerDestinations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Billing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Billing + * @static + * @param {google.api.Billing} message Billing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Billing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.consumerDestinations = []; + if (message.consumerDestinations && message.consumerDestinations.length) { + object.consumerDestinations = []; + for (var j = 0; j < message.consumerDestinations.length; ++j) + object.consumerDestinations[j] = $root.google.api.Billing.BillingDestination.toObject(message.consumerDestinations[j], options); + } + return object; + }; + + /** + * Converts this Billing to JSON. + * @function toJSON + * @memberof google.api.Billing + * @instance + * @returns {Object.} JSON object + */ + Billing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Billing.BillingDestination = (function() { + + /** + * Properties of a BillingDestination. + * @memberof google.api.Billing + * @interface IBillingDestination + * @property {string|null} [monitoredResource] BillingDestination monitoredResource + * @property {Array.|null} [metrics] BillingDestination metrics + */ + + /** + * Constructs a new BillingDestination. + * @memberof google.api.Billing + * @classdesc Represents a BillingDestination. + * @implements IBillingDestination + * @constructor + * @param {google.api.Billing.IBillingDestination=} [properties] Properties to set + */ + function BillingDestination(properties) { + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BillingDestination monitoredResource. + * @member {string} monitoredResource + * @memberof google.api.Billing.BillingDestination + * @instance + */ + BillingDestination.prototype.monitoredResource = ""; + + /** + * BillingDestination metrics. + * @member {Array.} metrics + * @memberof google.api.Billing.BillingDestination + * @instance + */ + BillingDestination.prototype.metrics = $util.emptyArray; + + /** + * Creates a new BillingDestination instance using the specified properties. + * @function create + * @memberof google.api.Billing.BillingDestination + * @static + * @param {google.api.Billing.IBillingDestination=} [properties] Properties to set + * @returns {google.api.Billing.BillingDestination} BillingDestination instance + */ + BillingDestination.create = function create(properties) { + return new BillingDestination(properties); + }; + + /** + * Encodes the specified BillingDestination message. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. + * @function encode + * @memberof google.api.Billing.BillingDestination + * @static + * @param {google.api.Billing.IBillingDestination} message BillingDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BillingDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.monitoredResource); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metrics[i]); + return writer; + }; + + /** + * Encodes the specified BillingDestination message, length delimited. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Billing.BillingDestination + * @static + * @param {google.api.Billing.IBillingDestination} message BillingDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BillingDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BillingDestination message from the specified reader or buffer. + * @function decode + * @memberof google.api.Billing.BillingDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Billing.BillingDestination} BillingDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BillingDestination.decode = function 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.Billing.BillingDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.monitoredResource = reader.string(); + break; + case 2: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BillingDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Billing.BillingDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Billing.BillingDestination} BillingDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BillingDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BillingDestination message. + * @function verify + * @memberof google.api.Billing.BillingDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BillingDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + if (!$util.isString(message.monitoredResource)) + return "monitoredResource: string expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) + if (!$util.isString(message.metrics[i])) + return "metrics: string[] expected"; + } + return null; + }; + + /** + * Creates a BillingDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Billing.BillingDestination + * @static + * @param {Object.} object Plain object + * @returns {google.api.Billing.BillingDestination} BillingDestination + */ + BillingDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Billing.BillingDestination) + return object; + var message = new $root.google.api.Billing.BillingDestination(); + if (object.monitoredResource != null) + message.monitoredResource = String(object.monitoredResource); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.api.Billing.BillingDestination.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) + message.metrics[i] = String(object.metrics[i]); + } + return message; + }; + + /** + * Creates a plain object from a BillingDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Billing.BillingDestination + * @static + * @param {google.api.Billing.BillingDestination} message BillingDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BillingDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) + object.monitoredResource = ""; + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + object.monitoredResource = message.monitoredResource; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = message.metrics[j]; + } + return object; + }; + + /** + * Converts this BillingDestination to JSON. + * @function toJSON + * @memberof google.api.Billing.BillingDestination + * @instance + * @returns {Object.} JSON object + */ + BillingDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BillingDestination; + })(); + + return Billing; + })(); + + api.Context = (function() { + + /** + * Properties of a Context. + * @memberof google.api + * @interface IContext + * @property {Array.|null} [rules] Context rules + */ + + /** + * Constructs a new Context. + * @memberof google.api + * @classdesc Represents a Context. + * @implements IContext + * @constructor + * @param {google.api.IContext=} [properties] Properties to set + */ + function Context(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]]; + } + + /** + * Context rules. + * @member {Array.} rules + * @memberof google.api.Context + * @instance + */ + Context.prototype.rules = $util.emptyArray; + + /** + * Creates a new Context instance using the specified properties. + * @function create + * @memberof google.api.Context + * @static + * @param {google.api.IContext=} [properties] Properties to set + * @returns {google.api.Context} Context instance + */ + Context.create = function create(properties) { + return new Context(properties); + }; + + /** + * Encodes the specified Context message. Does not implicitly {@link google.api.Context.verify|verify} messages. + * @function encode + * @memberof google.api.Context + * @static + * @param {google.api.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Context.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.ContextRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.api.Context.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Context + * @static + * @param {google.api.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Context.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Context message from the specified reader or buffer. + * @function decode + * @memberof google.api.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Context.decode = function 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.Context(); + 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.ContextRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Context message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Context.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Context message. + * @function verify + * @memberof google.api.Context + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Context.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.ContextRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates a Context message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Context + * @static + * @param {Object.} object Plain object + * @returns {google.api.Context} Context + */ + Context.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Context) + return object; + var message = new $root.google.api.Context(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Context.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Context.rules: object expected"); + message.rules[i] = $root.google.api.ContextRule.fromObject(object.rules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Context message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Context + * @static + * @param {google.api.Context} message Context + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Context.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.ContextRule.toObject(message.rules[j], options); + } + return object; + }; + + /** + * Converts this Context to JSON. + * @function toJSON + * @memberof google.api.Context + * @instance + * @returns {Object.} JSON object + */ + Context.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Context; + })(); + + api.ContextRule = (function() { + + /** + * Properties of a ContextRule. + * @memberof google.api + * @interface IContextRule + * @property {string|null} [selector] ContextRule selector + * @property {Array.|null} [requested] ContextRule requested + * @property {Array.|null} [provided] ContextRule provided + * @property {Array.|null} [allowedRequestExtensions] ContextRule allowedRequestExtensions + * @property {Array.|null} [allowedResponseExtensions] ContextRule allowedResponseExtensions + */ + + /** + * Constructs a new ContextRule. + * @memberof google.api + * @classdesc Represents a ContextRule. + * @implements IContextRule + * @constructor + * @param {google.api.IContextRule=} [properties] Properties to set + */ + function ContextRule(properties) { + this.requested = []; + this.provided = []; + this.allowedRequestExtensions = []; + this.allowedResponseExtensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContextRule selector. + * @member {string} selector + * @memberof google.api.ContextRule + * @instance + */ + ContextRule.prototype.selector = ""; + + /** + * ContextRule requested. + * @member {Array.} requested + * @memberof google.api.ContextRule + * @instance + */ + ContextRule.prototype.requested = $util.emptyArray; + + /** + * ContextRule provided. + * @member {Array.} provided + * @memberof google.api.ContextRule + * @instance + */ + ContextRule.prototype.provided = $util.emptyArray; + + /** + * ContextRule allowedRequestExtensions. + * @member {Array.} allowedRequestExtensions + * @memberof google.api.ContextRule + * @instance + */ + ContextRule.prototype.allowedRequestExtensions = $util.emptyArray; + + /** + * ContextRule allowedResponseExtensions. + * @member {Array.} allowedResponseExtensions + * @memberof google.api.ContextRule + * @instance + */ + ContextRule.prototype.allowedResponseExtensions = $util.emptyArray; + + /** + * Creates a new ContextRule instance using the specified properties. + * @function create + * @memberof google.api.ContextRule + * @static + * @param {google.api.IContextRule=} [properties] Properties to set + * @returns {google.api.ContextRule} ContextRule instance + */ + ContextRule.create = function create(properties) { + return new ContextRule(properties); + }; + + /** + * Encodes the specified ContextRule message. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. + * @function encode + * @memberof google.api.ContextRule + * @static + * @param {google.api.IContextRule} message ContextRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextRule.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.requested != null && message.requested.length) + for (var i = 0; i < message.requested.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requested[i]); + if (message.provided != null && message.provided.length) + for (var i = 0; i < message.provided.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.provided[i]); + if (message.allowedRequestExtensions != null && message.allowedRequestExtensions.length) + for (var i = 0; i < message.allowedRequestExtensions.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.allowedRequestExtensions[i]); + if (message.allowedResponseExtensions != null && message.allowedResponseExtensions.length) + for (var i = 0; i < message.allowedResponseExtensions.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.allowedResponseExtensions[i]); + return writer; + }; + + /** + * Encodes the specified ContextRule message, length delimited. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ContextRule + * @static + * @param {google.api.IContextRule} message ContextRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContextRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.ContextRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ContextRule} ContextRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextRule.decode = function 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.ContextRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + if (!(message.requested && message.requested.length)) + message.requested = []; + message.requested.push(reader.string()); + break; + case 3: + if (!(message.provided && message.provided.length)) + message.provided = []; + message.provided.push(reader.string()); + break; + case 4: + if (!(message.allowedRequestExtensions && message.allowedRequestExtensions.length)) + message.allowedRequestExtensions = []; + message.allowedRequestExtensions.push(reader.string()); + break; + case 5: + if (!(message.allowedResponseExtensions && message.allowedResponseExtensions.length)) + message.allowedResponseExtensions = []; + message.allowedResponseExtensions.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContextRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ContextRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ContextRule} ContextRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContextRule message. + * @function verify + * @memberof google.api.ContextRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContextRule.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.requested != null && message.hasOwnProperty("requested")) { + if (!Array.isArray(message.requested)) + return "requested: array expected"; + for (var i = 0; i < message.requested.length; ++i) + if (!$util.isString(message.requested[i])) + return "requested: string[] expected"; + } + if (message.provided != null && message.hasOwnProperty("provided")) { + if (!Array.isArray(message.provided)) + return "provided: array expected"; + for (var i = 0; i < message.provided.length; ++i) + if (!$util.isString(message.provided[i])) + return "provided: string[] expected"; + } + if (message.allowedRequestExtensions != null && message.hasOwnProperty("allowedRequestExtensions")) { + if (!Array.isArray(message.allowedRequestExtensions)) + return "allowedRequestExtensions: array expected"; + for (var i = 0; i < message.allowedRequestExtensions.length; ++i) + if (!$util.isString(message.allowedRequestExtensions[i])) + return "allowedRequestExtensions: string[] expected"; + } + if (message.allowedResponseExtensions != null && message.hasOwnProperty("allowedResponseExtensions")) { + if (!Array.isArray(message.allowedResponseExtensions)) + return "allowedResponseExtensions: array expected"; + for (var i = 0; i < message.allowedResponseExtensions.length; ++i) + if (!$util.isString(message.allowedResponseExtensions[i])) + return "allowedResponseExtensions: string[] expected"; + } + return null; + }; + + /** + * Creates a ContextRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ContextRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.ContextRule} ContextRule + */ + ContextRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ContextRule) + return object; + var message = new $root.google.api.ContextRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.requested) { + if (!Array.isArray(object.requested)) + throw TypeError(".google.api.ContextRule.requested: array expected"); + message.requested = []; + for (var i = 0; i < object.requested.length; ++i) + message.requested[i] = String(object.requested[i]); + } + if (object.provided) { + if (!Array.isArray(object.provided)) + throw TypeError(".google.api.ContextRule.provided: array expected"); + message.provided = []; + for (var i = 0; i < object.provided.length; ++i) + message.provided[i] = String(object.provided[i]); + } + if (object.allowedRequestExtensions) { + if (!Array.isArray(object.allowedRequestExtensions)) + throw TypeError(".google.api.ContextRule.allowedRequestExtensions: array expected"); + message.allowedRequestExtensions = []; + for (var i = 0; i < object.allowedRequestExtensions.length; ++i) + message.allowedRequestExtensions[i] = String(object.allowedRequestExtensions[i]); + } + if (object.allowedResponseExtensions) { + if (!Array.isArray(object.allowedResponseExtensions)) + throw TypeError(".google.api.ContextRule.allowedResponseExtensions: array expected"); + message.allowedResponseExtensions = []; + for (var i = 0; i < object.allowedResponseExtensions.length; ++i) + message.allowedResponseExtensions[i] = String(object.allowedResponseExtensions[i]); + } + return message; + }; + + /** + * Creates a plain object from a ContextRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ContextRule + * @static + * @param {google.api.ContextRule} message ContextRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContextRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.requested = []; + object.provided = []; + object.allowedRequestExtensions = []; + object.allowedResponseExtensions = []; + } + if (options.defaults) + object.selector = ""; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.requested && message.requested.length) { + object.requested = []; + for (var j = 0; j < message.requested.length; ++j) + object.requested[j] = message.requested[j]; + } + if (message.provided && message.provided.length) { + object.provided = []; + for (var j = 0; j < message.provided.length; ++j) + object.provided[j] = message.provided[j]; + } + if (message.allowedRequestExtensions && message.allowedRequestExtensions.length) { + object.allowedRequestExtensions = []; + for (var j = 0; j < message.allowedRequestExtensions.length; ++j) + object.allowedRequestExtensions[j] = message.allowedRequestExtensions[j]; + } + if (message.allowedResponseExtensions && message.allowedResponseExtensions.length) { + object.allowedResponseExtensions = []; + for (var j = 0; j < message.allowedResponseExtensions.length; ++j) + object.allowedResponseExtensions[j] = message.allowedResponseExtensions[j]; + } + return object; + }; + + /** + * Converts this ContextRule to JSON. + * @function toJSON + * @memberof google.api.ContextRule + * @instance + * @returns {Object.} JSON object + */ + ContextRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContextRule; + })(); + + api.Control = (function() { + + /** + * Properties of a Control. + * @memberof google.api + * @interface IControl + * @property {string|null} [environment] Control environment + */ + + /** + * Constructs a new Control. + * @memberof google.api + * @classdesc Represents a Control. + * @implements IControl + * @constructor + * @param {google.api.IControl=} [properties] Properties to set + */ + function Control(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Control environment. + * @member {string} environment + * @memberof google.api.Control + * @instance + */ + Control.prototype.environment = ""; + + /** + * Creates a new Control instance using the specified properties. + * @function create + * @memberof google.api.Control + * @static + * @param {google.api.IControl=} [properties] Properties to set + * @returns {google.api.Control} Control instance + */ + Control.create = function create(properties) { + return new Control(properties); + }; + + /** + * Encodes the specified Control message. Does not implicitly {@link google.api.Control.verify|verify} messages. + * @function encode + * @memberof google.api.Control + * @static + * @param {google.api.IControl} message Control message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Control.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + return writer; + }; + + /** + * Encodes the specified Control message, length delimited. Does not implicitly {@link google.api.Control.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Control + * @static + * @param {google.api.IControl} message Control message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Control.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Control message from the specified reader or buffer. + * @function decode + * @memberof google.api.Control + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Control} Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Control.decode = function 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.Control(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.environment = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Control message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Control + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Control} Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Control.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Control message. + * @function verify + * @memberof google.api.Control + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Control.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + return null; + }; + + /** + * Creates a Control message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Control + * @static + * @param {Object.} object Plain object + * @returns {google.api.Control} Control + */ + Control.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Control) + return object; + var message = new $root.google.api.Control(); + if (object.environment != null) + message.environment = String(object.environment); + return message; + }; + + /** + * Creates a plain object from a Control message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Control + * @static + * @param {google.api.Control} message Control + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Control.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.environment = ""; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + return object; + }; + + /** + * Converts this Control to JSON. + * @function toJSON + * @memberof google.api.Control + * @instance + * @returns {Object.} JSON object + */ + Control.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Control; + })(); + + api.Documentation = (function() { + + /** + * Properties of a Documentation. + * @memberof google.api + * @interface IDocumentation + * @property {string|null} [summary] Documentation summary + * @property {Array.|null} [pages] Documentation pages + * @property {Array.|null} [rules] Documentation rules + * @property {string|null} [documentationRootUrl] Documentation documentationRootUrl + * @property {string|null} [serviceRootUrl] Documentation serviceRootUrl + * @property {string|null} [overview] Documentation overview + */ + + /** + * Constructs a new Documentation. + * @memberof google.api + * @classdesc Represents a Documentation. + * @implements IDocumentation + * @constructor + * @param {google.api.IDocumentation=} [properties] Properties to set + */ + function Documentation(properties) { + this.pages = []; + 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]]; + } + + /** + * Documentation summary. + * @member {string} summary + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.summary = ""; + + /** + * Documentation pages. + * @member {Array.} pages + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.pages = $util.emptyArray; + + /** + * Documentation rules. + * @member {Array.} rules + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.rules = $util.emptyArray; + + /** + * Documentation documentationRootUrl. + * @member {string} documentationRootUrl + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.documentationRootUrl = ""; + + /** + * Documentation serviceRootUrl. + * @member {string} serviceRootUrl + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.serviceRootUrl = ""; + + /** + * Documentation overview. + * @member {string} overview + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.overview = ""; + + /** + * Creates a new Documentation instance using the specified properties. + * @function create + * @memberof google.api.Documentation + * @static + * @param {google.api.IDocumentation=} [properties] Properties to set + * @returns {google.api.Documentation} Documentation instance + */ + Documentation.create = function create(properties) { + return new Documentation(properties); + }; + + /** + * Encodes the specified Documentation message. Does not implicitly {@link google.api.Documentation.verify|verify} messages. + * @function encode + * @memberof google.api.Documentation + * @static + * @param {google.api.IDocumentation} message Documentation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documentation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.summary); + if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.overview); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.DocumentationRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.documentationRootUrl != null && Object.hasOwnProperty.call(message, "documentationRootUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.documentationRootUrl); + if (message.pages != null && message.pages.length) + for (var i = 0; i < message.pages.length; ++i) + $root.google.api.Page.encode(message.pages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.serviceRootUrl != null && Object.hasOwnProperty.call(message, "serviceRootUrl")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.serviceRootUrl); + return writer; + }; + + /** + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.api.Documentation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Documentation + * @static + * @param {google.api.IDocumentation} message Documentation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documentation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Documentation message from the specified reader or buffer. + * @function decode + * @memberof google.api.Documentation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Documentation} Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documentation.decode = function 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.Documentation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.summary = reader.string(); + break; + case 5: + if (!(message.pages && message.pages.length)) + message.pages = []; + message.pages.push($root.google.api.Page.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.DocumentationRule.decode(reader, reader.uint32())); + break; + case 4: + message.documentationRootUrl = reader.string(); + break; + case 6: + message.serviceRootUrl = reader.string(); + break; + case 2: + message.overview = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Documentation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Documentation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Documentation} Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documentation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Documentation message. + * @function verify + * @memberof google.api.Documentation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Documentation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + if (message.pages != null && message.hasOwnProperty("pages")) { + if (!Array.isArray(message.pages)) + return "pages: array expected"; + for (var i = 0; i < message.pages.length; ++i) { + var error = $root.google.api.Page.verify(message.pages[i]); + if (error) + return "pages." + error; + } + } + 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.DocumentationRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.documentationRootUrl != null && message.hasOwnProperty("documentationRootUrl")) + if (!$util.isString(message.documentationRootUrl)) + return "documentationRootUrl: string expected"; + if (message.serviceRootUrl != null && message.hasOwnProperty("serviceRootUrl")) + if (!$util.isString(message.serviceRootUrl)) + return "serviceRootUrl: string expected"; + if (message.overview != null && message.hasOwnProperty("overview")) + if (!$util.isString(message.overview)) + return "overview: string expected"; + return null; + }; + + /** + * Creates a Documentation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Documentation + * @static + * @param {Object.} object Plain object + * @returns {google.api.Documentation} Documentation + */ + Documentation.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Documentation) + return object; + var message = new $root.google.api.Documentation(); + if (object.summary != null) + message.summary = String(object.summary); + if (object.pages) { + if (!Array.isArray(object.pages)) + throw TypeError(".google.api.Documentation.pages: array expected"); + message.pages = []; + for (var i = 0; i < object.pages.length; ++i) { + if (typeof object.pages[i] !== "object") + throw TypeError(".google.api.Documentation.pages: object expected"); + message.pages[i] = $root.google.api.Page.fromObject(object.pages[i]); + } + } + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Documentation.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Documentation.rules: object expected"); + message.rules[i] = $root.google.api.DocumentationRule.fromObject(object.rules[i]); + } + } + if (object.documentationRootUrl != null) + message.documentationRootUrl = String(object.documentationRootUrl); + if (object.serviceRootUrl != null) + message.serviceRootUrl = String(object.serviceRootUrl); + if (object.overview != null) + message.overview = String(object.overview); + return message; + }; + + /** + * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Documentation + * @static + * @param {google.api.Documentation} message Documentation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Documentation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.rules = []; + object.pages = []; + } + if (options.defaults) { + object.summary = ""; + object.overview = ""; + object.documentationRootUrl = ""; + object.serviceRootUrl = ""; + } + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + if (message.overview != null && message.hasOwnProperty("overview")) + object.overview = message.overview; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.DocumentationRule.toObject(message.rules[j], options); + } + if (message.documentationRootUrl != null && message.hasOwnProperty("documentationRootUrl")) + object.documentationRootUrl = message.documentationRootUrl; + if (message.pages && message.pages.length) { + object.pages = []; + for (var j = 0; j < message.pages.length; ++j) + object.pages[j] = $root.google.api.Page.toObject(message.pages[j], options); + } + if (message.serviceRootUrl != null && message.hasOwnProperty("serviceRootUrl")) + object.serviceRootUrl = message.serviceRootUrl; + return object; + }; + + /** + * Converts this Documentation to JSON. + * @function toJSON + * @memberof google.api.Documentation + * @instance + * @returns {Object.} JSON object + */ + Documentation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Documentation; + })(); + + api.DocumentationRule = (function() { + + /** + * Properties of a DocumentationRule. + * @memberof google.api + * @interface IDocumentationRule + * @property {string|null} [selector] DocumentationRule selector + * @property {string|null} [description] DocumentationRule description + * @property {string|null} [deprecationDescription] DocumentationRule deprecationDescription + */ + + /** + * Constructs a new DocumentationRule. + * @memberof google.api + * @classdesc Represents a DocumentationRule. + * @implements IDocumentationRule + * @constructor + * @param {google.api.IDocumentationRule=} [properties] Properties to set + */ + function DocumentationRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DocumentationRule selector. + * @member {string} selector + * @memberof google.api.DocumentationRule + * @instance + */ + DocumentationRule.prototype.selector = ""; + + /** + * DocumentationRule description. + * @member {string} description + * @memberof google.api.DocumentationRule + * @instance + */ + DocumentationRule.prototype.description = ""; + + /** + * DocumentationRule deprecationDescription. + * @member {string} deprecationDescription + * @memberof google.api.DocumentationRule + * @instance + */ + DocumentationRule.prototype.deprecationDescription = ""; + + /** + * Creates a new DocumentationRule instance using the specified properties. + * @function create + * @memberof google.api.DocumentationRule + * @static + * @param {google.api.IDocumentationRule=} [properties] Properties to set + * @returns {google.api.DocumentationRule} DocumentationRule instance + */ + DocumentationRule.create = function create(properties) { + return new DocumentationRule(properties); + }; + + /** + * Encodes the specified DocumentationRule message. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. + * @function encode + * @memberof google.api.DocumentationRule + * @static + * @param {google.api.IDocumentationRule} message DocumentationRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentationRule.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.deprecationDescription != null && Object.hasOwnProperty.call(message, "deprecationDescription")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationDescription); + return writer; + }; + + /** + * Encodes the specified DocumentationRule message, length delimited. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DocumentationRule + * @static + * @param {google.api.IDocumentationRule} message DocumentationRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentationRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentationRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.DocumentationRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DocumentationRule} DocumentationRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentationRule.decode = function 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.DocumentationRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.deprecationDescription = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentationRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DocumentationRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DocumentationRule} DocumentationRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentationRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentationRule message. + * @function verify + * @memberof google.api.DocumentationRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentationRule.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.deprecationDescription != null && message.hasOwnProperty("deprecationDescription")) + if (!$util.isString(message.deprecationDescription)) + return "deprecationDescription: string expected"; + return null; + }; + + /** + * Creates a DocumentationRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DocumentationRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.DocumentationRule} DocumentationRule + */ + DocumentationRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DocumentationRule) + return object; + var message = new $root.google.api.DocumentationRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.description != null) + message.description = String(object.description); + if (object.deprecationDescription != null) + message.deprecationDescription = String(object.deprecationDescription); + return message; + }; + + /** + * Creates a plain object from a DocumentationRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DocumentationRule + * @static + * @param {google.api.DocumentationRule} message DocumentationRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentationRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selector = ""; + object.description = ""; + object.deprecationDescription = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.deprecationDescription != null && message.hasOwnProperty("deprecationDescription")) + object.deprecationDescription = message.deprecationDescription; + return object; + }; + + /** + * Converts this DocumentationRule to JSON. + * @function toJSON + * @memberof google.api.DocumentationRule + * @instance + * @returns {Object.} JSON object + */ + DocumentationRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DocumentationRule; + })(); + + api.Page = (function() { + + /** + * Properties of a Page. + * @memberof google.api + * @interface IPage + * @property {string|null} [name] Page name + * @property {string|null} [content] Page content + * @property {Array.|null} [subpages] Page subpages + */ + + /** + * Constructs a new Page. + * @memberof google.api + * @classdesc Represents a Page. + * @implements IPage + * @constructor + * @param {google.api.IPage=} [properties] Properties to set + */ + function Page(properties) { + this.subpages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Page name. + * @member {string} name + * @memberof google.api.Page + * @instance + */ + Page.prototype.name = ""; + + /** + * Page content. + * @member {string} content + * @memberof google.api.Page + * @instance + */ + Page.prototype.content = ""; + + /** + * Page subpages. + * @member {Array.} subpages + * @memberof google.api.Page + * @instance + */ + Page.prototype.subpages = $util.emptyArray; + + /** + * Creates a new Page instance using the specified properties. + * @function create + * @memberof google.api.Page + * @static + * @param {google.api.IPage=} [properties] Properties to set + * @returns {google.api.Page} Page instance + */ + Page.create = function create(properties) { + return new Page(properties); + }; + + /** + * Encodes the specified Page message. Does not implicitly {@link google.api.Page.verify|verify} messages. + * @function encode + * @memberof google.api.Page + * @static + * @param {google.api.IPage} message Page message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Page.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.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + if (message.subpages != null && message.subpages.length) + for (var i = 0; i < message.subpages.length; ++i) + $root.google.api.Page.encode(message.subpages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.api.Page.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Page + * @static + * @param {google.api.IPage} message Page message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Page.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Page message from the specified reader or buffer. + * @function decode + * @memberof google.api.Page + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Page} Page + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Page.decode = function 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.Page(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.content = reader.string(); + break; + case 3: + if (!(message.subpages && message.subpages.length)) + message.subpages = []; + message.subpages.push($root.google.api.Page.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Page message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Page + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Page} Page + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Page.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Page message. + * @function verify + * @memberof google.api.Page + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Page.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.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.subpages != null && message.hasOwnProperty("subpages")) { + if (!Array.isArray(message.subpages)) + return "subpages: array expected"; + for (var i = 0; i < message.subpages.length; ++i) { + var error = $root.google.api.Page.verify(message.subpages[i]); + if (error) + return "subpages." + error; + } + } + return null; + }; + + /** + * Creates a Page message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Page + * @static + * @param {Object.} object Plain object + * @returns {google.api.Page} Page + */ + Page.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Page) + return object; + var message = new $root.google.api.Page(); + if (object.name != null) + message.name = String(object.name); + if (object.content != null) + message.content = String(object.content); + if (object.subpages) { + if (!Array.isArray(object.subpages)) + throw TypeError(".google.api.Page.subpages: array expected"); + message.subpages = []; + for (var i = 0; i < object.subpages.length; ++i) { + if (typeof object.subpages[i] !== "object") + throw TypeError(".google.api.Page.subpages: object expected"); + message.subpages[i] = $root.google.api.Page.fromObject(object.subpages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Page message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Page + * @static + * @param {google.api.Page} message Page + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Page.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.subpages = []; + if (options.defaults) { + object.name = ""; + object.content = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.subpages && message.subpages.length) { + object.subpages = []; + for (var j = 0; j < message.subpages.length; ++j) + object.subpages[j] = $root.google.api.Page.toObject(message.subpages[j], options); + } + return object; + }; + + /** + * Converts this Page to JSON. + * @function toJSON + * @memberof google.api.Page + * @instance + * @returns {Object.} JSON object + */ + Page.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Page; + })(); + + api.Endpoint = (function() { + + /** + * Properties of an Endpoint. + * @memberof google.api + * @interface IEndpoint + * @property {string|null} [name] Endpoint name + * @property {Array.|null} [aliases] Endpoint aliases + * @property {string|null} [target] Endpoint target + * @property {boolean|null} [allowCors] Endpoint allowCors + */ + + /** + * Constructs a new Endpoint. + * @memberof google.api + * @classdesc Represents an Endpoint. + * @implements IEndpoint + * @constructor + * @param {google.api.IEndpoint=} [properties] Properties to set + */ + function Endpoint(properties) { + this.aliases = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Endpoint name. + * @member {string} name + * @memberof google.api.Endpoint + * @instance + */ + Endpoint.prototype.name = ""; + + /** + * Endpoint aliases. + * @member {Array.} aliases + * @memberof google.api.Endpoint + * @instance + */ + Endpoint.prototype.aliases = $util.emptyArray; + + /** + * Endpoint target. + * @member {string} target + * @memberof google.api.Endpoint + * @instance + */ + Endpoint.prototype.target = ""; + + /** + * Endpoint allowCors. + * @member {boolean} allowCors + * @memberof google.api.Endpoint + * @instance + */ + Endpoint.prototype.allowCors = false; + + /** + * Creates a new Endpoint instance using the specified properties. + * @function create + * @memberof google.api.Endpoint + * @static + * @param {google.api.IEndpoint=} [properties] Properties to set + * @returns {google.api.Endpoint} Endpoint instance + */ + Endpoint.create = function create(properties) { + return new Endpoint(properties); + }; + + /** + * Encodes the specified Endpoint message. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. + * @function encode + * @memberof google.api.Endpoint + * @static + * @param {google.api.IEndpoint} message Endpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoint.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.aliases != null && message.aliases.length) + for (var i = 0; i < message.aliases.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.aliases[i]); + if (message.allowCors != null && Object.hasOwnProperty.call(message, "allowCors")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowCors); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.target); + return writer; + }; + + /** + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Endpoint + * @static + * @param {google.api.IEndpoint} message Endpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Endpoint message from the specified reader or buffer. + * @function decode + * @memberof google.api.Endpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Endpoint} Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoint.decode = function 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.Endpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.aliases && message.aliases.length)) + message.aliases = []; + message.aliases.push(reader.string()); + break; + case 101: + message.target = reader.string(); + break; + case 5: + message.allowCors = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Endpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Endpoint} Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Endpoint message. + * @function verify + * @memberof google.api.Endpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Endpoint.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.aliases != null && message.hasOwnProperty("aliases")) { + if (!Array.isArray(message.aliases)) + return "aliases: array expected"; + for (var i = 0; i < message.aliases.length; ++i) + if (!$util.isString(message.aliases[i])) + return "aliases: string[] expected"; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.allowCors != null && message.hasOwnProperty("allowCors")) + if (typeof message.allowCors !== "boolean") + return "allowCors: boolean expected"; + return null; + }; + + /** + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Endpoint + * @static + * @param {Object.} object Plain object + * @returns {google.api.Endpoint} Endpoint + */ + Endpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Endpoint) + return object; + var message = new $root.google.api.Endpoint(); + if (object.name != null) + message.name = String(object.name); + if (object.aliases) { + if (!Array.isArray(object.aliases)) + throw TypeError(".google.api.Endpoint.aliases: array expected"); + message.aliases = []; + for (var i = 0; i < object.aliases.length; ++i) + message.aliases[i] = String(object.aliases[i]); + } + if (object.target != null) + message.target = String(object.target); + if (object.allowCors != null) + message.allowCors = Boolean(object.allowCors); + return message; + }; + + /** + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Endpoint + * @static + * @param {google.api.Endpoint} message Endpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Endpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aliases = []; + if (options.defaults) { + object.name = ""; + object.allowCors = false; + object.target = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.aliases && message.aliases.length) { + object.aliases = []; + for (var j = 0; j < message.aliases.length; ++j) + object.aliases[j] = message.aliases[j]; + } + if (message.allowCors != null && message.hasOwnProperty("allowCors")) + object.allowCors = message.allowCors; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + return object; + }; + + /** + * Converts this Endpoint to JSON. + * @function toJSON + * @memberof google.api.Endpoint + * @instance + * @returns {Object.} JSON object + */ + Endpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Endpoint; + })(); + + api.LogDescriptor = (function() { + + /** + * Properties of a LogDescriptor. + * @memberof google.api + * @interface ILogDescriptor + * @property {string|null} [name] LogDescriptor name + * @property {Array.|null} [labels] LogDescriptor labels + * @property {string|null} [description] LogDescriptor description + * @property {string|null} [displayName] LogDescriptor displayName + */ + + /** + * Constructs a new LogDescriptor. + * @memberof google.api + * @classdesc Represents a LogDescriptor. + * @implements ILogDescriptor + * @constructor + * @param {google.api.ILogDescriptor=} [properties] Properties to set + */ + function LogDescriptor(properties) { + this.labels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogDescriptor name. + * @member {string} name + * @memberof google.api.LogDescriptor + * @instance + */ + LogDescriptor.prototype.name = ""; + + /** + * LogDescriptor labels. + * @member {Array.} labels + * @memberof google.api.LogDescriptor + * @instance + */ + LogDescriptor.prototype.labels = $util.emptyArray; + + /** + * LogDescriptor description. + * @member {string} description + * @memberof google.api.LogDescriptor + * @instance + */ + LogDescriptor.prototype.description = ""; + + /** + * LogDescriptor displayName. + * @member {string} displayName + * @memberof google.api.LogDescriptor + * @instance + */ + LogDescriptor.prototype.displayName = ""; + + /** + * Creates a new LogDescriptor instance using the specified properties. + * @function create + * @memberof google.api.LogDescriptor + * @static + * @param {google.api.ILogDescriptor=} [properties] Properties to set + * @returns {google.api.LogDescriptor} LogDescriptor instance + */ + LogDescriptor.create = function create(properties) { + return new LogDescriptor(properties); + }; + + /** + * Encodes the specified LogDescriptor message. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.LogDescriptor + * @static + * @param {google.api.ILogDescriptor} message LogDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogDescriptor.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.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified LogDescriptor message, length delimited. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.LogDescriptor + * @static + * @param {google.api.ILogDescriptor} message LogDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.LogDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.LogDescriptor} LogDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogDescriptor.decode = function 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.LogDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.displayName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.LogDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.LogDescriptor} LogDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogDescriptor message. + * @function verify + * @memberof google.api.LogDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogDescriptor.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.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a LogDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.LogDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.LogDescriptor} LogDescriptor + */ + LogDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LogDescriptor) + return object; + var message = new $root.google.api.LogDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.LogDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.LogDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a LogDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.LogDescriptor + * @static + * @param {google.api.LogDescriptor} message LogDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this LogDescriptor to JSON. + * @function toJSON + * @memberof google.api.LogDescriptor + * @instance + * @returns {Object.} JSON object + */ + LogDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogDescriptor; + })(); + + api.Logging = (function() { + + /** + * Properties of a Logging. + * @memberof google.api + * @interface ILogging + * @property {Array.|null} [producerDestinations] Logging producerDestinations + * @property {Array.|null} [consumerDestinations] Logging consumerDestinations + */ + + /** + * Constructs a new Logging. + * @memberof google.api + * @classdesc Represents a Logging. + * @implements ILogging + * @constructor + * @param {google.api.ILogging=} [properties] Properties to set + */ + function Logging(properties) { + this.producerDestinations = []; + this.consumerDestinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Logging producerDestinations. + * @member {Array.} producerDestinations + * @memberof google.api.Logging + * @instance + */ + Logging.prototype.producerDestinations = $util.emptyArray; + + /** + * Logging consumerDestinations. + * @member {Array.} consumerDestinations + * @memberof google.api.Logging + * @instance + */ + Logging.prototype.consumerDestinations = $util.emptyArray; + + /** + * Creates a new Logging instance using the specified properties. + * @function create + * @memberof google.api.Logging + * @static + * @param {google.api.ILogging=} [properties] Properties to set + * @returns {google.api.Logging} Logging instance + */ + Logging.create = function create(properties) { + return new Logging(properties); + }; + + /** + * Encodes the specified Logging message. Does not implicitly {@link google.api.Logging.verify|verify} messages. + * @function encode + * @memberof google.api.Logging + * @static + * @param {google.api.ILogging} message Logging message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Logging.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.producerDestinations != null && message.producerDestinations.length) + for (var i = 0; i < message.producerDestinations.length; ++i) + $root.google.api.Logging.LoggingDestination.encode(message.producerDestinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consumerDestinations != null && message.consumerDestinations.length) + for (var i = 0; i < message.consumerDestinations.length; ++i) + $root.google.api.Logging.LoggingDestination.encode(message.consumerDestinations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Logging message, length delimited. Does not implicitly {@link google.api.Logging.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Logging + * @static + * @param {google.api.ILogging} message Logging message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Logging.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Logging message from the specified reader or buffer. + * @function decode + * @memberof google.api.Logging + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Logging} Logging + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Logging.decode = function 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.Logging(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.producerDestinations && message.producerDestinations.length)) + message.producerDestinations = []; + message.producerDestinations.push($root.google.api.Logging.LoggingDestination.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.consumerDestinations && message.consumerDestinations.length)) + message.consumerDestinations = []; + message.consumerDestinations.push($root.google.api.Logging.LoggingDestination.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Logging message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Logging + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Logging} Logging + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Logging.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Logging message. + * @function verify + * @memberof google.api.Logging + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Logging.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.producerDestinations != null && message.hasOwnProperty("producerDestinations")) { + if (!Array.isArray(message.producerDestinations)) + return "producerDestinations: array expected"; + for (var i = 0; i < message.producerDestinations.length; ++i) { + var error = $root.google.api.Logging.LoggingDestination.verify(message.producerDestinations[i]); + if (error) + return "producerDestinations." + error; + } + } + if (message.consumerDestinations != null && message.hasOwnProperty("consumerDestinations")) { + if (!Array.isArray(message.consumerDestinations)) + return "consumerDestinations: array expected"; + for (var i = 0; i < message.consumerDestinations.length; ++i) { + var error = $root.google.api.Logging.LoggingDestination.verify(message.consumerDestinations[i]); + if (error) + return "consumerDestinations." + error; + } + } + return null; + }; + + /** + * Creates a Logging message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Logging + * @static + * @param {Object.} object Plain object + * @returns {google.api.Logging} Logging + */ + Logging.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Logging) + return object; + var message = new $root.google.api.Logging(); + if (object.producerDestinations) { + if (!Array.isArray(object.producerDestinations)) + throw TypeError(".google.api.Logging.producerDestinations: array expected"); + message.producerDestinations = []; + for (var i = 0; i < object.producerDestinations.length; ++i) { + if (typeof object.producerDestinations[i] !== "object") + throw TypeError(".google.api.Logging.producerDestinations: object expected"); + message.producerDestinations[i] = $root.google.api.Logging.LoggingDestination.fromObject(object.producerDestinations[i]); + } + } + if (object.consumerDestinations) { + if (!Array.isArray(object.consumerDestinations)) + throw TypeError(".google.api.Logging.consumerDestinations: array expected"); + message.consumerDestinations = []; + for (var i = 0; i < object.consumerDestinations.length; ++i) { + if (typeof object.consumerDestinations[i] !== "object") + throw TypeError(".google.api.Logging.consumerDestinations: object expected"); + message.consumerDestinations[i] = $root.google.api.Logging.LoggingDestination.fromObject(object.consumerDestinations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Logging message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Logging + * @static + * @param {google.api.Logging} message Logging + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Logging.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.producerDestinations = []; + object.consumerDestinations = []; + } + if (message.producerDestinations && message.producerDestinations.length) { + object.producerDestinations = []; + for (var j = 0; j < message.producerDestinations.length; ++j) + object.producerDestinations[j] = $root.google.api.Logging.LoggingDestination.toObject(message.producerDestinations[j], options); + } + if (message.consumerDestinations && message.consumerDestinations.length) { + object.consumerDestinations = []; + for (var j = 0; j < message.consumerDestinations.length; ++j) + object.consumerDestinations[j] = $root.google.api.Logging.LoggingDestination.toObject(message.consumerDestinations[j], options); + } + return object; + }; + + /** + * Converts this Logging to JSON. + * @function toJSON + * @memberof google.api.Logging + * @instance + * @returns {Object.} JSON object + */ + Logging.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Logging.LoggingDestination = (function() { + + /** + * Properties of a LoggingDestination. + * @memberof google.api.Logging + * @interface ILoggingDestination + * @property {string|null} [monitoredResource] LoggingDestination monitoredResource + * @property {Array.|null} [logs] LoggingDestination logs + */ + + /** + * Constructs a new LoggingDestination. + * @memberof google.api.Logging + * @classdesc Represents a LoggingDestination. + * @implements ILoggingDestination + * @constructor + * @param {google.api.Logging.ILoggingDestination=} [properties] Properties to set + */ + function LoggingDestination(properties) { + this.logs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoggingDestination monitoredResource. + * @member {string} monitoredResource + * @memberof google.api.Logging.LoggingDestination + * @instance + */ + LoggingDestination.prototype.monitoredResource = ""; + + /** + * LoggingDestination logs. + * @member {Array.} logs + * @memberof google.api.Logging.LoggingDestination + * @instance + */ + LoggingDestination.prototype.logs = $util.emptyArray; + + /** + * Creates a new LoggingDestination instance using the specified properties. + * @function create + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.ILoggingDestination=} [properties] Properties to set + * @returns {google.api.Logging.LoggingDestination} LoggingDestination instance + */ + LoggingDestination.create = function create(properties) { + return new LoggingDestination(properties); + }; + + /** + * Encodes the specified LoggingDestination message. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * @function encode + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.ILoggingDestination} message LoggingDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logs != null && message.logs.length) + for (var i = 0; i < message.logs.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logs[i]); + if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.monitoredResource); + return writer; + }; + + /** + * Encodes the specified LoggingDestination message, length delimited. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.ILoggingDestination} message LoggingDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoggingDestination message from the specified reader or buffer. + * @function decode + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Logging.LoggingDestination} LoggingDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingDestination.decode = function 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.Logging.LoggingDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.monitoredResource = reader.string(); + break; + case 1: + if (!(message.logs && message.logs.length)) + message.logs = []; + message.logs.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoggingDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Logging.LoggingDestination} LoggingDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoggingDestination message. + * @function verify + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoggingDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + if (!$util.isString(message.monitoredResource)) + return "monitoredResource: string expected"; + if (message.logs != null && message.hasOwnProperty("logs")) { + if (!Array.isArray(message.logs)) + return "logs: array expected"; + for (var i = 0; i < message.logs.length; ++i) + if (!$util.isString(message.logs[i])) + return "logs: string[] expected"; + } + return null; + }; + + /** + * Creates a LoggingDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {Object.} object Plain object + * @returns {google.api.Logging.LoggingDestination} LoggingDestination + */ + LoggingDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Logging.LoggingDestination) + return object; + var message = new $root.google.api.Logging.LoggingDestination(); + if (object.monitoredResource != null) + message.monitoredResource = String(object.monitoredResource); + if (object.logs) { + if (!Array.isArray(object.logs)) + throw TypeError(".google.api.Logging.LoggingDestination.logs: array expected"); + message.logs = []; + for (var i = 0; i < object.logs.length; ++i) + message.logs[i] = String(object.logs[i]); + } + return message; + }; + + /** + * Creates a plain object from a LoggingDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.LoggingDestination} message LoggingDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoggingDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.logs = []; + if (options.defaults) + object.monitoredResource = ""; + if (message.logs && message.logs.length) { + object.logs = []; + for (var j = 0; j < message.logs.length; ++j) + object.logs[j] = message.logs[j]; + } + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + object.monitoredResource = message.monitoredResource; + return object; + }; + + /** + * Converts this LoggingDestination to JSON. + * @function toJSON + * @memberof google.api.Logging.LoggingDestination + * @instance + * @returns {Object.} JSON object + */ + LoggingDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LoggingDestination; + })(); + + return Logging; + })(); + + api.MonitoredResourceDescriptor = (function() { + + /** + * Properties of a MonitoredResourceDescriptor. + * @memberof google.api + * @interface IMonitoredResourceDescriptor + * @property {string|null} [name] MonitoredResourceDescriptor name + * @property {string|null} [type] MonitoredResourceDescriptor type + * @property {string|null} [displayName] MonitoredResourceDescriptor displayName + * @property {string|null} [description] MonitoredResourceDescriptor description + * @property {Array.|null} [labels] MonitoredResourceDescriptor labels + * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage + */ + + /** + * Constructs a new MonitoredResourceDescriptor. + * @memberof google.api + * @classdesc Represents a MonitoredResourceDescriptor. + * @implements IMonitoredResourceDescriptor + * @constructor + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + */ + function MonitoredResourceDescriptor(properties) { + this.labels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoredResourceDescriptor name. + * @member {string} name + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.name = ""; + + /** + * MonitoredResourceDescriptor type. + * @member {string} type + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.type = ""; + + /** + * MonitoredResourceDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.displayName = ""; + + /** + * MonitoredResourceDescriptor description. + * @member {string} description + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.description = ""; + + /** + * MonitoredResourceDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + + /** + * MonitoredResourceDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.launchStage = 0; + + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance + */ + MonitoredResourceDescriptor.create = function create(properties) { + return new MonitoredResourceDescriptor(properties); + }; + + /** + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceDescriptor.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.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.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); + return writer; + }; + + /** + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceDescriptor.decode = function 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.MonitoredResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.name = reader.string(); + break; + case 1: + message.type = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 7: + message.launchStage = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoredResourceDescriptor message. + * @function verify + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: 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.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + 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; + } + return null; + }; + + /** + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + */ + MonitoredResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceDescriptor) + return object; + var message = new $root.google.api.MonitoredResourceDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.launchStage) { + 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; + } + return message; + }; + + /** + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + object.type = ""; + object.displayName = ""; + object.description = ""; + object.name = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + return object; + }; + + /** + * Converts this MonitoredResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.MonitoredResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonitoredResourceDescriptor; + })(); + + api.MonitoredResource = (function() { + + /** + * Properties of a MonitoredResource. + * @memberof google.api + * @interface IMonitoredResource + * @property {string|null} [type] MonitoredResource type + * @property {Object.|null} [labels] MonitoredResource labels + */ + + /** + * Constructs a new MonitoredResource. + * @memberof google.api + * @classdesc Represents a MonitoredResource. + * @implements IMonitoredResource + * @constructor + * @param {google.api.IMonitoredResource=} [properties] Properties to set + */ + function MonitoredResource(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoredResource type. + * @member {string} type + * @memberof google.api.MonitoredResource + * @instance + */ + MonitoredResource.prototype.type = ""; + + /** + * MonitoredResource labels. + * @member {Object.} labels + * @memberof google.api.MonitoredResource + * @instance + */ + MonitoredResource.prototype.labels = $util.emptyObject; + + /** + * Creates a new MonitoredResource instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @returns {google.api.MonitoredResource} MonitoredResource instance + */ + MonitoredResource.create = function create(properties) { + return new MonitoredResource(properties); + }; + + /** + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResource.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.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), 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.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResource} MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResource.decode = function 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.MonitoredResource(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + 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; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResource} MonitoredResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoredResource message. + * @function verify + * @memberof google.api.MonitoredResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResource.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.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"; + } + return null; + }; + + /** + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResource + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResource} MonitoredResource + */ + MonitoredResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResource) + return object; + var message = new $root.google.api.MonitoredResource(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.MonitoredResource.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]]); + } + return message; + }; + + /** + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResource + * @static + * @param {google.api.MonitoredResource} message MonitoredResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + 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]]; + } + return object; + }; + + /** + * Converts this MonitoredResource to JSON. + * @function toJSON + * @memberof google.api.MonitoredResource + * @instance + * @returns {Object.} JSON object + */ + MonitoredResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonitoredResource; + })(); + + api.MonitoredResourceMetadata = (function() { + + /** + * Properties of a MonitoredResourceMetadata. + * @memberof google.api + * @interface IMonitoredResourceMetadata + * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels + * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels + */ + + /** + * Constructs a new MonitoredResourceMetadata. + * @memberof google.api + * @classdesc Represents a MonitoredResourceMetadata. + * @implements IMonitoredResourceMetadata + * @constructor + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + */ + function MonitoredResourceMetadata(properties) { + this.userLabels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoredResourceMetadata systemLabels. + * @member {google.protobuf.IStruct|null|undefined} systemLabels + * @memberof google.api.MonitoredResourceMetadata + * @instance + */ + MonitoredResourceMetadata.prototype.systemLabels = null; + + /** + * MonitoredResourceMetadata userLabels. + * @member {Object.} userLabels + * @memberof google.api.MonitoredResourceMetadata + * @instance + */ + MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; + + /** + * Creates a new MonitoredResourceMetadata instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance + */ + MonitoredResourceMetadata.create = function create(properties) { + return new MonitoredResourceMetadata(properties); + }; + + /** + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @function encode + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.systemLabels != null && Object.hasOwnProperty.call(message, "systemLabels")) + $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) + for (var keys = Object.keys(message.userLabels), 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.userLabels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceMetadata.decode = function 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.MonitoredResourceMetadata(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 2: + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + 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.userLabels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoredResourceMetadata message. + * @function verify + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoredResourceMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { + var error = $root.google.protobuf.Struct.verify(message.systemLabels); + if (error) + return "systemLabels." + error; + } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + */ + MonitoredResourceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceMetadata) + return object; + var message = new $root.google.api.MonitoredResourceMetadata(); + if (object.systemLabels != null) { + if (typeof object.systemLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); + message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoredResourceMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.userLabels = {}; + if (options.defaults) + object.systemLabels = null; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + } + return object; + }; + + /** + * Converts this MonitoredResourceMetadata to JSON. + * @function toJSON + * @memberof google.api.MonitoredResourceMetadata + * @instance + * @returns {Object.} JSON object + */ + MonitoredResourceMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonitoredResourceMetadata; + })(); + + api.Monitoring = (function() { + + /** + * Properties of a Monitoring. + * @memberof google.api + * @interface IMonitoring + * @property {Array.|null} [producerDestinations] Monitoring producerDestinations + * @property {Array.|null} [consumerDestinations] Monitoring consumerDestinations + */ + + /** + * Constructs a new Monitoring. + * @memberof google.api + * @classdesc Represents a Monitoring. + * @implements IMonitoring + * @constructor + * @param {google.api.IMonitoring=} [properties] Properties to set + */ + function Monitoring(properties) { + this.producerDestinations = []; + this.consumerDestinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Monitoring producerDestinations. + * @member {Array.} producerDestinations + * @memberof google.api.Monitoring + * @instance + */ + Monitoring.prototype.producerDestinations = $util.emptyArray; + + /** + * Monitoring consumerDestinations. + * @member {Array.} consumerDestinations + * @memberof google.api.Monitoring + * @instance + */ + Monitoring.prototype.consumerDestinations = $util.emptyArray; + + /** + * Creates a new Monitoring instance using the specified properties. + * @function create + * @memberof google.api.Monitoring + * @static + * @param {google.api.IMonitoring=} [properties] Properties to set + * @returns {google.api.Monitoring} Monitoring instance + */ + Monitoring.create = function create(properties) { + return new Monitoring(properties); + }; + + /** + * Encodes the specified Monitoring message. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. + * @function encode + * @memberof google.api.Monitoring + * @static + * @param {google.api.IMonitoring} message Monitoring message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Monitoring.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.producerDestinations != null && message.producerDestinations.length) + for (var i = 0; i < message.producerDestinations.length; ++i) + $root.google.api.Monitoring.MonitoringDestination.encode(message.producerDestinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consumerDestinations != null && message.consumerDestinations.length) + for (var i = 0; i < message.consumerDestinations.length; ++i) + $root.google.api.Monitoring.MonitoringDestination.encode(message.consumerDestinations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Monitoring message, length delimited. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Monitoring + * @static + * @param {google.api.IMonitoring} message Monitoring message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Monitoring.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Monitoring message from the specified reader or buffer. + * @function decode + * @memberof google.api.Monitoring + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Monitoring} Monitoring + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Monitoring.decode = function 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.Monitoring(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.producerDestinations && message.producerDestinations.length)) + message.producerDestinations = []; + message.producerDestinations.push($root.google.api.Monitoring.MonitoringDestination.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.consumerDestinations && message.consumerDestinations.length)) + message.consumerDestinations = []; + message.consumerDestinations.push($root.google.api.Monitoring.MonitoringDestination.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Monitoring message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Monitoring + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Monitoring} Monitoring + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Monitoring.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Monitoring message. + * @function verify + * @memberof google.api.Monitoring + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Monitoring.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.producerDestinations != null && message.hasOwnProperty("producerDestinations")) { + if (!Array.isArray(message.producerDestinations)) + return "producerDestinations: array expected"; + for (var i = 0; i < message.producerDestinations.length; ++i) { + var error = $root.google.api.Monitoring.MonitoringDestination.verify(message.producerDestinations[i]); + if (error) + return "producerDestinations." + error; + } + } + if (message.consumerDestinations != null && message.hasOwnProperty("consumerDestinations")) { + if (!Array.isArray(message.consumerDestinations)) + return "consumerDestinations: array expected"; + for (var i = 0; i < message.consumerDestinations.length; ++i) { + var error = $root.google.api.Monitoring.MonitoringDestination.verify(message.consumerDestinations[i]); + if (error) + return "consumerDestinations." + error; + } + } + return null; + }; + + /** + * Creates a Monitoring message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Monitoring + * @static + * @param {Object.} object Plain object + * @returns {google.api.Monitoring} Monitoring + */ + Monitoring.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Monitoring) + return object; + var message = new $root.google.api.Monitoring(); + if (object.producerDestinations) { + if (!Array.isArray(object.producerDestinations)) + throw TypeError(".google.api.Monitoring.producerDestinations: array expected"); + message.producerDestinations = []; + for (var i = 0; i < object.producerDestinations.length; ++i) { + if (typeof object.producerDestinations[i] !== "object") + throw TypeError(".google.api.Monitoring.producerDestinations: object expected"); + message.producerDestinations[i] = $root.google.api.Monitoring.MonitoringDestination.fromObject(object.producerDestinations[i]); + } + } + if (object.consumerDestinations) { + if (!Array.isArray(object.consumerDestinations)) + throw TypeError(".google.api.Monitoring.consumerDestinations: array expected"); + message.consumerDestinations = []; + for (var i = 0; i < object.consumerDestinations.length; ++i) { + if (typeof object.consumerDestinations[i] !== "object") + throw TypeError(".google.api.Monitoring.consumerDestinations: object expected"); + message.consumerDestinations[i] = $root.google.api.Monitoring.MonitoringDestination.fromObject(object.consumerDestinations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Monitoring message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Monitoring + * @static + * @param {google.api.Monitoring} message Monitoring + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Monitoring.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.producerDestinations = []; + object.consumerDestinations = []; + } + if (message.producerDestinations && message.producerDestinations.length) { + object.producerDestinations = []; + for (var j = 0; j < message.producerDestinations.length; ++j) + object.producerDestinations[j] = $root.google.api.Monitoring.MonitoringDestination.toObject(message.producerDestinations[j], options); + } + if (message.consumerDestinations && message.consumerDestinations.length) { + object.consumerDestinations = []; + for (var j = 0; j < message.consumerDestinations.length; ++j) + object.consumerDestinations[j] = $root.google.api.Monitoring.MonitoringDestination.toObject(message.consumerDestinations[j], options); + } + return object; + }; + + /** + * Converts this Monitoring to JSON. + * @function toJSON + * @memberof google.api.Monitoring + * @instance + * @returns {Object.} JSON object + */ + Monitoring.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Monitoring.MonitoringDestination = (function() { + + /** + * Properties of a MonitoringDestination. + * @memberof google.api.Monitoring + * @interface IMonitoringDestination + * @property {string|null} [monitoredResource] MonitoringDestination monitoredResource + * @property {Array.|null} [metrics] MonitoringDestination metrics + */ + + /** + * Constructs a new MonitoringDestination. + * @memberof google.api.Monitoring + * @classdesc Represents a MonitoringDestination. + * @implements IMonitoringDestination + * @constructor + * @param {google.api.Monitoring.IMonitoringDestination=} [properties] Properties to set + */ + function MonitoringDestination(properties) { + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoringDestination monitoredResource. + * @member {string} monitoredResource + * @memberof google.api.Monitoring.MonitoringDestination + * @instance + */ + MonitoringDestination.prototype.monitoredResource = ""; + + /** + * MonitoringDestination metrics. + * @member {Array.} metrics + * @memberof google.api.Monitoring.MonitoringDestination + * @instance + */ + MonitoringDestination.prototype.metrics = $util.emptyArray; + + /** + * Creates a new MonitoringDestination instance using the specified properties. + * @function create + * @memberof google.api.Monitoring.MonitoringDestination + * @static + * @param {google.api.Monitoring.IMonitoringDestination=} [properties] Properties to set + * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination instance + */ + MonitoringDestination.create = function create(properties) { + return new MonitoringDestination(properties); + }; + + /** + * Encodes the specified MonitoringDestination message. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. + * @function encode + * @memberof google.api.Monitoring.MonitoringDestination + * @static + * @param {google.api.Monitoring.IMonitoringDestination} message MonitoringDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.monitoredResource); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metrics[i]); + return writer; + }; + + /** + * Encodes the specified MonitoringDestination message, length delimited. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Monitoring.MonitoringDestination + * @static + * @param {google.api.Monitoring.IMonitoringDestination} message MonitoringDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoringDestination message from the specified reader or buffer. + * @function decode + * @memberof google.api.Monitoring.MonitoringDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringDestination.decode = function 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.Monitoring.MonitoringDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.monitoredResource = reader.string(); + break; + case 2: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoringDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Monitoring.MonitoringDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoringDestination message. + * @function verify + * @memberof google.api.Monitoring.MonitoringDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoringDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + if (!$util.isString(message.monitoredResource)) + return "monitoredResource: string expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) + if (!$util.isString(message.metrics[i])) + return "metrics: string[] expected"; + } + return null; + }; + + /** + * Creates a MonitoringDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Monitoring.MonitoringDestination + * @static + * @param {Object.} object Plain object + * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination + */ + MonitoringDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Monitoring.MonitoringDestination) + return object; + var message = new $root.google.api.Monitoring.MonitoringDestination(); + if (object.monitoredResource != null) + message.monitoredResource = String(object.monitoredResource); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.api.Monitoring.MonitoringDestination.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) + message.metrics[i] = String(object.metrics[i]); + } + return message; + }; + + /** + * Creates a plain object from a MonitoringDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Monitoring.MonitoringDestination + * @static + * @param {google.api.Monitoring.MonitoringDestination} message MonitoringDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoringDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) + object.monitoredResource = ""; + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + object.monitoredResource = message.monitoredResource; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = message.metrics[j]; + } + return object; + }; + + /** + * Converts this MonitoringDestination to JSON. + * @function toJSON + * @memberof google.api.Monitoring.MonitoringDestination + * @instance + * @returns {Object.} JSON object + */ + MonitoringDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonitoringDestination; + })(); + + return Monitoring; + })(); + + 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.SourceInfo = (function() { + + /** + * Properties of a SourceInfo. + * @memberof google.api + * @interface ISourceInfo + * @property {Array.|null} [sourceFiles] SourceInfo sourceFiles + */ + + /** + * Constructs a new SourceInfo. + * @memberof google.api + * @classdesc Represents a SourceInfo. + * @implements ISourceInfo + * @constructor + * @param {google.api.ISourceInfo=} [properties] Properties to set + */ + function SourceInfo(properties) { + this.sourceFiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceInfo sourceFiles. + * @member {Array.} sourceFiles + * @memberof google.api.SourceInfo + * @instance + */ + SourceInfo.prototype.sourceFiles = $util.emptyArray; + + /** + * Creates a new SourceInfo instance using the specified properties. + * @function create + * @memberof google.api.SourceInfo + * @static + * @param {google.api.ISourceInfo=} [properties] Properties to set + * @returns {google.api.SourceInfo} SourceInfo instance + */ + SourceInfo.create = function create(properties) { + return new SourceInfo(properties); + }; + + /** + * Encodes the specified SourceInfo message. Does not implicitly {@link google.api.SourceInfo.verify|verify} messages. + * @function encode + * @memberof google.api.SourceInfo + * @static + * @param {google.api.ISourceInfo} message SourceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceFiles != null && message.sourceFiles.length) + for (var i = 0; i < message.sourceFiles.length; ++i) + $root.google.protobuf.Any.encode(message.sourceFiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceInfo message, length delimited. Does not implicitly {@link google.api.SourceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SourceInfo + * @static + * @param {google.api.ISourceInfo} message SourceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.SourceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SourceInfo} SourceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceInfo.decode = function 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.SourceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sourceFiles && message.sourceFiles.length)) + message.sourceFiles = []; + message.sourceFiles.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SourceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SourceInfo} SourceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceInfo message. + * @function verify + * @memberof google.api.SourceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceFiles != null && message.hasOwnProperty("sourceFiles")) { + if (!Array.isArray(message.sourceFiles)) + return "sourceFiles: array expected"; + for (var i = 0; i < message.sourceFiles.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.sourceFiles[i]); + if (error) + return "sourceFiles." + error; + } + } + return null; + }; + + /** + * Creates a SourceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SourceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.SourceInfo} SourceInfo + */ + SourceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SourceInfo) + return object; + var message = new $root.google.api.SourceInfo(); + if (object.sourceFiles) { + if (!Array.isArray(object.sourceFiles)) + throw TypeError(".google.api.SourceInfo.sourceFiles: array expected"); + message.sourceFiles = []; + for (var i = 0; i < object.sourceFiles.length; ++i) { + if (typeof object.sourceFiles[i] !== "object") + throw TypeError(".google.api.SourceInfo.sourceFiles: object expected"); + message.sourceFiles[i] = $root.google.protobuf.Any.fromObject(object.sourceFiles[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SourceInfo + * @static + * @param {google.api.SourceInfo} message SourceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sourceFiles = []; + if (message.sourceFiles && message.sourceFiles.length) { + object.sourceFiles = []; + for (var j = 0; j < message.sourceFiles.length; ++j) + object.sourceFiles[j] = $root.google.protobuf.Any.toObject(message.sourceFiles[j], options); + } + return object; + }; + + /** + * Converts this SourceInfo to JSON. + * @function toJSON + * @memberof google.api.SourceInfo + * @instance + * @returns {Object.} JSON object + */ + SourceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SourceInfo; + })(); + + api.SystemParameters = (function() { + + /** + * Properties of a SystemParameters. + * @memberof google.api + * @interface ISystemParameters + * @property {Array.|null} [rules] SystemParameters rules + */ + + /** + * Constructs a new SystemParameters. + * @memberof google.api + * @classdesc Represents a SystemParameters. + * @implements ISystemParameters + * @constructor + * @param {google.api.ISystemParameters=} [properties] Properties to set + */ + function SystemParameters(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]]; + } + + /** + * SystemParameters rules. + * @member {Array.} rules + * @memberof google.api.SystemParameters + * @instance + */ + SystemParameters.prototype.rules = $util.emptyArray; + + /** + * Creates a new SystemParameters instance using the specified properties. + * @function create + * @memberof google.api.SystemParameters + * @static + * @param {google.api.ISystemParameters=} [properties] Properties to set + * @returns {google.api.SystemParameters} SystemParameters instance + */ + SystemParameters.create = function create(properties) { + return new SystemParameters(properties); + }; + + /** + * Encodes the specified SystemParameters message. Does not implicitly {@link google.api.SystemParameters.verify|verify} messages. + * @function encode + * @memberof google.api.SystemParameters + * @static + * @param {google.api.ISystemParameters} message SystemParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemParameters.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.SystemParameterRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SystemParameters message, length delimited. Does not implicitly {@link google.api.SystemParameters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SystemParameters + * @static + * @param {google.api.ISystemParameters} message SystemParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemParameters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SystemParameters message from the specified reader or buffer. + * @function decode + * @memberof google.api.SystemParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SystemParameters} SystemParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemParameters.decode = function 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.SystemParameters(); + 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.SystemParameterRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SystemParameters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SystemParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SystemParameters} SystemParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemParameters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SystemParameters message. + * @function verify + * @memberof google.api.SystemParameters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SystemParameters.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.SystemParameterRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates a SystemParameters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SystemParameters + * @static + * @param {Object.} object Plain object + * @returns {google.api.SystemParameters} SystemParameters + */ + SystemParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SystemParameters) + return object; + var message = new $root.google.api.SystemParameters(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.SystemParameters.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.SystemParameters.rules: object expected"); + message.rules[i] = $root.google.api.SystemParameterRule.fromObject(object.rules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SystemParameters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SystemParameters + * @static + * @param {google.api.SystemParameters} message SystemParameters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SystemParameters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.SystemParameterRule.toObject(message.rules[j], options); + } + return object; + }; + + /** + * Converts this SystemParameters to JSON. + * @function toJSON + * @memberof google.api.SystemParameters + * @instance + * @returns {Object.} JSON object + */ + SystemParameters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SystemParameters; + })(); + + api.SystemParameterRule = (function() { + + /** + * Properties of a SystemParameterRule. + * @memberof google.api + * @interface ISystemParameterRule + * @property {string|null} [selector] SystemParameterRule selector + * @property {Array.|null} [parameters] SystemParameterRule parameters + */ + + /** + * Constructs a new SystemParameterRule. + * @memberof google.api + * @classdesc Represents a SystemParameterRule. + * @implements ISystemParameterRule + * @constructor + * @param {google.api.ISystemParameterRule=} [properties] Properties to set + */ + function SystemParameterRule(properties) { + this.parameters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SystemParameterRule selector. + * @member {string} selector + * @memberof google.api.SystemParameterRule + * @instance + */ + SystemParameterRule.prototype.selector = ""; + + /** + * SystemParameterRule parameters. + * @member {Array.} parameters + * @memberof google.api.SystemParameterRule + * @instance + */ + SystemParameterRule.prototype.parameters = $util.emptyArray; + + /** + * Creates a new SystemParameterRule instance using the specified properties. + * @function create + * @memberof google.api.SystemParameterRule + * @static + * @param {google.api.ISystemParameterRule=} [properties] Properties to set + * @returns {google.api.SystemParameterRule} SystemParameterRule instance + */ + SystemParameterRule.create = function create(properties) { + return new SystemParameterRule(properties); + }; + + /** + * Encodes the specified SystemParameterRule message. Does not implicitly {@link google.api.SystemParameterRule.verify|verify} messages. + * @function encode + * @memberof google.api.SystemParameterRule + * @static + * @param {google.api.ISystemParameterRule} message SystemParameterRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemParameterRule.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.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.api.SystemParameter.encode(message.parameters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SystemParameterRule message, length delimited. Does not implicitly {@link google.api.SystemParameterRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SystemParameterRule + * @static + * @param {google.api.ISystemParameterRule} message SystemParameterRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemParameterRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SystemParameterRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.SystemParameterRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SystemParameterRule} SystemParameterRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemParameterRule.decode = function 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.SystemParameterRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.api.SystemParameter.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SystemParameterRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SystemParameterRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SystemParameterRule} SystemParameterRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemParameterRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SystemParameterRule message. + * @function verify + * @memberof google.api.SystemParameterRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SystemParameterRule.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.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.google.api.SystemParameter.verify(message.parameters[i]); + if (error) + return "parameters." + error; + } + } + return null; + }; + + /** + * Creates a SystemParameterRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SystemParameterRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.SystemParameterRule} SystemParameterRule + */ + SystemParameterRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SystemParameterRule) + return object; + var message = new $root.google.api.SystemParameterRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.api.SystemParameterRule.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".google.api.SystemParameterRule.parameters: object expected"); + message.parameters[i] = $root.google.api.SystemParameter.fromObject(object.parameters[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SystemParameterRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SystemParameterRule + * @static + * @param {google.api.SystemParameterRule} message SystemParameterRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SystemParameterRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parameters = []; + if (options.defaults) + object.selector = ""; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.api.SystemParameter.toObject(message.parameters[j], options); + } + return object; + }; + + /** + * Converts this SystemParameterRule to JSON. + * @function toJSON + * @memberof google.api.SystemParameterRule + * @instance + * @returns {Object.} JSON object + */ + SystemParameterRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SystemParameterRule; + })(); + + api.SystemParameter = (function() { + + /** + * Properties of a SystemParameter. + * @memberof google.api + * @interface ISystemParameter + * @property {string|null} [name] SystemParameter name + * @property {string|null} [httpHeader] SystemParameter httpHeader + * @property {string|null} [urlQueryParameter] SystemParameter urlQueryParameter + */ + + /** + * Constructs a new SystemParameter. + * @memberof google.api + * @classdesc Represents a SystemParameter. + * @implements ISystemParameter + * @constructor + * @param {google.api.ISystemParameter=} [properties] Properties to set + */ + function SystemParameter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SystemParameter name. + * @member {string} name + * @memberof google.api.SystemParameter + * @instance + */ + SystemParameter.prototype.name = ""; + + /** + * SystemParameter httpHeader. + * @member {string} httpHeader + * @memberof google.api.SystemParameter + * @instance + */ + SystemParameter.prototype.httpHeader = ""; + + /** + * SystemParameter urlQueryParameter. + * @member {string} urlQueryParameter + * @memberof google.api.SystemParameter + * @instance + */ + SystemParameter.prototype.urlQueryParameter = ""; + + /** + * Creates a new SystemParameter instance using the specified properties. + * @function create + * @memberof google.api.SystemParameter + * @static + * @param {google.api.ISystemParameter=} [properties] Properties to set + * @returns {google.api.SystemParameter} SystemParameter instance + */ + SystemParameter.create = function create(properties) { + return new SystemParameter(properties); + }; + + /** + * Encodes the specified SystemParameter message. Does not implicitly {@link google.api.SystemParameter.verify|verify} messages. + * @function encode + * @memberof google.api.SystemParameter + * @static + * @param {google.api.ISystemParameter} message SystemParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemParameter.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.httpHeader != null && Object.hasOwnProperty.call(message, "httpHeader")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.httpHeader); + if (message.urlQueryParameter != null && Object.hasOwnProperty.call(message, "urlQueryParameter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.urlQueryParameter); + return writer; + }; + + /** + * Encodes the specified SystemParameter message, length delimited. Does not implicitly {@link google.api.SystemParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SystemParameter + * @static + * @param {google.api.ISystemParameter} message SystemParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SystemParameter message from the specified reader or buffer. + * @function decode + * @memberof google.api.SystemParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SystemParameter} SystemParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemParameter.decode = function 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.SystemParameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.httpHeader = reader.string(); + break; + case 3: + message.urlQueryParameter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SystemParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SystemParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SystemParameter} SystemParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SystemParameter message. + * @function verify + * @memberof google.api.SystemParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SystemParameter.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.httpHeader != null && message.hasOwnProperty("httpHeader")) + if (!$util.isString(message.httpHeader)) + return "httpHeader: string expected"; + if (message.urlQueryParameter != null && message.hasOwnProperty("urlQueryParameter")) + if (!$util.isString(message.urlQueryParameter)) + return "urlQueryParameter: string expected"; + return null; + }; + + /** + * Creates a SystemParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SystemParameter + * @static + * @param {Object.} object Plain object + * @returns {google.api.SystemParameter} SystemParameter + */ + SystemParameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SystemParameter) + return object; + var message = new $root.google.api.SystemParameter(); + if (object.name != null) + message.name = String(object.name); + if (object.httpHeader != null) + message.httpHeader = String(object.httpHeader); + if (object.urlQueryParameter != null) + message.urlQueryParameter = String(object.urlQueryParameter); + return message; + }; + + /** + * Creates a plain object from a SystemParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SystemParameter + * @static + * @param {google.api.SystemParameter} message SystemParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SystemParameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.httpHeader = ""; + object.urlQueryParameter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.httpHeader != null && message.hasOwnProperty("httpHeader")) + object.httpHeader = message.httpHeader; + if (message.urlQueryParameter != null && message.hasOwnProperty("urlQueryParameter")) + object.urlQueryParameter = message.urlQueryParameter; + return object; + }; + + /** + * Converts this SystemParameter to JSON. + * @function toJSON + * @memberof google.api.SystemParameter + * @instance + * @returns {Object.} JSON object + */ + SystemParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SystemParameter; + })(); + + api.Usage = (function() { + + /** + * Properties of a Usage. + * @memberof google.api + * @interface IUsage + * @property {Array.|null} [requirements] Usage requirements + * @property {Array.|null} [rules] Usage rules + * @property {string|null} [producerNotificationChannel] Usage producerNotificationChannel + */ + + /** + * Constructs a new Usage. + * @memberof google.api + * @classdesc Represents a Usage. + * @implements IUsage + * @constructor + * @param {google.api.IUsage=} [properties] Properties to set + */ + function Usage(properties) { + this.requirements = []; + 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]]; + } + + /** + * Usage requirements. + * @member {Array.} requirements + * @memberof google.api.Usage + * @instance + */ + Usage.prototype.requirements = $util.emptyArray; + + /** + * Usage rules. + * @member {Array.} rules + * @memberof google.api.Usage + * @instance + */ + Usage.prototype.rules = $util.emptyArray; + + /** + * Usage producerNotificationChannel. + * @member {string} producerNotificationChannel + * @memberof google.api.Usage + * @instance + */ + Usage.prototype.producerNotificationChannel = ""; + + /** + * Creates a new Usage instance using the specified properties. + * @function create + * @memberof google.api.Usage + * @static + * @param {google.api.IUsage=} [properties] Properties to set + * @returns {google.api.Usage} Usage instance + */ + Usage.create = function create(properties) { + return new Usage(properties); + }; + + /** + * Encodes the specified Usage message. Does not implicitly {@link google.api.Usage.verify|verify} messages. + * @function encode + * @memberof google.api.Usage + * @static + * @param {google.api.IUsage} message Usage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Usage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requirements != null && message.requirements.length) + for (var i = 0; i < message.requirements.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requirements[i]); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.UsageRule.encode(message.rules[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.producerNotificationChannel != null && Object.hasOwnProperty.call(message, "producerNotificationChannel")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.producerNotificationChannel); + return writer; + }; + + /** + * Encodes the specified Usage message, length delimited. Does not implicitly {@link google.api.Usage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Usage + * @static + * @param {google.api.IUsage} message Usage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Usage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Usage message from the specified reader or buffer. + * @function decode + * @memberof google.api.Usage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Usage} Usage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Usage.decode = function 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.Usage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.requirements && message.requirements.length)) + message.requirements = []; + message.requirements.push(reader.string()); + break; + case 6: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.UsageRule.decode(reader, reader.uint32())); + break; + case 7: + message.producerNotificationChannel = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Usage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Usage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Usage} Usage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Usage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Usage message. + * @function verify + * @memberof google.api.Usage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Usage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requirements != null && message.hasOwnProperty("requirements")) { + if (!Array.isArray(message.requirements)) + return "requirements: array expected"; + for (var i = 0; i < message.requirements.length; ++i) + if (!$util.isString(message.requirements[i])) + return "requirements: string[] expected"; + } + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.UsageRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.producerNotificationChannel != null && message.hasOwnProperty("producerNotificationChannel")) + if (!$util.isString(message.producerNotificationChannel)) + return "producerNotificationChannel: string expected"; + return null; + }; + + /** + * Creates a Usage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Usage + * @static + * @param {Object.} object Plain object + * @returns {google.api.Usage} Usage + */ + Usage.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Usage) + return object; + var message = new $root.google.api.Usage(); + if (object.requirements) { + if (!Array.isArray(object.requirements)) + throw TypeError(".google.api.Usage.requirements: array expected"); + message.requirements = []; + for (var i = 0; i < object.requirements.length; ++i) + message.requirements[i] = String(object.requirements[i]); + } + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Usage.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Usage.rules: object expected"); + message.rules[i] = $root.google.api.UsageRule.fromObject(object.rules[i]); + } + } + if (object.producerNotificationChannel != null) + message.producerNotificationChannel = String(object.producerNotificationChannel); + return message; + }; + + /** + * Creates a plain object from a Usage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Usage + * @static + * @param {google.api.Usage} message Usage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Usage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.requirements = []; + object.rules = []; + } + if (options.defaults) + object.producerNotificationChannel = ""; + if (message.requirements && message.requirements.length) { + object.requirements = []; + for (var j = 0; j < message.requirements.length; ++j) + object.requirements[j] = message.requirements[j]; + } + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.UsageRule.toObject(message.rules[j], options); + } + if (message.producerNotificationChannel != null && message.hasOwnProperty("producerNotificationChannel")) + object.producerNotificationChannel = message.producerNotificationChannel; + return object; + }; + + /** + * Converts this Usage to JSON. + * @function toJSON + * @memberof google.api.Usage + * @instance + * @returns {Object.} JSON object + */ + Usage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Usage; + })(); + + api.UsageRule = (function() { + + /** + * Properties of a UsageRule. + * @memberof google.api + * @interface IUsageRule + * @property {string|null} [selector] UsageRule selector + * @property {boolean|null} [allowUnregisteredCalls] UsageRule allowUnregisteredCalls + * @property {boolean|null} [skipServiceControl] UsageRule skipServiceControl + */ + + /** + * Constructs a new UsageRule. + * @memberof google.api + * @classdesc Represents a UsageRule. + * @implements IUsageRule + * @constructor + * @param {google.api.IUsageRule=} [properties] Properties to set + */ + function UsageRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UsageRule selector. + * @member {string} selector + * @memberof google.api.UsageRule + * @instance + */ + UsageRule.prototype.selector = ""; + + /** + * UsageRule allowUnregisteredCalls. + * @member {boolean} allowUnregisteredCalls + * @memberof google.api.UsageRule + * @instance + */ + UsageRule.prototype.allowUnregisteredCalls = false; + + /** + * UsageRule skipServiceControl. + * @member {boolean} skipServiceControl + * @memberof google.api.UsageRule + * @instance + */ + UsageRule.prototype.skipServiceControl = false; + + /** + * Creates a new UsageRule instance using the specified properties. + * @function create + * @memberof google.api.UsageRule + * @static + * @param {google.api.IUsageRule=} [properties] Properties to set + * @returns {google.api.UsageRule} UsageRule instance + */ + UsageRule.create = function create(properties) { + return new UsageRule(properties); + }; + + /** + * Encodes the specified UsageRule message. Does not implicitly {@link google.api.UsageRule.verify|verify} messages. + * @function encode + * @memberof google.api.UsageRule + * @static + * @param {google.api.IUsageRule} message UsageRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsageRule.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.allowUnregisteredCalls != null && Object.hasOwnProperty.call(message, "allowUnregisteredCalls")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowUnregisteredCalls); + if (message.skipServiceControl != null && Object.hasOwnProperty.call(message, "skipServiceControl")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.skipServiceControl); + return writer; + }; + + /** + * Encodes the specified UsageRule message, length delimited. Does not implicitly {@link google.api.UsageRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.UsageRule + * @static + * @param {google.api.IUsageRule} message UsageRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsageRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UsageRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.UsageRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.UsageRule} UsageRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsageRule.decode = function 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.UsageRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.allowUnregisteredCalls = reader.bool(); + break; + case 3: + message.skipServiceControl = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UsageRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.UsageRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.UsageRule} UsageRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsageRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UsageRule message. + * @function verify + * @memberof google.api.UsageRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UsageRule.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.allowUnregisteredCalls != null && message.hasOwnProperty("allowUnregisteredCalls")) + if (typeof message.allowUnregisteredCalls !== "boolean") + return "allowUnregisteredCalls: boolean expected"; + if (message.skipServiceControl != null && message.hasOwnProperty("skipServiceControl")) + if (typeof message.skipServiceControl !== "boolean") + return "skipServiceControl: boolean expected"; + return null; + }; + + /** + * Creates a UsageRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.UsageRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.UsageRule} UsageRule + */ + UsageRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.UsageRule) + return object; + var message = new $root.google.api.UsageRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.allowUnregisteredCalls != null) + message.allowUnregisteredCalls = Boolean(object.allowUnregisteredCalls); + if (object.skipServiceControl != null) + message.skipServiceControl = Boolean(object.skipServiceControl); + return message; + }; + + /** + * Creates a plain object from a UsageRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.UsageRule + * @static + * @param {google.api.UsageRule} message UsageRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UsageRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selector = ""; + object.allowUnregisteredCalls = false; + object.skipServiceControl = false; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.allowUnregisteredCalls != null && message.hasOwnProperty("allowUnregisteredCalls")) + object.allowUnregisteredCalls = message.allowUnregisteredCalls; + if (message.skipServiceControl != null && message.hasOwnProperty("skipServiceControl")) + object.skipServiceControl = message.skipServiceControl; + return object; + }; + + /** + * Converts this UsageRule to JSON. + * @function toJSON + * @memberof google.api.UsageRule + * @instance + * @returns {Object.} JSON object + */ + UsageRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UsageRule; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.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.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ + + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function 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.Struct(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.protobuf.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Struct; + })(); + + protobuf.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ + + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value nullValue. + * @member {google.protobuf.NullValue} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = 0; + + /** + * Value numberValue. + * @member {number} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = 0; + + /** + * Value stringValue. + * @member {string} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = ""; + + /** + * Value boolValue. + * @member {boolean} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = false; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function 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.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.nullValue = reader.int32(); + break; + case 2: + message.numberValue = reader.double(); + break; + case 3: + message.stringValue = reader.string(); + break; + case 4: + message.boolValue = reader.bool(); + break; + case 5: + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 6: + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.protobuf.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) + return object; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.protobuf.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Value; + })(); + + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { + + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ + + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; + + /** + * Creates a new ListValue instance using the specified properties. + * @function create + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decode = function 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.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListValue message. + * @function verify + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object + */ + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListValue; + })(); + + 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.Api = (function() { + + /** + * Properties of an Api. + * @memberof google.protobuf + * @interface IApi + * @property {string|null} [name] Api name + * @property {Array.|null} [methods] Api methods + * @property {Array.|null} [options] Api options + * @property {string|null} [version] Api version + * @property {google.protobuf.ISourceContext|null} [sourceContext] Api sourceContext + * @property {Array.|null} [mixins] Api mixins + * @property {google.protobuf.Syntax|null} [syntax] Api syntax + */ + + /** + * Constructs a new Api. + * @memberof google.protobuf + * @classdesc Represents an Api. + * @implements IApi + * @constructor + * @param {google.protobuf.IApi=} [properties] Properties to set + */ + function Api(properties) { + this.methods = []; + this.options = []; + this.mixins = []; + if (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.protobuf.Api + * @instance + */ + Api.prototype.name = ""; + + /** + * Api methods. + * @member {Array.} methods + * @memberof google.protobuf.Api + * @instance + */ + Api.prototype.methods = $util.emptyArray; + + /** + * Api options. + * @member {Array.} options + * @memberof google.protobuf.Api + * @instance + */ + Api.prototype.options = $util.emptyArray; + + /** + * Api version. + * @member {string} version + * @memberof google.protobuf.Api + * @instance + */ + Api.prototype.version = ""; + + /** + * Api sourceContext. + * @member {google.protobuf.ISourceContext|null|undefined} sourceContext + * @memberof google.protobuf.Api + * @instance + */ + Api.prototype.sourceContext = null; + + /** + * Api mixins. + * @member {Array.} mixins + * @memberof google.protobuf.Api + * @instance + */ + Api.prototype.mixins = $util.emptyArray; + + /** + * Api syntax. + * @member {google.protobuf.Syntax} syntax + * @memberof google.protobuf.Api + * @instance + */ + Api.prototype.syntax = 0; + + /** + * Creates a new Api instance using the specified properties. + * @function create + * @memberof google.protobuf.Api + * @static + * @param {google.protobuf.IApi=} [properties] Properties to set + * @returns {google.protobuf.Api} Api instance + */ + Api.create = function create(properties) { + return new Api(properties); + }; + + /** + * Encodes the specified Api message. Does not implicitly {@link google.protobuf.Api.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Api + * @static + * @param {google.protobuf.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.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + $root.google.protobuf.Method.encode(message.methods[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && message.options.length) + for (var i = 0; i < message.options.length; ++i) + $root.google.protobuf.Option.encode(message.options[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); + if (message.sourceContext != null && Object.hasOwnProperty.call(message, "sourceContext")) + $root.google.protobuf.SourceContext.encode(message.sourceContext, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.mixins != null && message.mixins.length) + for (var i = 0; i < message.mixins.length; ++i) + $root.google.protobuf.Mixin.encode(message.mixins[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.syntax); + return writer; + }; + + /** + * Encodes the specified Api message, length delimited. Does not implicitly {@link google.protobuf.Api.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Api + * @static + * @param {google.protobuf.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.protobuf.Api + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.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.protobuf.Api(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push($root.google.protobuf.Method.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + case 4: + message.version = reader.string(); + break; + case 5: + message.sourceContext = $root.google.protobuf.SourceContext.decode(reader, reader.uint32()); + break; + case 6: + if (!(message.mixins && message.mixins.length)) + message.mixins = []; + message.mixins.push($root.google.protobuf.Mixin.decode(reader, reader.uint32())); + break; + case 7: + message.syntax = reader.int32(); + 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.protobuf.Api + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.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.protobuf.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.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) { + var error = $root.google.protobuf.Method.verify(message.methods[i]); + if (error) + return "methods." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + if (!Array.isArray(message.options)) + return "options: array expected"; + for (var i = 0; i < message.options.length; ++i) { + var error = $root.google.protobuf.Option.verify(message.options[i]); + if (error) + return "options." + error; + } + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.sourceContext != null && message.hasOwnProperty("sourceContext")) { + var error = $root.google.protobuf.SourceContext.verify(message.sourceContext); + if (error) + return "sourceContext." + error; + } + if (message.mixins != null && message.hasOwnProperty("mixins")) { + if (!Array.isArray(message.mixins)) + return "mixins: array expected"; + for (var i = 0; i < message.mixins.length; ++i) { + var error = $root.google.protobuf.Mixin.verify(message.mixins[i]); + if (error) + return "mixins." + error; + } + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + switch (message.syntax) { + default: + return "syntax: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an Api message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Api + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Api} Api + */ + Api.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Api) + return object; + var message = new $root.google.protobuf.Api(); + if (object.name != null) + message.name = String(object.name); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.protobuf.Api.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) { + if (typeof object.methods[i] !== "object") + throw TypeError(".google.protobuf.Api.methods: object expected"); + message.methods[i] = $root.google.protobuf.Method.fromObject(object.methods[i]); + } + } + if (object.options) { + if (!Array.isArray(object.options)) + throw TypeError(".google.protobuf.Api.options: array expected"); + message.options = []; + for (var i = 0; i < object.options.length; ++i) { + if (typeof object.options[i] !== "object") + throw TypeError(".google.protobuf.Api.options: object expected"); + message.options[i] = $root.google.protobuf.Option.fromObject(object.options[i]); + } + } + if (object.version != null) + message.version = String(object.version); + if (object.sourceContext != null) { + if (typeof object.sourceContext !== "object") + throw TypeError(".google.protobuf.Api.sourceContext: object expected"); + message.sourceContext = $root.google.protobuf.SourceContext.fromObject(object.sourceContext); + } + if (object.mixins) { + if (!Array.isArray(object.mixins)) + throw TypeError(".google.protobuf.Api.mixins: array expected"); + message.mixins = []; + for (var i = 0; i < object.mixins.length; ++i) { + if (typeof object.mixins[i] !== "object") + throw TypeError(".google.protobuf.Api.mixins: object expected"); + message.mixins[i] = $root.google.protobuf.Mixin.fromObject(object.mixins[i]); + } + } + switch (object.syntax) { + case "SYNTAX_PROTO2": + case 0: + message.syntax = 0; + break; + case "SYNTAX_PROTO3": + case 1: + message.syntax = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an Api message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Api + * @static + * @param {google.protobuf.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.arrays || options.defaults) { + object.methods = []; + object.options = []; + object.mixins = []; + } + if (options.defaults) { + object.name = ""; + object.version = ""; + object.sourceContext = null; + object.syntax = options.enums === String ? "SYNTAX_PROTO2" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = $root.google.protobuf.Method.toObject(message.methods[j], options); + } + if (message.options && message.options.length) { + object.options = []; + for (var j = 0; j < message.options.length; ++j) + object.options[j] = $root.google.protobuf.Option.toObject(message.options[j], options); + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.sourceContext != null && message.hasOwnProperty("sourceContext")) + object.sourceContext = $root.google.protobuf.SourceContext.toObject(message.sourceContext, options); + if (message.mixins && message.mixins.length) { + object.mixins = []; + for (var j = 0; j < message.mixins.length; ++j) + object.mixins[j] = $root.google.protobuf.Mixin.toObject(message.mixins[j], options); + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] : message.syntax; + return object; + }; + + /** + * Converts this Api to JSON. + * @function toJSON + * @memberof google.protobuf.Api + * @instance + * @returns {Object.} JSON object + */ + Api.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Api; + })(); + + protobuf.Method = (function() { + + /** + * Properties of a Method. + * @memberof google.protobuf + * @interface IMethod + * @property {string|null} [name] Method name + * @property {string|null} [requestTypeUrl] Method requestTypeUrl + * @property {boolean|null} [requestStreaming] Method requestStreaming + * @property {string|null} [responseTypeUrl] Method responseTypeUrl + * @property {boolean|null} [responseStreaming] Method responseStreaming + * @property {Array.|null} [options] Method options + * @property {google.protobuf.Syntax|null} [syntax] Method syntax + */ + + /** + * Constructs a new Method. + * @memberof google.protobuf + * @classdesc Represents a Method. + * @implements IMethod + * @constructor + * @param {google.protobuf.IMethod=} [properties] Properties to set + */ + function Method(properties) { + this.options = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Method name. + * @member {string} name + * @memberof google.protobuf.Method + * @instance + */ + Method.prototype.name = ""; + + /** + * Method requestTypeUrl. + * @member {string} requestTypeUrl + * @memberof google.protobuf.Method + * @instance + */ + Method.prototype.requestTypeUrl = ""; + + /** + * Method requestStreaming. + * @member {boolean} requestStreaming + * @memberof google.protobuf.Method + * @instance + */ + Method.prototype.requestStreaming = false; + + /** + * Method responseTypeUrl. + * @member {string} responseTypeUrl + * @memberof google.protobuf.Method + * @instance + */ + Method.prototype.responseTypeUrl = ""; + + /** + * Method responseStreaming. + * @member {boolean} responseStreaming + * @memberof google.protobuf.Method + * @instance + */ + Method.prototype.responseStreaming = false; + + /** + * Method options. + * @member {Array.} options + * @memberof google.protobuf.Method + * @instance + */ + Method.prototype.options = $util.emptyArray; + + /** + * Method syntax. + * @member {google.protobuf.Syntax} syntax + * @memberof google.protobuf.Method + * @instance + */ + Method.prototype.syntax = 0; + + /** + * Creates a new Method instance using the specified properties. + * @function create + * @memberof google.protobuf.Method + * @static + * @param {google.protobuf.IMethod=} [properties] Properties to set + * @returns {google.protobuf.Method} Method instance + */ + Method.create = function create(properties) { + return new Method(properties); + }; + + /** + * Encodes the specified Method message. Does not implicitly {@link google.protobuf.Method.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Method + * @static + * @param {google.protobuf.IMethod} message Method message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Method.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.requestTypeUrl != null && Object.hasOwnProperty.call(message, "requestTypeUrl")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestTypeUrl); + if (message.requestStreaming != null && Object.hasOwnProperty.call(message, "requestStreaming")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.requestStreaming); + if (message.responseTypeUrl != null && Object.hasOwnProperty.call(message, "responseTypeUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.responseTypeUrl); + if (message.responseStreaming != null && Object.hasOwnProperty.call(message, "responseStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.responseStreaming); + if (message.options != null && message.options.length) + for (var i = 0; i < message.options.length; ++i) + $root.google.protobuf.Option.encode(message.options[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.syntax); + return writer; + }; + + /** + * Encodes the specified Method message, length delimited. Does not implicitly {@link google.protobuf.Method.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Method + * @static + * @param {google.protobuf.IMethod} message Method message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Method.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Method message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Method + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Method} Method + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Method.decode = function 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.Method(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestTypeUrl = reader.string(); + break; + case 3: + message.requestStreaming = reader.bool(); + break; + case 4: + message.responseTypeUrl = reader.string(); + break; + case 5: + message.responseStreaming = reader.bool(); + break; + case 6: + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + case 7: + message.syntax = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Method message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Method + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Method} Method + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Method.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Method message. + * @function verify + * @memberof google.protobuf.Method + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Method.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.requestTypeUrl != null && message.hasOwnProperty("requestTypeUrl")) + if (!$util.isString(message.requestTypeUrl)) + return "requestTypeUrl: string expected"; + if (message.requestStreaming != null && message.hasOwnProperty("requestStreaming")) + if (typeof message.requestStreaming !== "boolean") + return "requestStreaming: boolean expected"; + if (message.responseTypeUrl != null && message.hasOwnProperty("responseTypeUrl")) + if (!$util.isString(message.responseTypeUrl)) + return "responseTypeUrl: string expected"; + if (message.responseStreaming != null && message.hasOwnProperty("responseStreaming")) + if (typeof message.responseStreaming !== "boolean") + return "responseStreaming: boolean expected"; + if (message.options != null && message.hasOwnProperty("options")) { + if (!Array.isArray(message.options)) + return "options: array expected"; + for (var i = 0; i < message.options.length; ++i) { + var error = $root.google.protobuf.Option.verify(message.options[i]); + if (error) + return "options." + error; + } + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + switch (message.syntax) { + default: + return "syntax: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a Method message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Method + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Method} Method + */ + Method.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Method) + return object; + var message = new $root.google.protobuf.Method(); + if (object.name != null) + message.name = String(object.name); + if (object.requestTypeUrl != null) + message.requestTypeUrl = String(object.requestTypeUrl); + if (object.requestStreaming != null) + message.requestStreaming = Boolean(object.requestStreaming); + if (object.responseTypeUrl != null) + message.responseTypeUrl = String(object.responseTypeUrl); + if (object.responseStreaming != null) + message.responseStreaming = Boolean(object.responseStreaming); + if (object.options) { + if (!Array.isArray(object.options)) + throw TypeError(".google.protobuf.Method.options: array expected"); + message.options = []; + for (var i = 0; i < object.options.length; ++i) { + if (typeof object.options[i] !== "object") + throw TypeError(".google.protobuf.Method.options: object expected"); + message.options[i] = $root.google.protobuf.Option.fromObject(object.options[i]); + } + } + switch (object.syntax) { + case "SYNTAX_PROTO2": + case 0: + message.syntax = 0; + break; + case "SYNTAX_PROTO3": + case 1: + message.syntax = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a Method message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Method + * @static + * @param {google.protobuf.Method} message Method + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Method.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.options = []; + if (options.defaults) { + object.name = ""; + object.requestTypeUrl = ""; + object.requestStreaming = false; + object.responseTypeUrl = ""; + object.responseStreaming = false; + object.syntax = options.enums === String ? "SYNTAX_PROTO2" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestTypeUrl != null && message.hasOwnProperty("requestTypeUrl")) + object.requestTypeUrl = message.requestTypeUrl; + if (message.requestStreaming != null && message.hasOwnProperty("requestStreaming")) + object.requestStreaming = message.requestStreaming; + if (message.responseTypeUrl != null && message.hasOwnProperty("responseTypeUrl")) + object.responseTypeUrl = message.responseTypeUrl; + if (message.responseStreaming != null && message.hasOwnProperty("responseStreaming")) + object.responseStreaming = message.responseStreaming; + if (message.options && message.options.length) { + object.options = []; + for (var j = 0; j < message.options.length; ++j) + object.options[j] = $root.google.protobuf.Option.toObject(message.options[j], options); + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] : message.syntax; + return object; + }; + + /** + * Converts this Method to JSON. + * @function toJSON + * @memberof google.protobuf.Method + * @instance + * @returns {Object.} JSON object + */ + Method.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Method; + })(); + + protobuf.Mixin = (function() { + + /** + * Properties of a Mixin. + * @memberof google.protobuf + * @interface IMixin + * @property {string|null} [name] Mixin name + * @property {string|null} [root] Mixin root + */ + + /** + * Constructs a new Mixin. + * @memberof google.protobuf + * @classdesc Represents a Mixin. + * @implements IMixin + * @constructor + * @param {google.protobuf.IMixin=} [properties] Properties to set + */ + function Mixin(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Mixin name. + * @member {string} name + * @memberof google.protobuf.Mixin + * @instance + */ + Mixin.prototype.name = ""; + + /** + * Mixin root. + * @member {string} root + * @memberof google.protobuf.Mixin + * @instance + */ + Mixin.prototype.root = ""; + + /** + * Creates a new Mixin instance using the specified properties. + * @function create + * @memberof google.protobuf.Mixin + * @static + * @param {google.protobuf.IMixin=} [properties] Properties to set + * @returns {google.protobuf.Mixin} Mixin instance + */ + Mixin.create = function create(properties) { + return new Mixin(properties); + }; + + /** + * Encodes the specified Mixin message. Does not implicitly {@link google.protobuf.Mixin.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Mixin + * @static + * @param {google.protobuf.IMixin} message Mixin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Mixin.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.root != null && Object.hasOwnProperty.call(message, "root")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.root); + return writer; + }; + + /** + * Encodes the specified Mixin message, length delimited. Does not implicitly {@link google.protobuf.Mixin.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Mixin + * @static + * @param {google.protobuf.IMixin} message Mixin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Mixin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Mixin message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Mixin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Mixin} Mixin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Mixin.decode = function 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.Mixin(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.root = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Mixin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Mixin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Mixin} Mixin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Mixin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Mixin message. + * @function verify + * @memberof google.protobuf.Mixin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Mixin.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.root != null && message.hasOwnProperty("root")) + if (!$util.isString(message.root)) + return "root: string expected"; + return null; + }; + + /** + * Creates a Mixin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Mixin + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Mixin} Mixin + */ + Mixin.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Mixin) + return object; + var message = new $root.google.protobuf.Mixin(); + if (object.name != null) + message.name = String(object.name); + if (object.root != null) + message.root = String(object.root); + return message; + }; + + /** + * Creates a plain object from a Mixin message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Mixin + * @static + * @param {google.protobuf.Mixin} message Mixin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Mixin.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.root = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.root != null && message.hasOwnProperty("root")) + object.root = message.root; + return object; + }; + + /** + * Converts this Mixin to JSON. + * @function toJSON + * @memberof google.protobuf.Mixin + * @instance + * @returns {Object.} JSON object + */ + Mixin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Mixin; + })(); + + protobuf.SourceContext = (function() { + + /** + * Properties of a SourceContext. + * @memberof google.protobuf + * @interface ISourceContext + * @property {string|null} [fileName] SourceContext fileName + */ + + /** + * Constructs a new SourceContext. + * @memberof google.protobuf + * @classdesc Represents a SourceContext. + * @implements ISourceContext + * @constructor + * @param {google.protobuf.ISourceContext=} [properties] Properties to set + */ + function SourceContext(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceContext fileName. + * @member {string} fileName + * @memberof google.protobuf.SourceContext + * @instance + */ + SourceContext.prototype.fileName = ""; + + /** + * Creates a new SourceContext instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceContext + * @static + * @param {google.protobuf.ISourceContext=} [properties] Properties to set + * @returns {google.protobuf.SourceContext} SourceContext instance + */ + SourceContext.create = function create(properties) { + return new SourceContext(properties); + }; + + /** + * Encodes the specified SourceContext message. Does not implicitly {@link google.protobuf.SourceContext.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceContext + * @static + * @param {google.protobuf.ISourceContext} message SourceContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceContext.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileName); + return writer; + }; + + /** + * Encodes the specified SourceContext message, length delimited. Does not implicitly {@link google.protobuf.SourceContext.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceContext + * @static + * @param {google.protobuf.ISourceContext} message SourceContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceContext.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceContext message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceContext} SourceContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceContext.decode = function 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.SourceContext(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fileName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceContext message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceContext} SourceContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceContext.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceContext message. + * @function verify + * @memberof google.protobuf.SourceContext + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceContext.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileName != null && message.hasOwnProperty("fileName")) + if (!$util.isString(message.fileName)) + return "fileName: string expected"; + return null; + }; + + /** + * Creates a SourceContext message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceContext + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceContext} SourceContext + */ + SourceContext.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceContext) + return object; + var message = new $root.google.protobuf.SourceContext(); + if (object.fileName != null) + message.fileName = String(object.fileName); + return message; + }; + + /** + * Creates a plain object from a SourceContext message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceContext + * @static + * @param {google.protobuf.SourceContext} message SourceContext + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceContext.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fileName = ""; + if (message.fileName != null && message.hasOwnProperty("fileName")) + object.fileName = message.fileName; + return object; + }; + + /** + * Converts this SourceContext to JSON. + * @function toJSON + * @memberof google.protobuf.SourceContext + * @instance + * @returns {Object.} JSON object + */ + SourceContext.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SourceContext; + })(); + + protobuf.Type = (function() { + + /** + * Properties of a Type. + * @memberof google.protobuf + * @interface IType + * @property {string|null} [name] Type name + * @property {Array.|null} [fields] Type fields + * @property {Array.|null} [oneofs] Type oneofs + * @property {Array.|null} [options] Type options + * @property {google.protobuf.ISourceContext|null} [sourceContext] Type sourceContext + * @property {google.protobuf.Syntax|null} [syntax] Type syntax + */ + + /** + * Constructs a new Type. + * @memberof google.protobuf + * @classdesc Represents a Type. + * @implements IType + * @constructor + * @param {google.protobuf.IType=} [properties] Properties to set + */ + function Type(properties) { + this.fields = []; + this.oneofs = []; + this.options = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Type name. + * @member {string} name + * @memberof google.protobuf.Type + * @instance + */ + Type.prototype.name = ""; + + /** + * Type fields. + * @member {Array.} fields + * @memberof google.protobuf.Type + * @instance + */ + Type.prototype.fields = $util.emptyArray; + + /** + * Type oneofs. + * @member {Array.} oneofs + * @memberof google.protobuf.Type + * @instance + */ + Type.prototype.oneofs = $util.emptyArray; + + /** + * Type options. + * @member {Array.} options + * @memberof google.protobuf.Type + * @instance + */ + Type.prototype.options = $util.emptyArray; + + /** + * Type sourceContext. + * @member {google.protobuf.ISourceContext|null|undefined} sourceContext + * @memberof google.protobuf.Type + * @instance + */ + Type.prototype.sourceContext = null; + + /** + * Type syntax. + * @member {google.protobuf.Syntax} syntax + * @memberof google.protobuf.Type + * @instance + */ + Type.prototype.syntax = 0; + + /** + * Creates a new Type instance using the specified properties. + * @function create + * @memberof google.protobuf.Type + * @static + * @param {google.protobuf.IType=} [properties] Properties to set + * @returns {google.protobuf.Type} Type instance + */ + Type.create = function create(properties) { + return new Type(properties); + }; + + /** + * Encodes the specified Type message. Does not implicitly {@link google.protobuf.Type.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Type + * @static + * @param {google.protobuf.IType} message Type message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Type.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.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.protobuf.Field.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.oneofs != null && message.oneofs.length) + for (var i = 0; i < message.oneofs.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.oneofs[i]); + if (message.options != null && message.options.length) + for (var i = 0; i < message.options.length; ++i) + $root.google.protobuf.Option.encode(message.options[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sourceContext != null && Object.hasOwnProperty.call(message, "sourceContext")) + $root.google.protobuf.SourceContext.encode(message.sourceContext, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.syntax); + return writer; + }; + + /** + * Encodes the specified Type message, length delimited. Does not implicitly {@link google.protobuf.Type.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Type + * @static + * @param {google.protobuf.IType} message Type message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Type.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Type message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Type + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Type} Type + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Type.decode = function 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.Type(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.protobuf.Field.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.oneofs && message.oneofs.length)) + message.oneofs = []; + message.oneofs.push(reader.string()); + break; + case 4: + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + case 5: + message.sourceContext = $root.google.protobuf.SourceContext.decode(reader, reader.uint32()); + break; + case 6: + message.syntax = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Type message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Type + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Type} Type + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Type.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Type message. + * @function verify + * @memberof google.protobuf.Type + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Type.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.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.protobuf.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + if (message.oneofs != null && message.hasOwnProperty("oneofs")) { + if (!Array.isArray(message.oneofs)) + return "oneofs: array expected"; + for (var i = 0; i < message.oneofs.length; ++i) + if (!$util.isString(message.oneofs[i])) + return "oneofs: string[] expected"; + } + if (message.options != null && message.hasOwnProperty("options")) { + if (!Array.isArray(message.options)) + return "options: array expected"; + for (var i = 0; i < message.options.length; ++i) { + var error = $root.google.protobuf.Option.verify(message.options[i]); + if (error) + return "options." + error; + } + } + if (message.sourceContext != null && message.hasOwnProperty("sourceContext")) { + var error = $root.google.protobuf.SourceContext.verify(message.sourceContext); + if (error) + return "sourceContext." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + switch (message.syntax) { + default: + return "syntax: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a Type message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Type + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Type} Type + */ + Type.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Type) + return object; + var message = new $root.google.protobuf.Type(); + if (object.name != null) + message.name = String(object.name); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.protobuf.Type.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.protobuf.Type.fields: object expected"); + message.fields[i] = $root.google.protobuf.Field.fromObject(object.fields[i]); + } + } + if (object.oneofs) { + if (!Array.isArray(object.oneofs)) + throw TypeError(".google.protobuf.Type.oneofs: array expected"); + message.oneofs = []; + for (var i = 0; i < object.oneofs.length; ++i) + message.oneofs[i] = String(object.oneofs[i]); + } + if (object.options) { + if (!Array.isArray(object.options)) + throw TypeError(".google.protobuf.Type.options: array expected"); + message.options = []; + for (var i = 0; i < object.options.length; ++i) { + if (typeof object.options[i] !== "object") + throw TypeError(".google.protobuf.Type.options: object expected"); + message.options[i] = $root.google.protobuf.Option.fromObject(object.options[i]); + } + } + if (object.sourceContext != null) { + if (typeof object.sourceContext !== "object") + throw TypeError(".google.protobuf.Type.sourceContext: object expected"); + message.sourceContext = $root.google.protobuf.SourceContext.fromObject(object.sourceContext); + } + switch (object.syntax) { + case "SYNTAX_PROTO2": + case 0: + message.syntax = 0; + break; + case "SYNTAX_PROTO3": + case 1: + message.syntax = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a Type message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Type + * @static + * @param {google.protobuf.Type} message Type + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Type.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fields = []; + object.oneofs = []; + object.options = []; + } + if (options.defaults) { + object.name = ""; + object.sourceContext = null; + object.syntax = options.enums === String ? "SYNTAX_PROTO2" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.protobuf.Field.toObject(message.fields[j], options); + } + if (message.oneofs && message.oneofs.length) { + object.oneofs = []; + for (var j = 0; j < message.oneofs.length; ++j) + object.oneofs[j] = message.oneofs[j]; + } + if (message.options && message.options.length) { + object.options = []; + for (var j = 0; j < message.options.length; ++j) + object.options[j] = $root.google.protobuf.Option.toObject(message.options[j], options); + } + if (message.sourceContext != null && message.hasOwnProperty("sourceContext")) + object.sourceContext = $root.google.protobuf.SourceContext.toObject(message.sourceContext, options); + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] : message.syntax; + return object; + }; + + /** + * Converts this Type to JSON. + * @function toJSON + * @memberof google.protobuf.Type + * @instance + * @returns {Object.} JSON object + */ + Type.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Type; + })(); + + protobuf.Field = (function() { + + /** + * Properties of a Field. + * @memberof google.protobuf + * @interface IField + * @property {google.protobuf.Field.Kind|null} [kind] Field kind + * @property {google.protobuf.Field.Cardinality|null} [cardinality] Field cardinality + * @property {number|null} [number] Field number + * @property {string|null} [name] Field name + * @property {string|null} [typeUrl] Field typeUrl + * @property {number|null} [oneofIndex] Field oneofIndex + * @property {boolean|null} [packed] Field packed + * @property {Array.|null} [options] Field options + * @property {string|null} [jsonName] Field jsonName + * @property {string|null} [defaultValue] Field defaultValue + */ + + /** + * Constructs a new Field. + * @memberof google.protobuf + * @classdesc Represents a Field. + * @implements IField + * @constructor + * @param {google.protobuf.IField=} [properties] Properties to set + */ + function Field(properties) { + this.options = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Field kind. + * @member {google.protobuf.Field.Kind} kind + * @memberof google.protobuf.Field + * @instance + */ + Field.prototype.kind = 0; + + /** + * Field cardinality. + * @member {google.protobuf.Field.Cardinality} cardinality + * @memberof google.protobuf.Field + * @instance + */ + Field.prototype.cardinality = 0; + + /** + * Field number. + * @member {number} number + * @memberof google.protobuf.Field + * @instance + */ + Field.prototype.number = 0; + + /** + * Field name. + * @member {string} name + * @memberof google.protobuf.Field + * @instance + */ + Field.prototype.name = ""; + + /** + * Field typeUrl. + * @member {string} typeUrl + * @memberof google.protobuf.Field + * @instance + */ + Field.prototype.typeUrl = ""; + + /** + * Field oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.Field + * @instance + */ + Field.prototype.oneofIndex = 0; + + /** + * Field packed. + * @member {boolean} packed + * @memberof google.protobuf.Field + * @instance + */ + Field.prototype.packed = false; + + /** + * Field options. + * @member {Array.} options + * @memberof google.protobuf.Field + * @instance + */ + Field.prototype.options = $util.emptyArray; + + /** + * Field jsonName. + * @member {string} jsonName + * @memberof google.protobuf.Field + * @instance + */ + Field.prototype.jsonName = ""; + + /** + * Field defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.Field + * @instance + */ + Field.prototype.defaultValue = ""; + + /** + * Creates a new Field instance using the specified properties. + * @function create + * @memberof google.protobuf.Field + * @static + * @param {google.protobuf.IField=} [properties] Properties to set + * @returns {google.protobuf.Field} Field instance + */ + Field.create = function create(properties) { + return new Field(properties); + }; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.protobuf.Field.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Field + * @static + * @param {google.protobuf.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); + if (message.cardinality != null && Object.hasOwnProperty.call(message, "cardinality")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.cardinality); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.typeUrl != null && Object.hasOwnProperty.call(message, "typeUrl")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeUrl); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.oneofIndex); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.packed); + if (message.options != null && message.options.length) + for (var i = 0; i < message.options.length; ++i) + $root.google.protobuf.Option.encode(message.options[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.defaultValue); + return writer; + }; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.protobuf.Field.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Field + * @static + * @param {google.protobuf.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Field message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decode = function 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.Field(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.int32(); + break; + case 2: + message.cardinality = reader.int32(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.name = reader.string(); + break; + case 6: + message.typeUrl = reader.string(); + break; + case 7: + message.oneofIndex = reader.int32(); + break; + case 8: + message.packed = reader.bool(); + break; + case 9: + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + case 10: + message.jsonName = reader.string(); + break; + case 11: + message.defaultValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Field message. + * @function verify + * @memberof google.protobuf.Field + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Field.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.cardinality != null && message.hasOwnProperty("cardinality")) + switch (message.cardinality) { + default: + return "cardinality: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.typeUrl != null && message.hasOwnProperty("typeUrl")) + if (!$util.isString(message.typeUrl)) + return "typeUrl: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.options != null && message.hasOwnProperty("options")) { + if (!Array.isArray(message.options)) + return "options: array expected"; + for (var i = 0; i < message.options.length; ++i) { + var error = $root.google.protobuf.Option.verify(message.options[i]); + if (error) + return "options." + error; + } + } + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + return null; + }; + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Field + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Field} Field + */ + Field.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Field) + return object; + var message = new $root.google.protobuf.Field(); + switch (object.kind) { + case "TYPE_UNKNOWN": + case 0: + message.kind = 0; + break; + case "TYPE_DOUBLE": + case 1: + message.kind = 1; + break; + case "TYPE_FLOAT": + case 2: + message.kind = 2; + break; + case "TYPE_INT64": + case 3: + message.kind = 3; + break; + case "TYPE_UINT64": + case 4: + message.kind = 4; + break; + case "TYPE_INT32": + case 5: + message.kind = 5; + break; + case "TYPE_FIXED64": + case 6: + message.kind = 6; + break; + case "TYPE_FIXED32": + case 7: + message.kind = 7; + break; + case "TYPE_BOOL": + case 8: + message.kind = 8; + break; + case "TYPE_STRING": + case 9: + message.kind = 9; + break; + case "TYPE_GROUP": + case 10: + message.kind = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.kind = 11; + break; + case "TYPE_BYTES": + case 12: + message.kind = 12; + break; + case "TYPE_UINT32": + case 13: + message.kind = 13; + break; + case "TYPE_ENUM": + case 14: + message.kind = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.kind = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.kind = 16; + break; + case "TYPE_SINT32": + case 17: + message.kind = 17; + break; + case "TYPE_SINT64": + case 18: + message.kind = 18; + break; + } + switch (object.cardinality) { + case "CARDINALITY_UNKNOWN": + case 0: + message.cardinality = 0; + break; + case "CARDINALITY_OPTIONAL": + case 1: + message.cardinality = 1; + break; + case "CARDINALITY_REQUIRED": + case 2: + message.cardinality = 2; + break; + case "CARDINALITY_REPEATED": + case 3: + message.cardinality = 3; + break; + } + if (object.number != null) + message.number = object.number | 0; + if (object.name != null) + message.name = String(object.name); + if (object.typeUrl != null) + message.typeUrl = String(object.typeUrl); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.packed != null) + message.packed = Boolean(object.packed); + if (object.options) { + if (!Array.isArray(object.options)) + throw TypeError(".google.protobuf.Field.options: array expected"); + message.options = []; + for (var i = 0; i < object.options.length; ++i) { + if (typeof object.options[i] !== "object") + throw TypeError(".google.protobuf.Field.options: object expected"); + message.options[i] = $root.google.protobuf.Option.fromObject(object.options[i]); + } + } + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + return message; + }; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Field + * @static + * @param {google.protobuf.Field} message Field + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Field.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.options = []; + if (options.defaults) { + object.kind = options.enums === String ? "TYPE_UNKNOWN" : 0; + object.cardinality = options.enums === String ? "CARDINALITY_UNKNOWN" : 0; + object.number = 0; + object.name = ""; + object.typeUrl = ""; + object.oneofIndex = 0; + object.packed = false; + object.jsonName = ""; + object.defaultValue = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.google.protobuf.Field.Kind[message.kind] : message.kind; + if (message.cardinality != null && message.hasOwnProperty("cardinality")) + object.cardinality = options.enums === String ? $root.google.protobuf.Field.Cardinality[message.cardinality] : message.cardinality; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.typeUrl != null && message.hasOwnProperty("typeUrl")) + object.typeUrl = message.typeUrl; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.options && message.options.length) { + object.options = []; + for (var j = 0; j < message.options.length; ++j) + object.options[j] = $root.google.protobuf.Option.toObject(message.options[j], options); + } + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + return object; + }; + + /** + * Converts this Field to JSON. + * @function toJSON + * @memberof google.protobuf.Field + * @instance + * @returns {Object.} JSON object + */ + Field.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Kind enum. + * @name google.protobuf.Field.Kind + * @enum {number} + * @property {number} TYPE_UNKNOWN=0 TYPE_UNKNOWN value + * @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 + */ + Field.Kind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNKNOWN"] = 0; + 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; + })(); + + /** + * Cardinality enum. + * @name google.protobuf.Field.Cardinality + * @enum {number} + * @property {number} CARDINALITY_UNKNOWN=0 CARDINALITY_UNKNOWN value + * @property {number} CARDINALITY_OPTIONAL=1 CARDINALITY_OPTIONAL value + * @property {number} CARDINALITY_REQUIRED=2 CARDINALITY_REQUIRED value + * @property {number} CARDINALITY_REPEATED=3 CARDINALITY_REPEATED value + */ + Field.Cardinality = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CARDINALITY_UNKNOWN"] = 0; + values[valuesById[1] = "CARDINALITY_OPTIONAL"] = 1; + values[valuesById[2] = "CARDINALITY_REQUIRED"] = 2; + values[valuesById[3] = "CARDINALITY_REPEATED"] = 3; + return values; + })(); + + return Field; + })(); + + protobuf.Enum = (function() { + + /** + * Properties of an Enum. + * @memberof google.protobuf + * @interface IEnum + * @property {string|null} [name] Enum name + * @property {Array.|null} [enumvalue] Enum enumvalue + * @property {Array.|null} [options] Enum options + * @property {google.protobuf.ISourceContext|null} [sourceContext] Enum sourceContext + * @property {google.protobuf.Syntax|null} [syntax] Enum syntax + */ + + /** + * Constructs a new Enum. + * @memberof google.protobuf + * @classdesc Represents an Enum. + * @implements IEnum + * @constructor + * @param {google.protobuf.IEnum=} [properties] Properties to set + */ + function Enum(properties) { + this.enumvalue = []; + this.options = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Enum name. + * @member {string} name + * @memberof google.protobuf.Enum + * @instance + */ + Enum.prototype.name = ""; + + /** + * Enum enumvalue. + * @member {Array.} enumvalue + * @memberof google.protobuf.Enum + * @instance + */ + Enum.prototype.enumvalue = $util.emptyArray; + + /** + * Enum options. + * @member {Array.} options + * @memberof google.protobuf.Enum + * @instance + */ + Enum.prototype.options = $util.emptyArray; + + /** + * Enum sourceContext. + * @member {google.protobuf.ISourceContext|null|undefined} sourceContext + * @memberof google.protobuf.Enum + * @instance + */ + Enum.prototype.sourceContext = null; + + /** + * Enum syntax. + * @member {google.protobuf.Syntax} syntax + * @memberof google.protobuf.Enum + * @instance + */ + Enum.prototype.syntax = 0; + + /** + * Creates a new Enum instance using the specified properties. + * @function create + * @memberof google.protobuf.Enum + * @static + * @param {google.protobuf.IEnum=} [properties] Properties to set + * @returns {google.protobuf.Enum} Enum instance + */ + Enum.create = function create(properties) { + return new Enum(properties); + }; + + /** + * Encodes the specified Enum message. Does not implicitly {@link google.protobuf.Enum.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Enum + * @static + * @param {google.protobuf.IEnum} message Enum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Enum.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.enumvalue != null && message.enumvalue.length) + for (var i = 0; i < message.enumvalue.length; ++i) + $root.google.protobuf.EnumValue.encode(message.enumvalue[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && message.options.length) + for (var i = 0; i < message.options.length; ++i) + $root.google.protobuf.Option.encode(message.options[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sourceContext != null && Object.hasOwnProperty.call(message, "sourceContext")) + $root.google.protobuf.SourceContext.encode(message.sourceContext, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.syntax); + return writer; + }; + + /** + * Encodes the specified Enum message, length delimited. Does not implicitly {@link google.protobuf.Enum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Enum + * @static + * @param {google.protobuf.IEnum} message Enum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Enum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Enum message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Enum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Enum} Enum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Enum.decode = function 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.Enum(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.enumvalue && message.enumvalue.length)) + message.enumvalue = []; + message.enumvalue.push($root.google.protobuf.EnumValue.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + case 4: + message.sourceContext = $root.google.protobuf.SourceContext.decode(reader, reader.uint32()); + break; + case 5: + message.syntax = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Enum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Enum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Enum} Enum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Enum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Enum message. + * @function verify + * @memberof google.protobuf.Enum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Enum.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.enumvalue != null && message.hasOwnProperty("enumvalue")) { + if (!Array.isArray(message.enumvalue)) + return "enumvalue: array expected"; + for (var i = 0; i < message.enumvalue.length; ++i) { + var error = $root.google.protobuf.EnumValue.verify(message.enumvalue[i]); + if (error) + return "enumvalue." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + if (!Array.isArray(message.options)) + return "options: array expected"; + for (var i = 0; i < message.options.length; ++i) { + var error = $root.google.protobuf.Option.verify(message.options[i]); + if (error) + return "options." + error; + } + } + if (message.sourceContext != null && message.hasOwnProperty("sourceContext")) { + var error = $root.google.protobuf.SourceContext.verify(message.sourceContext); + if (error) + return "sourceContext." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + switch (message.syntax) { + default: + return "syntax: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an Enum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Enum + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Enum} Enum + */ + Enum.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Enum) + return object; + var message = new $root.google.protobuf.Enum(); + if (object.name != null) + message.name = String(object.name); + if (object.enumvalue) { + if (!Array.isArray(object.enumvalue)) + throw TypeError(".google.protobuf.Enum.enumvalue: array expected"); + message.enumvalue = []; + for (var i = 0; i < object.enumvalue.length; ++i) { + if (typeof object.enumvalue[i] !== "object") + throw TypeError(".google.protobuf.Enum.enumvalue: object expected"); + message.enumvalue[i] = $root.google.protobuf.EnumValue.fromObject(object.enumvalue[i]); + } + } + if (object.options) { + if (!Array.isArray(object.options)) + throw TypeError(".google.protobuf.Enum.options: array expected"); + message.options = []; + for (var i = 0; i < object.options.length; ++i) { + if (typeof object.options[i] !== "object") + throw TypeError(".google.protobuf.Enum.options: object expected"); + message.options[i] = $root.google.protobuf.Option.fromObject(object.options[i]); + } + } + if (object.sourceContext != null) { + if (typeof object.sourceContext !== "object") + throw TypeError(".google.protobuf.Enum.sourceContext: object expected"); + message.sourceContext = $root.google.protobuf.SourceContext.fromObject(object.sourceContext); + } + switch (object.syntax) { + case "SYNTAX_PROTO2": + case 0: + message.syntax = 0; + break; + case "SYNTAX_PROTO3": + case 1: + message.syntax = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an Enum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Enum + * @static + * @param {google.protobuf.Enum} message Enum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Enum.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.enumvalue = []; + object.options = []; + } + if (options.defaults) { + object.name = ""; + object.sourceContext = null; + object.syntax = options.enums === String ? "SYNTAX_PROTO2" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.enumvalue && message.enumvalue.length) { + object.enumvalue = []; + for (var j = 0; j < message.enumvalue.length; ++j) + object.enumvalue[j] = $root.google.protobuf.EnumValue.toObject(message.enumvalue[j], options); + } + if (message.options && message.options.length) { + object.options = []; + for (var j = 0; j < message.options.length; ++j) + object.options[j] = $root.google.protobuf.Option.toObject(message.options[j], options); + } + if (message.sourceContext != null && message.hasOwnProperty("sourceContext")) + object.sourceContext = $root.google.protobuf.SourceContext.toObject(message.sourceContext, options); + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] : message.syntax; + return object; + }; + + /** + * Converts this Enum to JSON. + * @function toJSON + * @memberof google.protobuf.Enum + * @instance + * @returns {Object.} JSON object + */ + Enum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Enum; + })(); + + protobuf.EnumValue = (function() { + + /** + * Properties of an EnumValue. + * @memberof google.protobuf + * @interface IEnumValue + * @property {string|null} [name] EnumValue name + * @property {number|null} [number] EnumValue number + * @property {Array.|null} [options] EnumValue options + */ + + /** + * Constructs a new EnumValue. + * @memberof google.protobuf + * @classdesc Represents an EnumValue. + * @implements IEnumValue + * @constructor + * @param {google.protobuf.IEnumValue=} [properties] Properties to set + */ + function EnumValue(properties) { + this.options = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValue name. + * @member {string} name + * @memberof google.protobuf.EnumValue + * @instance + */ + EnumValue.prototype.name = ""; + + /** + * EnumValue number. + * @member {number} number + * @memberof google.protobuf.EnumValue + * @instance + */ + EnumValue.prototype.number = 0; + + /** + * EnumValue options. + * @member {Array.} options + * @memberof google.protobuf.EnumValue + * @instance + */ + EnumValue.prototype.options = $util.emptyArray; + + /** + * Creates a new EnumValue instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValue + * @static + * @param {google.protobuf.IEnumValue=} [properties] Properties to set + * @returns {google.protobuf.EnumValue} EnumValue instance + */ + EnumValue.create = function create(properties) { + return new EnumValue(properties); + }; + + /** + * Encodes the specified EnumValue message. Does not implicitly {@link google.protobuf.EnumValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValue + * @static + * @param {google.protobuf.IEnumValue} message EnumValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValue.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 && message.options.length) + for (var i = 0; i < message.options.length; ++i) + $root.google.protobuf.Option.encode(message.options[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.protobuf.EnumValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValue + * @static + * @param {google.protobuf.IEnumValue} message EnumValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValue} EnumValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValue.decode = function 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.EnumValue(); + 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: + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValue} EnumValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValue message. + * @function verify + * @memberof google.protobuf.EnumValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValue.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")) { + if (!Array.isArray(message.options)) + return "options: array expected"; + for (var i = 0; i < message.options.length; ++i) { + var error = $root.google.protobuf.Option.verify(message.options[i]); + if (error) + return "options." + error; + } + } + return null; + }; + + /** + * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValue} EnumValue + */ + EnumValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValue) + return object; + var message = new $root.google.protobuf.EnumValue(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options) { + if (!Array.isArray(object.options)) + throw TypeError(".google.protobuf.EnumValue.options: array expected"); + message.options = []; + for (var i = 0; i < object.options.length; ++i) { + if (typeof object.options[i] !== "object") + throw TypeError(".google.protobuf.EnumValue.options: object expected"); + message.options[i] = $root.google.protobuf.Option.fromObject(object.options[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValue + * @static + * @param {google.protobuf.EnumValue} message EnumValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.options = []; + if (options.defaults) { + object.name = ""; + object.number = 0; + } + 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 && message.options.length) { + object.options = []; + for (var j = 0; j < message.options.length; ++j) + object.options[j] = $root.google.protobuf.Option.toObject(message.options[j], options); + } + return object; + }; + + /** + * Converts this EnumValue to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValue + * @instance + * @returns {Object.} JSON object + */ + EnumValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValue; + })(); + + protobuf.Option = (function() { + + /** + * Properties of an Option. + * @memberof google.protobuf + * @interface IOption + * @property {string|null} [name] Option name + * @property {google.protobuf.IAny|null} [value] Option value + */ + + /** + * Constructs a new Option. + * @memberof google.protobuf + * @classdesc Represents an Option. + * @implements IOption + * @constructor + * @param {google.protobuf.IOption=} [properties] Properties to set + */ + function Option(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Option name. + * @member {string} name + * @memberof google.protobuf.Option + * @instance + */ + Option.prototype.name = ""; + + /** + * Option value. + * @member {google.protobuf.IAny|null|undefined} value + * @memberof google.protobuf.Option + * @instance + */ + Option.prototype.value = null; + + /** + * Creates a new Option instance using the specified properties. + * @function create + * @memberof google.protobuf.Option + * @static + * @param {google.protobuf.IOption=} [properties] Properties to set + * @returns {google.protobuf.Option} Option instance + */ + Option.create = function create(properties) { + return new Option(properties); + }; + + /** + * Encodes the specified Option message. Does not implicitly {@link google.protobuf.Option.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Option + * @static + * @param {google.protobuf.IOption} message Option message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Option.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 && Object.hasOwnProperty.call(message, "value")) + $root.google.protobuf.Any.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Option message, length delimited. Does not implicitly {@link google.protobuf.Option.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Option + * @static + * @param {google.protobuf.IOption} message Option message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Option.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Option message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Option + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Option} Option + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Option.decode = function 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.Option(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.value = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Option message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Option + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Option} Option + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Option.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Option message. + * @function verify + * @memberof google.protobuf.Option + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Option.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")) { + var error = $root.google.protobuf.Any.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates an Option message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Option + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Option} Option + */ + Option.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Option) + return object; + var message = new $root.google.protobuf.Option(); + if (object.name != null) + message.name = String(object.name); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.protobuf.Option.value: object expected"); + message.value = $root.google.protobuf.Any.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from an Option message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Option + * @static + * @param {google.protobuf.Option} message Option + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Option.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.value = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.protobuf.Any.toObject(message.value, options); + return object; + }; + + /** + * Converts this Option to JSON. + * @function toJSON + * @memberof google.protobuf.Option + * @instance + * @returns {Object.} JSON object + */ + Option.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Option; + })(); + + /** + * Syntax enum. + * @name google.protobuf.Syntax + * @enum {number} + * @property {number} SYNTAX_PROTO2=0 SYNTAX_PROTO2 value + * @property {number} SYNTAX_PROTO3=1 SYNTAX_PROTO3 value + */ + protobuf.Syntax = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SYNTAX_PROTO2"] = 0; + values[valuesById[1] = "SYNTAX_PROTO3"] = 1; + return values; + })(); + + protobuf.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function 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.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ + + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; + + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decode = function 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.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FloatValue; + })(); + + protobuf.Int64Value = (function() { + + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ + + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decode = function 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.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { + + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ + + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decode = function 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.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function 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.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decode = function 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.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function 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.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BoolValue; + })(); + + protobuf.StringValue = (function() { + + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ + + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; + + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decode = function 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.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StringValue; + })(); + + protobuf.BytesValue = (function() { + + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ + + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); + + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decode = function 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.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 a BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + 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 a BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + 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 BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BytesValue; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.done = reader.bool(); + break; + case 4: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 5: + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 1: + message.filter = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.responseType = reader.string(); + break; + case 2: + message.metadataType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-api-servicemanagement/protos/protos.json b/packages/google-api-servicemanagement/protos/protos.json new file mode 100644 index 00000000000..1dca6cb915d --- /dev/null +++ b/packages/google-api-servicemanagement/protos/protos.json @@ -0,0 +1,3654 @@ +{ + "nested": { + "google": { + "nested": { + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ClientProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "servicemanagement": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.ServiceManagement.V1", + "go_package": "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement", + "java_multiple_files": true, + "java_outer_classname": "ResourcesProto", + "java_package": "com.google.api.servicemanagement.v1", + "objc_class_prefix": "GASM", + "php_namespace": "Google\\Cloud\\ServiceManagement\\V1", + "ruby_package": "Google::Cloud::ServiceManagement::V1" + }, + "nested": { + "ManagedService": { + "fields": { + "serviceName": { + "type": "string", + "id": 2 + }, + "producerProjectId": { + "type": "string", + "id": 3 + } + } + }, + "OperationMetadata": { + "fields": { + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "steps": { + "rule": "repeated", + "type": "Step", + "id": 2 + }, + "progressPercentage": { + "type": "int32", + "id": 3 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + }, + "nested": { + "Step": { + "fields": { + "description": { + "type": "string", + "id": 2 + }, + "status": { + "type": "Status", + "id": 4 + } + } + }, + "Status": { + "values": { + "STATUS_UNSPECIFIED": 0, + "DONE": 1, + "NOT_STARTED": 2, + "IN_PROGRESS": 3, + "FAILED": 4, + "CANCELLED": 5 + } + } + } + }, + "Diagnostic": { + "fields": { + "location": { + "type": "string", + "id": 1 + }, + "kind": { + "type": "Kind", + "id": 2 + }, + "message": { + "type": "string", + "id": 3 + } + }, + "nested": { + "Kind": { + "values": { + "WARNING": 0, + "ERROR": 1 + } + } + } + }, + "ConfigSource": { + "fields": { + "id": { + "type": "string", + "id": 5 + }, + "files": { + "rule": "repeated", + "type": "ConfigFile", + "id": 2 + } + } + }, + "ConfigFile": { + "fields": { + "filePath": { + "type": "string", + "id": 1 + }, + "fileContents": { + "type": "bytes", + "id": 3 + }, + "fileType": { + "type": "FileType", + "id": 4 + } + }, + "nested": { + "FileType": { + "values": { + "FILE_TYPE_UNSPECIFIED": 0, + "SERVICE_CONFIG_YAML": 1, + "OPEN_API_JSON": 2, + "OPEN_API_YAML": 3, + "FILE_DESCRIPTOR_SET_PROTO": 4, + "PROTO_FILE": 6 + } + } + } + }, + "ConfigRef": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ChangeReport": { + "fields": { + "configChanges": { + "rule": "repeated", + "type": "google.api.ConfigChange", + "id": 1 + } + } + }, + "Rollout": { + "oneofs": { + "strategy": { + "oneof": [ + "trafficPercentStrategy", + "deleteServiceStrategy" + ] + } + }, + "fields": { + "rolloutId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "createdBy": { + "type": "string", + "id": 3 + }, + "status": { + "type": "RolloutStatus", + "id": 4 + }, + "trafficPercentStrategy": { + "type": "TrafficPercentStrategy", + "id": 5 + }, + "deleteServiceStrategy": { + "type": "DeleteServiceStrategy", + "id": 200 + }, + "serviceName": { + "type": "string", + "id": 8 + } + }, + "nested": { + "TrafficPercentStrategy": { + "fields": { + "percentages": { + "keyType": "string", + "type": "double", + "id": 1 + } + } + }, + "DeleteServiceStrategy": { + "fields": {} + }, + "RolloutStatus": { + "values": { + "ROLLOUT_STATUS_UNSPECIFIED": 0, + "IN_PROGRESS": 1, + "SUCCESS": 2, + "CANCELLED": 3, + "FAILED": 4, + "PENDING": 5, + "FAILED_ROLLED_BACK": 6 + } + } + } + }, + "ServiceManager": { + "options": { + "(google.api.default_host)": "servicemanagement.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/service.management,https://www.googleapis.com/auth/service.management.readonly" + }, + "methods": { + "ListServices": { + "requestType": "ListServicesRequest", + "responseType": "ListServicesResponse", + "options": { + "(google.api.http).get": "/v1/services", + "(google.api.method_signature)": "producer_project_id,consumer_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/services" + } + }, + { + "(google.api.method_signature)": "producer_project_id,consumer_id" + } + ] + }, + "GetService": { + "requestType": "GetServiceRequest", + "responseType": "ManagedService", + "options": { + "(google.api.http).get": "/v1/services/{service_name}", + "(google.api.method_signature)": "service_name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/services/{service_name}" + } + }, + { + "(google.api.method_signature)": "service_name" + } + ] + }, + "CreateService": { + "requestType": "CreateServiceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/services", + "(google.api.http).body": "service", + "(google.api.method_signature)": "service", + "(google.longrunning.operation_info).response_type": "google.api.servicemanagement.v1.ManagedService", + "(google.longrunning.operation_info).metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/services", + "body": "service" + } + }, + { + "(google.api.method_signature)": "service" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.api.servicemanagement.v1.ManagedService", + "metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + } + } + ] + }, + "DeleteService": { + "requestType": "DeleteServiceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/services/{service_name}", + "(google.api.method_signature)": "service_name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/services/{service_name}" + } + }, + { + "(google.api.method_signature)": "service_name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + } + } + ] + }, + "UndeleteService": { + "requestType": "UndeleteServiceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/services/{service_name}:undelete", + "(google.api.method_signature)": "service_name", + "(google.longrunning.operation_info).response_type": "google.api.servicemanagement.v1.UndeleteServiceResponse", + "(google.longrunning.operation_info).metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/services/{service_name}:undelete" + } + }, + { + "(google.api.method_signature)": "service_name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.api.servicemanagement.v1.UndeleteServiceResponse", + "metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + } + } + ] + }, + "ListServiceConfigs": { + "requestType": "ListServiceConfigsRequest", + "responseType": "ListServiceConfigsResponse", + "options": { + "(google.api.http).get": "/v1/services/{service_name}/configs", + "(google.api.method_signature)": "service_name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/services/{service_name}/configs" + } + }, + { + "(google.api.method_signature)": "service_name" + } + ] + }, + "GetServiceConfig": { + "requestType": "GetServiceConfigRequest", + "responseType": "google.api.Service", + "options": { + "(google.api.http).get": "/v1/services/{service_name}/configs/{config_id}", + "(google.api.http).additional_bindings.get": "/v1/services/{service_name}/config", + "(google.api.method_signature)": "service_name,config_id,view" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/services/{service_name}/configs/{config_id}", + "additional_bindings": { + "get": "/v1/services/{service_name}/config" + } + } + }, + { + "(google.api.method_signature)": "service_name,config_id,view" + } + ] + }, + "CreateServiceConfig": { + "requestType": "CreateServiceConfigRequest", + "responseType": "google.api.Service", + "options": { + "(google.api.http).post": "/v1/services/{service_name}/configs", + "(google.api.http).body": "service_config", + "(google.api.method_signature)": "service_name,service_config" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/services/{service_name}/configs", + "body": "service_config" + } + }, + { + "(google.api.method_signature)": "service_name,service_config" + } + ] + }, + "SubmitConfigSource": { + "requestType": "SubmitConfigSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/services/{service_name}/configs:submit", + "(google.api.http).body": "*", + "(google.api.method_signature)": "service_name,config_source,validate_only", + "(google.longrunning.operation_info).response_type": "google.api.servicemanagement.v1.SubmitConfigSourceResponse", + "(google.longrunning.operation_info).metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/services/{service_name}/configs:submit", + "body": "*" + } + }, + { + "(google.api.method_signature)": "service_name,config_source,validate_only" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.api.servicemanagement.v1.SubmitConfigSourceResponse", + "metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + } + } + ] + }, + "ListServiceRollouts": { + "requestType": "ListServiceRolloutsRequest", + "responseType": "ListServiceRolloutsResponse", + "options": { + "(google.api.http).get": "/v1/services/{service_name}/rollouts", + "(google.api.method_signature)": "service_name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/services/{service_name}/rollouts" + } + }, + { + "(google.api.method_signature)": "service_name,filter" + } + ] + }, + "GetServiceRollout": { + "requestType": "GetServiceRolloutRequest", + "responseType": "Rollout", + "options": { + "(google.api.http).get": "/v1/services/{service_name}/rollouts/{rollout_id}", + "(google.api.method_signature)": "service_name,rollout_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/services/{service_name}/rollouts/{rollout_id}" + } + }, + { + "(google.api.method_signature)": "service_name,rollout_id" + } + ] + }, + "CreateServiceRollout": { + "requestType": "CreateServiceRolloutRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/services/{service_name}/rollouts", + "(google.api.http).body": "rollout", + "(google.api.method_signature)": "service_name,rollout", + "(google.longrunning.operation_info).response_type": "google.api.servicemanagement.v1.Rollout", + "(google.longrunning.operation_info).metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/services/{service_name}/rollouts", + "body": "rollout" + } + }, + { + "(google.api.method_signature)": "service_name,rollout" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.api.servicemanagement.v1.Rollout", + "metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + } + } + ] + }, + "GenerateConfigReport": { + "requestType": "GenerateConfigReportRequest", + "responseType": "GenerateConfigReportResponse", + "options": { + "(google.api.http).post": "/v1/services:generateConfigReport", + "(google.api.http).body": "*", + "(google.api.method_signature)": "new_config,old_config" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/services:generateConfigReport", + "body": "*" + } + }, + { + "(google.api.method_signature)": "new_config,old_config" + } + ] + }, + "EnableService": { + "requestType": "EnableServiceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "deprecated": true, + "(google.api.http).post": "/v1/services/{service_name}:enable", + "(google.api.http).body": "*", + "(google.api.method_signature)": "service_name,consumer_id", + "(google.longrunning.operation_info).response_type": "google.api.servicemanagement.v1.EnableServiceResponse", + "(google.longrunning.operation_info).metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "deprecated": true + }, + { + "(google.api.http)": { + "post": "/v1/services/{service_name}:enable", + "body": "*" + } + }, + { + "(google.api.method_signature)": "service_name,consumer_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.api.servicemanagement.v1.EnableServiceResponse", + "metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + } + } + ] + }, + "DisableService": { + "requestType": "DisableServiceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "deprecated": true, + "(google.api.http).post": "/v1/services/{service_name}:disable", + "(google.api.http).body": "*", + "(google.api.method_signature)": "service_name,consumer_id", + "(google.longrunning.operation_info).response_type": "google.api.servicemanagement.v1.DisableServiceResponse", + "(google.longrunning.operation_info).metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "deprecated": true + }, + { + "(google.api.http)": { + "post": "/v1/services/{service_name}:disable", + "body": "*" + } + }, + { + "(google.api.method_signature)": "service_name,consumer_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.api.servicemanagement.v1.DisableServiceResponse", + "metadata_type": "google.api.servicemanagement.v1.OperationMetadata" + } + } + ] + } + } + }, + "ListServicesRequest": { + "fields": { + "producerProjectId": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 5 + }, + "pageToken": { + "type": "string", + "id": 6 + }, + "consumerId": { + "type": "string", + "id": 7, + "options": { + "deprecated": true + } + } + } + }, + "ListServicesResponse": { + "fields": { + "services": { + "rule": "repeated", + "type": "ManagedService", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetServiceRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateServiceRequest": { + "fields": { + "service": { + "type": "ManagedService", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteServiceRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UndeleteServiceRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UndeleteServiceResponse": { + "fields": { + "service": { + "type": "ManagedService", + "id": 1 + } + } + }, + "GetServiceConfigRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "configId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "view": { + "type": "ConfigView", + "id": 3 + } + }, + "nested": { + "ConfigView": { + "values": { + "BASIC": 0, + "FULL": 1 + } + } + } + }, + "ListServiceConfigsRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + } + } + }, + "ListServiceConfigsResponse": { + "fields": { + "serviceConfigs": { + "rule": "repeated", + "type": "google.api.Service", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateServiceConfigRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "serviceConfig": { + "type": "google.api.Service", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SubmitConfigSourceRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "configSource": { + "type": "ConfigSource", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SubmitConfigSourceResponse": { + "fields": { + "serviceConfig": { + "type": "google.api.Service", + "id": 1 + } + } + }, + "CreateServiceRolloutRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rollout": { + "type": "Rollout", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListServiceRolloutsRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListServiceRolloutsResponse": { + "fields": { + "rollouts": { + "rule": "repeated", + "type": "Rollout", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetServiceRolloutRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rolloutId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "EnableServiceRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "consumerId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "EnableServiceResponse": { + "fields": {} + }, + "DisableServiceRequest": { + "fields": { + "serviceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "consumerId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DisableServiceResponse": { + "fields": {} + }, + "GenerateConfigReportRequest": { + "fields": { + "newConfig": { + "type": "google.protobuf.Any", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "oldConfig": { + "type": "google.protobuf.Any", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GenerateConfigReportResponse": { + "fields": { + "serviceName": { + "type": "string", + "id": 1 + }, + "id": { + "type": "string", + "id": 2 + }, + "changeReports": { + "rule": "repeated", + "type": "ChangeReport", + "id": 3 + }, + "diagnostics": { + "rule": "repeated", + "type": "Diagnostic", + "id": 4 + } + } + } + } + } + } + }, + "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 + } + } + }, + "ConfigChange": { + "fields": { + "element": { + "type": "string", + "id": 1 + }, + "oldValue": { + "type": "string", + "id": 2 + }, + "newValue": { + "type": "string", + "id": 3 + }, + "changeType": { + "type": "ChangeType", + "id": 4 + }, + "advices": { + "rule": "repeated", + "type": "Advice", + "id": 5 + } + } + }, + "Advice": { + "fields": { + "description": { + "type": "string", + "id": 2 + } + } + }, + "ChangeType": { + "values": { + "CHANGE_TYPE_UNSPECIFIED": 0, + "ADDED": 1, + "REMOVED": 2, + "MODIFIED": 3 + } + }, + "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 + } + }, + "MetricDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "string", + "id": 8 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 2 + }, + "metricKind": { + "type": "MetricKind", + "id": 3 + }, + "valueType": { + "type": "ValueType", + "id": 4 + }, + "unit": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 7 + }, + "metadata": { + "type": "MetricDescriptorMetadata", + "id": 10 + }, + "launchStage": { + "type": "LaunchStage", + "id": 12 + }, + "monitoredResourceTypes": { + "rule": "repeated", + "type": "string", + "id": 13 + } + }, + "nested": { + "MetricDescriptorMetadata": { + "fields": { + "launchStage": { + "type": "LaunchStage", + "id": 1, + "options": { + "deprecated": true + } + }, + "samplePeriod": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "ingestDelay": { + "type": "google.protobuf.Duration", + "id": 3 + } + } + }, + "MetricKind": { + "values": { + "METRIC_KIND_UNSPECIFIED": 0, + "GAUGE": 1, + "DELTA": 2, + "CUMULATIVE": 3 + } + }, + "ValueType": { + "values": { + "VALUE_TYPE_UNSPECIFIED": 0, + "BOOL": 1, + "INT64": 2, + "DOUBLE": 3, + "STRING": 4, + "DISTRIBUTION": 5, + "MONEY": 6 + } + } + } + }, + "Metric": { + "fields": { + "type": { + "type": "string", + "id": 3 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "LabelDescriptor": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "valueType": { + "type": "ValueType", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + }, + "nested": { + "ValueType": { + "values": { + "STRING": 0, + "BOOL": 1, + "INT64": 2 + } + } + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "Quota": { + "fields": { + "limits": { + "rule": "repeated", + "type": "QuotaLimit", + "id": 3 + }, + "metricRules": { + "rule": "repeated", + "type": "MetricRule", + "id": 4 + } + } + }, + "MetricRule": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "metricCosts": { + "keyType": "string", + "type": "int64", + "id": 2 + } + } + }, + "QuotaLimit": { + "fields": { + "name": { + "type": "string", + "id": 6 + }, + "description": { + "type": "string", + "id": 2 + }, + "defaultLimit": { + "type": "int64", + "id": 3 + }, + "maxLimit": { + "type": "int64", + "id": 4 + }, + "freeTier": { + "type": "int64", + "id": 7 + }, + "duration": { + "type": "string", + "id": 5 + }, + "metric": { + "type": "string", + "id": 8 + }, + "unit": { + "type": "string", + "id": 9 + }, + "values": { + "keyType": "string", + "type": "int64", + "id": 10 + }, + "displayName": { + "type": "string", + "id": 12 + } + } + }, + "Service": { + "fields": { + "configVersion": { + "type": "google.protobuf.UInt32Value", + "id": 20 + }, + "name": { + "type": "string", + "id": 1 + }, + "id": { + "type": "string", + "id": 33 + }, + "title": { + "type": "string", + "id": 2 + }, + "producerProjectId": { + "type": "string", + "id": 22 + }, + "apis": { + "rule": "repeated", + "type": "google.protobuf.Api", + "id": 3 + }, + "types": { + "rule": "repeated", + "type": "google.protobuf.Type", + "id": 4 + }, + "enums": { + "rule": "repeated", + "type": "google.protobuf.Enum", + "id": 5 + }, + "documentation": { + "type": "Documentation", + "id": 6 + }, + "backend": { + "type": "Backend", + "id": 8 + }, + "http": { + "type": "Http", + "id": 9 + }, + "quota": { + "type": "Quota", + "id": 10 + }, + "authentication": { + "type": "Authentication", + "id": 11 + }, + "context": { + "type": "Context", + "id": 12 + }, + "usage": { + "type": "Usage", + "id": 15 + }, + "endpoints": { + "rule": "repeated", + "type": "Endpoint", + "id": 18 + }, + "control": { + "type": "Control", + "id": 21 + }, + "logs": { + "rule": "repeated", + "type": "LogDescriptor", + "id": 23 + }, + "metrics": { + "rule": "repeated", + "type": "MetricDescriptor", + "id": 24 + }, + "monitoredResources": { + "rule": "repeated", + "type": "MonitoredResourceDescriptor", + "id": 25 + }, + "billing": { + "type": "Billing", + "id": 26 + }, + "logging": { + "type": "Logging", + "id": 27 + }, + "monitoring": { + "type": "Monitoring", + "id": 28 + }, + "systemParameters": { + "type": "SystemParameters", + "id": 29 + }, + "sourceInfo": { + "type": "SourceInfo", + "id": 37 + } + } + }, + "Authentication": { + "fields": { + "rules": { + "rule": "repeated", + "type": "AuthenticationRule", + "id": 3 + }, + "providers": { + "rule": "repeated", + "type": "AuthProvider", + "id": 4 + } + } + }, + "AuthenticationRule": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "oauth": { + "type": "OAuthRequirements", + "id": 2 + }, + "allowWithoutCredential": { + "type": "bool", + "id": 5 + }, + "requirements": { + "rule": "repeated", + "type": "AuthRequirement", + "id": 7 + } + } + }, + "JwtLocation": { + "oneofs": { + "in": { + "oneof": [ + "header", + "query" + ] + } + }, + "fields": { + "header": { + "type": "string", + "id": 1 + }, + "query": { + "type": "string", + "id": 2 + }, + "valuePrefix": { + "type": "string", + "id": 3 + } + } + }, + "AuthProvider": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "issuer": { + "type": "string", + "id": 2 + }, + "jwksUri": { + "type": "string", + "id": 3 + }, + "audiences": { + "type": "string", + "id": 4 + }, + "authorizationUrl": { + "type": "string", + "id": 5 + }, + "jwtLocations": { + "rule": "repeated", + "type": "JwtLocation", + "id": 6 + } + } + }, + "OAuthRequirements": { + "fields": { + "canonicalScopes": { + "type": "string", + "id": 1 + } + } + }, + "AuthRequirement": { + "fields": { + "providerId": { + "type": "string", + "id": 1 + }, + "audiences": { + "type": "string", + "id": 2 + } + } + }, + "Backend": { + "fields": { + "rules": { + "rule": "repeated", + "type": "BackendRule", + "id": 1 + } + } + }, + "BackendRule": { + "oneofs": { + "authentication": { + "oneof": [ + "jwtAudience", + "disableAuth" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "address": { + "type": "string", + "id": 2 + }, + "deadline": { + "type": "double", + "id": 3 + }, + "minDeadline": { + "type": "double", + "id": 4 + }, + "operationDeadline": { + "type": "double", + "id": 5 + }, + "pathTranslation": { + "type": "PathTranslation", + "id": 6 + }, + "jwtAudience": { + "type": "string", + "id": 7 + }, + "disableAuth": { + "type": "bool", + "id": 8 + }, + "protocol": { + "type": "string", + "id": 9 + } + }, + "nested": { + "PathTranslation": { + "values": { + "PATH_TRANSLATION_UNSPECIFIED": 0, + "CONSTANT_ADDRESS": 1, + "APPEND_PATH_TO_ADDRESS": 2 + } + } + } + }, + "Billing": { + "fields": { + "consumerDestinations": { + "rule": "repeated", + "type": "BillingDestination", + "id": 8 + } + }, + "nested": { + "BillingDestination": { + "fields": { + "monitoredResource": { + "type": "string", + "id": 1 + }, + "metrics": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + } + } + }, + "Context": { + "fields": { + "rules": { + "rule": "repeated", + "type": "ContextRule", + "id": 1 + } + } + }, + "ContextRule": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "requested": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "provided": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "allowedRequestExtensions": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "allowedResponseExtensions": { + "rule": "repeated", + "type": "string", + "id": 5 + } + } + }, + "Control": { + "fields": { + "environment": { + "type": "string", + "id": 1 + } + } + }, + "Documentation": { + "fields": { + "summary": { + "type": "string", + "id": 1 + }, + "pages": { + "rule": "repeated", + "type": "Page", + "id": 5 + }, + "rules": { + "rule": "repeated", + "type": "DocumentationRule", + "id": 3 + }, + "documentationRootUrl": { + "type": "string", + "id": 4 + }, + "serviceRootUrl": { + "type": "string", + "id": 6 + }, + "overview": { + "type": "string", + "id": 2 + } + } + }, + "DocumentationRule": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "deprecationDescription": { + "type": "string", + "id": 3 + } + } + }, + "Page": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "content": { + "type": "string", + "id": 2 + }, + "subpages": { + "rule": "repeated", + "type": "Page", + "id": 3 + } + } + }, + "Endpoint": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "aliases": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "target": { + "type": "string", + "id": 101 + }, + "allowCors": { + "type": "bool", + "id": 5 + } + } + }, + "LogDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "displayName": { + "type": "string", + "id": 4 + } + } + }, + "Logging": { + "fields": { + "producerDestinations": { + "rule": "repeated", + "type": "LoggingDestination", + "id": 1 + }, + "consumerDestinations": { + "rule": "repeated", + "type": "LoggingDestination", + "id": 2 + } + }, + "nested": { + "LoggingDestination": { + "fields": { + "monitoredResource": { + "type": "string", + "id": 3 + }, + "logs": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "MonitoredResourceDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 5 + }, + "type": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 4 + }, + "launchStage": { + "type": "LaunchStage", + "id": 7 + } + } + }, + "MonitoredResource": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "MonitoredResourceMetadata": { + "fields": { + "systemLabels": { + "type": "google.protobuf.Struct", + "id": 1 + }, + "userLabels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "Monitoring": { + "fields": { + "producerDestinations": { + "rule": "repeated", + "type": "MonitoringDestination", + "id": 1 + }, + "consumerDestinations": { + "rule": "repeated", + "type": "MonitoringDestination", + "id": 2 + } + }, + "nested": { + "MonitoringDestination": { + "fields": { + "monitoredResource": { + "type": "string", + "id": 1 + }, + "metrics": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + } + } + }, + "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 + } + } + }, + "SourceInfo": { + "fields": { + "sourceFiles": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 1 + } + } + }, + "SystemParameters": { + "fields": { + "rules": { + "rule": "repeated", + "type": "SystemParameterRule", + "id": 1 + } + } + }, + "SystemParameterRule": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "parameters": { + "rule": "repeated", + "type": "SystemParameter", + "id": 2 + } + } + }, + "SystemParameter": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "httpHeader": { + "type": "string", + "id": 2 + }, + "urlQueryParameter": { + "type": "string", + "id": 3 + } + } + }, + "Usage": { + "fields": { + "requirements": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "rules": { + "rule": "repeated", + "type": "UsageRule", + "id": 6 + }, + "producerNotificationChannel": { + "type": "string", + "id": 7 + } + } + }, + "UsageRule": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "allowUnregisteredCalls": { + "type": "bool", + "id": 2 + }, + "skipServiceControl": { + "type": "bool", + "id": 3 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/known/typepb", + "java_package": "com.google.protobuf", + "java_outer_classname": "TypeProto", + "csharp_namespace": "Google.Protobuf.WellKnownTypes", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED", + "java_multiple_files": true + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Api": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "methods": { + "rule": "repeated", + "type": "Method", + "id": 2 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 3 + }, + "version": { + "type": "string", + "id": 4 + }, + "sourceContext": { + "type": "SourceContext", + "id": 5 + }, + "mixins": { + "rule": "repeated", + "type": "Mixin", + "id": 6 + }, + "syntax": { + "type": "Syntax", + "id": 7 + } + } + }, + "Method": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "requestTypeUrl": { + "type": "string", + "id": 2 + }, + "requestStreaming": { + "type": "bool", + "id": 3 + }, + "responseTypeUrl": { + "type": "string", + "id": 4 + }, + "responseStreaming": { + "type": "bool", + "id": 5 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 6 + }, + "syntax": { + "type": "Syntax", + "id": 7 + } + } + }, + "Mixin": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "root": { + "type": "string", + "id": 2 + } + } + }, + "SourceContext": { + "fields": { + "fileName": { + "type": "string", + "id": 1 + } + } + }, + "Type": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "fields": { + "rule": "repeated", + "type": "Field", + "id": 2 + }, + "oneofs": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 4 + }, + "sourceContext": { + "type": "SourceContext", + "id": 5 + }, + "syntax": { + "type": "Syntax", + "id": 6 + } + } + }, + "Field": { + "fields": { + "kind": { + "type": "Kind", + "id": 1 + }, + "cardinality": { + "type": "Cardinality", + "id": 2 + }, + "number": { + "type": "int32", + "id": 3 + }, + "name": { + "type": "string", + "id": 4 + }, + "typeUrl": { + "type": "string", + "id": 6 + }, + "oneofIndex": { + "type": "int32", + "id": 7 + }, + "packed": { + "type": "bool", + "id": 8 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "defaultValue": { + "type": "string", + "id": 11 + } + }, + "nested": { + "Kind": { + "values": { + "TYPE_UNKNOWN": 0, + "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 + } + }, + "Cardinality": { + "values": { + "CARDINALITY_UNKNOWN": 0, + "CARDINALITY_OPTIONAL": 1, + "CARDINALITY_REQUIRED": 2, + "CARDINALITY_REPEATED": 3 + } + } + } + }, + "Enum": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "enumvalue": { + "rule": "repeated", + "type": "EnumValue", + "id": 2 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 3 + }, + "sourceContext": { + "type": "SourceContext", + "id": 4 + }, + "syntax": { + "type": "Syntax", + "id": 5 + } + } + }, + "EnumValue": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 3 + } + } + }, + "Option": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "type": "Any", + "id": 2 + } + } + }, + "Syntax": { + "values": { + "SYNTAX_PROTO2": 0, + "SYNTAX_PROTO3": 1 + } + }, + "DoubleValue": { + "fields": { + "value": { + "type": "double", + "id": 1 + } + } + }, + "FloatValue": { + "fields": { + "value": { + "type": "float", + "id": 1 + } + } + }, + "Int64Value": { + "fields": { + "value": { + "type": "int64", + "id": 1 + } + } + }, + "UInt64Value": { + "fields": { + "value": { + "type": "uint64", + "id": 1 + } + } + }, + "Int32Value": { + "fields": { + "value": { + "type": "int32", + "id": 1 + } + } + }, + "UInt32Value": { + "fields": { + "value": { + "type": "uint32", + "id": 1 + } + } + }, + "BoolValue": { + "fields": { + "value": { + "type": "bool", + "id": 1 + } + } + }, + "StringValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { + "type": "bytes", + "id": 1 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-api-servicemanagement/samples/README.md b/packages/google-api-servicemanagement/samples/README.md new file mode 100644 index 00000000000..c86555cbb8b --- /dev/null +++ b/packages/google-api-servicemanagement/samples/README.md @@ -0,0 +1,50 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Service Management API: Node.js Samples](https://github.com/googleapis/nodejs-service-management) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-service-management#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-service-management/blob/master/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-service-management&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-service-management&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/service-infrastructure/docs/overview/ diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json new file mode 100644 index 00000000000..b98e98c81ee --- /dev/null +++ b/packages/google-api-servicemanagement/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-service-management", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-api-servicemanagement/samples/quickstart.js b/packages/google-api-servicemanagement/samples/quickstart.js new file mode 100644 index 00000000000..4e07f4f8d12 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/quickstart.js @@ -0,0 +1,51 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +'use strict'; + +async function main() { + // [START nodejs_service_management_quickstart] + // Imports the Google Cloud client library + + // remove this line after package is released + // eslint-disable-next-line node/no-missing-require + const {ServiceManagerClient} = require(''); + + // 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 {ServiceManagerClient}(); + + //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_service_management_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-api-servicemanagement/samples/test/quickstart.js b/packages/google-api-servicemanagement/samples/test/quickstart.js new file mode 100644 index 00000000000..0ab751f5754 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/test/quickstart.js @@ -0,0 +1,50 @@ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +const path = require('path'); +const cp = require('child_process'); +const {before, describe, it} = require('mocha'); +// eslint-disable-next-line node/no-missing-require +const {ServiceManagerClient} = require(''); +// 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 {ServiceManagerClient}(); + +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-api-servicemanagement/src/index.ts b/packages/google-api-servicemanagement/src/index.ts new file mode 100644 index 00000000000..c49c64c72c4 --- /dev/null +++ b/packages/google-api-servicemanagement/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const ServiceManagerClient = v1.ServiceManagerClient; +type ServiceManagerClient = v1.ServiceManagerClient; + +export {v1, ServiceManagerClient}; +export default {v1, ServiceManagerClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-api-servicemanagement/src/v1/gapic_metadata.json b/packages/google-api-servicemanagement/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..5425ca8c94f --- /dev/null +++ b/packages/google-api-servicemanagement/src/v1/gapic_metadata.json @@ -0,0 +1,185 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.api.servicemanagement.v1", + "libraryPackage": "servicemanagement", + "services": { + "ServiceManager": { + "clients": { + "grpc": { + "libraryClient": "ServiceManagerClient", + "rpcs": { + "GetService": { + "methods": [ + "getService" + ] + }, + "GetServiceConfig": { + "methods": [ + "getServiceConfig" + ] + }, + "CreateServiceConfig": { + "methods": [ + "createServiceConfig" + ] + }, + "GetServiceRollout": { + "methods": [ + "getServiceRollout" + ] + }, + "GenerateConfigReport": { + "methods": [ + "generateConfigReport" + ] + }, + "CreateService": { + "methods": [ + "createService" + ] + }, + "DeleteService": { + "methods": [ + "deleteService" + ] + }, + "UndeleteService": { + "methods": [ + "undeleteService" + ] + }, + "SubmitConfigSource": { + "methods": [ + "submitConfigSource" + ] + }, + "CreateServiceRollout": { + "methods": [ + "createServiceRollout" + ] + }, + "EnableService": { + "methods": [ + "enableService" + ] + }, + "DisableService": { + "methods": [ + "disableService" + ] + }, + "ListServices": { + "methods": [ + "listServices", + "listServicesStream", + "listServicesAsync" + ] + }, + "ListServiceConfigs": { + "methods": [ + "listServiceConfigs", + "listServiceConfigsStream", + "listServiceConfigsAsync" + ] + }, + "ListServiceRollouts": { + "methods": [ + "listServiceRollouts", + "listServiceRolloutsStream", + "listServiceRolloutsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ServiceManagerClient", + "rpcs": { + "GetService": { + "methods": [ + "getService" + ] + }, + "GetServiceConfig": { + "methods": [ + "getServiceConfig" + ] + }, + "CreateServiceConfig": { + "methods": [ + "createServiceConfig" + ] + }, + "GetServiceRollout": { + "methods": [ + "getServiceRollout" + ] + }, + "GenerateConfigReport": { + "methods": [ + "generateConfigReport" + ] + }, + "CreateService": { + "methods": [ + "createService" + ] + }, + "DeleteService": { + "methods": [ + "deleteService" + ] + }, + "UndeleteService": { + "methods": [ + "undeleteService" + ] + }, + "SubmitConfigSource": { + "methods": [ + "submitConfigSource" + ] + }, + "CreateServiceRollout": { + "methods": [ + "createServiceRollout" + ] + }, + "EnableService": { + "methods": [ + "enableService" + ] + }, + "DisableService": { + "methods": [ + "disableService" + ] + }, + "ListServices": { + "methods": [ + "listServices", + "listServicesStream", + "listServicesAsync" + ] + }, + "ListServiceConfigs": { + "methods": [ + "listServiceConfigs", + "listServiceConfigsStream", + "listServiceConfigsAsync" + ] + }, + "ListServiceRollouts": { + "methods": [ + "listServiceRollouts", + "listServiceRolloutsStream", + "listServiceRolloutsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-api-servicemanagement/src/v1/index.ts b/packages/google-api-servicemanagement/src/v1/index.ts new file mode 100644 index 00000000000..b4eab76ce72 --- /dev/null +++ b/packages/google-api-servicemanagement/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {ServiceManagerClient} from './service_manager_client'; diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts new file mode 100644 index 00000000000..e59285f060e --- /dev/null +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -0,0 +1,2675 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1/service_manager_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './service_manager_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * [Google Service Management API](/service-management/overview) + * @class + * @memberof v1 + */ +export class ServiceManagerClient { + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + operationsClient: gax.OperationsClient; + serviceManagerStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ServiceManagerClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ServiceManagerClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + this._protos = this._gaxGrpc.loadProto( + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath + ); + + // 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 = { + listServices: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'services' + ), + listServiceConfigs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'serviceConfigs' + ), + listServiceRollouts: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'rollouts' + ), + }; + + // 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 protoFilesRoot = opts.fallback + ? this._gaxModule.protobuf.Root.fromJSON( + // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + ) + : this._gaxModule.protobuf.loadSync(nodejsProtoPath); + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const createServiceResponse = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.ManagedService' + ) as gax.protobuf.Type; + const createServiceMetadata = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteServiceResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteServiceMetadata = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.OperationMetadata' + ) as gax.protobuf.Type; + const undeleteServiceResponse = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.UndeleteServiceResponse' + ) as gax.protobuf.Type; + const undeleteServiceMetadata = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.OperationMetadata' + ) as gax.protobuf.Type; + const submitConfigSourceResponse = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.SubmitConfigSourceResponse' + ) as gax.protobuf.Type; + const submitConfigSourceMetadata = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createServiceRolloutResponse = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.Rollout' + ) as gax.protobuf.Type; + const createServiceRolloutMetadata = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.OperationMetadata' + ) as gax.protobuf.Type; + const enableServiceResponse = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.EnableServiceResponse' + ) as gax.protobuf.Type; + const enableServiceMetadata = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.OperationMetadata' + ) as gax.protobuf.Type; + const disableServiceResponse = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.DisableServiceResponse' + ) as gax.protobuf.Type; + const disableServiceMetadata = protoFilesRoot.lookup( + '.google.api.servicemanagement.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createService: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createServiceResponse.decode.bind(createServiceResponse), + createServiceMetadata.decode.bind(createServiceMetadata) + ), + deleteService: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteServiceResponse.decode.bind(deleteServiceResponse), + deleteServiceMetadata.decode.bind(deleteServiceMetadata) + ), + undeleteService: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + undeleteServiceResponse.decode.bind(undeleteServiceResponse), + undeleteServiceMetadata.decode.bind(undeleteServiceMetadata) + ), + submitConfigSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + submitConfigSourceResponse.decode.bind(submitConfigSourceResponse), + submitConfigSourceMetadata.decode.bind(submitConfigSourceMetadata) + ), + createServiceRollout: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createServiceRolloutResponse.decode.bind(createServiceRolloutResponse), + createServiceRolloutMetadata.decode.bind(createServiceRolloutMetadata) + ), + enableService: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + enableServiceResponse.decode.bind(enableServiceResponse), + enableServiceMetadata.decode.bind(enableServiceMetadata) + ), + disableService: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + disableServiceResponse.decode.bind(disableServiceResponse), + disableServiceMetadata.decode.bind(disableServiceMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.api.servicemanagement.v1.ServiceManager', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.serviceManagerStub) { + return this.serviceManagerStub; + } + + // Put together the "service stub" for + // google.api.servicemanagement.v1.ServiceManager. + this.serviceManagerStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.api.servicemanagement.v1.ServiceManager' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.api.servicemanagement.v1.ServiceManager, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const serviceManagerStubMethods = [ + 'listServices', + 'getService', + 'createService', + 'deleteService', + 'undeleteService', + 'listServiceConfigs', + 'getServiceConfig', + 'createServiceConfig', + 'submitConfigSource', + 'listServiceRollouts', + 'getServiceRollout', + 'createServiceRollout', + 'generateConfigReport', + 'enableService', + 'disableService', + ]; + for (const methodName of serviceManagerStubMethods) { + const callPromise = this.serviceManagerStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.serviceManagerStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'servicemanagement.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 'servicemanagement.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', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/service.management', + 'https://www.googleapis.com/auth/service.management.readonly', + ]; + } + + 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 -- + // ------------------- + getService( + request: protos.google.api.servicemanagement.v1.IGetServiceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.servicemanagement.v1.IManagedService, + protos.google.api.servicemanagement.v1.IGetServiceRequest | undefined, + {} | undefined + ] + >; + getService( + request: protos.google.api.servicemanagement.v1.IGetServiceRequest, + options: CallOptions, + callback: Callback< + protos.google.api.servicemanagement.v1.IManagedService, + | protos.google.api.servicemanagement.v1.IGetServiceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getService( + request: protos.google.api.servicemanagement.v1.IGetServiceRequest, + callback: Callback< + protos.google.api.servicemanagement.v1.IManagedService, + | protos.google.api.servicemanagement.v1.IGetServiceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Gets a managed service. Authentication is required unless the service is + * public. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the `ServiceManager` overview for naming + * requirements. For example: `example.googleapis.com`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ManagedService]{@link google.api.servicemanagement.v1.ManagedService}. + * 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.getService(request); + */ + getService( + request: protos.google.api.servicemanagement.v1.IGetServiceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.servicemanagement.v1.IManagedService, + | protos.google.api.servicemanagement.v1.IGetServiceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.servicemanagement.v1.IManagedService, + | protos.google.api.servicemanagement.v1.IGetServiceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.servicemanagement.v1.IManagedService, + protos.google.api.servicemanagement.v1.IGetServiceRequest | 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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.getService(request, options, callback); + } + getServiceConfig( + request: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.IService, + ( + | protos.google.api.servicemanagement.v1.IGetServiceConfigRequest + | undefined + ), + {} | undefined + ] + >; + getServiceConfig( + request: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IService, + | protos.google.api.servicemanagement.v1.IGetServiceConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getServiceConfig( + request: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, + callback: Callback< + protos.google.api.IService, + | protos.google.api.servicemanagement.v1.IGetServiceConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Gets a service configuration (version) for a managed service. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {string} request.configId + * Required. The id of the service configuration resource. + * + * This field must be specified for the server to return all fields, including + * `SourceInfo`. + * @param {google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView} request.view + * Specifies which parts of the Service Config should be returned in the + * response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Service]{@link google.api.Service}. + * 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.getServiceConfig(request); + */ + getServiceConfig( + request: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.IService, + | protos.google.api.servicemanagement.v1.IGetServiceConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.IService, + | protos.google.api.servicemanagement.v1.IGetServiceConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.IService, + ( + | protos.google.api.servicemanagement.v1.IGetServiceConfigRequest + | 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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.getServiceConfig(request, options, callback); + } + createServiceConfig( + request: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.IService, + ( + | protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest + | undefined + ), + {} | undefined + ] + >; + createServiceConfig( + request: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IService, + | protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createServiceConfig( + request: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, + callback: Callback< + protos.google.api.IService, + | protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a new service configuration (version) for a managed service. + * This method only stores the service configuration. To roll out the service + * configuration to backend systems please call + * {@link google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout|CreateServiceRollout}. + * + * Only the 100 most recent service configurations and ones referenced by + * existing rollouts are kept for each service. The rest will be deleted + * eventually. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {google.api.Service} request.serviceConfig + * Required. The service configuration resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Service]{@link google.api.Service}. + * 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.createServiceConfig(request); + */ + createServiceConfig( + request: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.IService, + | protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.IService, + | protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.IService, + ( + | protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest + | 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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.createServiceConfig(request, options, callback); + } + getServiceRollout( + request: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.servicemanagement.v1.IRollout, + ( + | protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest + | undefined + ), + {} | undefined + ] + >; + getServiceRollout( + request: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, + options: CallOptions, + callback: Callback< + protos.google.api.servicemanagement.v1.IRollout, + | protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getServiceRollout( + request: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, + callback: Callback< + protos.google.api.servicemanagement.v1.IRollout, + | protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Gets a service configuration {@link google.api.servicemanagement.v1.Rollout|rollout}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {string} request.rolloutId + * Required. The id of the rollout resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Rollout]{@link google.api.servicemanagement.v1.Rollout}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getServiceRollout(request); + */ + getServiceRollout( + request: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.servicemanagement.v1.IRollout, + | protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.servicemanagement.v1.IRollout, + | protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.servicemanagement.v1.IRollout, + ( + | protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest + | 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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.getServiceRollout(request, options, callback); + } + generateConfigReport( + request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, + ( + | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest + | undefined + ), + {} | undefined + ] + >; + generateConfigReport( + request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, + options: CallOptions, + callback: Callback< + protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, + | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateConfigReport( + request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, + callback: Callback< + protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, + | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Generates and returns a report (errors, warnings and changes from + * existing configurations) associated with + * GenerateConfigReportRequest.new_value + * + * If GenerateConfigReportRequest.old_value is specified, + * GenerateConfigReportRequest will contain a single ChangeReport based on the + * comparison between GenerateConfigReportRequest.new_value and + * GenerateConfigReportRequest.old_value. + * If GenerateConfigReportRequest.old_value is not specified, this method + * will compare GenerateConfigReportRequest.new_value with the last pushed + * service configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.Any} request.newConfig + * Required. Service configuration for which we want to generate the report. + * For this version of API, the supported types are + * {@link google.api.servicemanagement.v1.ConfigRef|google.api.servicemanagement.v1.ConfigRef}, + * {@link google.api.servicemanagement.v1.ConfigSource|google.api.servicemanagement.v1.ConfigSource}, + * and {@link google.api.Service|google.api.Service} + * @param {google.protobuf.Any} [request.oldConfig] + * Optional. Service configuration against which the comparison will be done. + * For this version of API, the supported types are + * {@link google.api.servicemanagement.v1.ConfigRef|google.api.servicemanagement.v1.ConfigRef}, + * {@link google.api.servicemanagement.v1.ConfigSource|google.api.servicemanagement.v1.ConfigSource}, + * and {@link google.api.Service|google.api.Service} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [GenerateConfigReportResponse]{@link google.api.servicemanagement.v1.GenerateConfigReportResponse}. + * 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.generateConfigReport(request); + */ + generateConfigReport( + request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, + | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, + | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, + ( + | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + this.initialize(); + return this.innerApiCalls.generateConfigReport(request, options, callback); + } + + createService( + request: protos.google.api.servicemanagement.v1.ICreateServiceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.IManagedService, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createService( + request: protos.google.api.servicemanagement.v1.ICreateServiceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IManagedService, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createService( + request: protos.google.api.servicemanagement.v1.ICreateServiceRequest, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IManagedService, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a new managed service. + * Please note one producer project can own no more than 20 services. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {google.api.servicemanagement.v1.ManagedService} request.service + * Required. Initial values for the service resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createService(request); + * const [response] = await operation.promise(); + */ + createService( + request: protos.google.api.servicemanagement.v1.ICreateServiceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.api.servicemanagement.v1.IManagedService, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IManagedService, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.IManagedService, + protos.google.api.servicemanagement.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 || {}; + this.initialize(); + return this.innerApiCalls.createService(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createService()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateServiceProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateServiceProgress( + name: string + ): Promise< + LROperation< + protos.google.api.servicemanagement.v1.ManagedService, + protos.google.api.servicemanagement.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.createService, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.api.servicemanagement.v1.ManagedService, + protos.google.api.servicemanagement.v1.OperationMetadata + >; + } + deleteService( + request: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteService( + request: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteService( + request: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a managed service. This method will change the service to the + * `Soft-Delete` state for 30 days. Within this period, service producers may + * call {@link google.api.servicemanagement.v1.ServiceManager.UndeleteService|UndeleteService} to restore the service. + * After 30 days, the service will be permanently deleted. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.deleteService(request); + * const [response] = await operation.promise(); + */ + deleteService( + request: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.api.servicemanagement.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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.deleteService(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteService()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDeleteServiceProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkDeleteServiceProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.api.servicemanagement.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.deleteService, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.api.servicemanagement.v1.OperationMetadata + >; + } + undeleteService( + request: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + undeleteService( + request: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + undeleteService( + request: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Revives a previously deleted managed service. The method restores the + * service using the configuration at the time the service was deleted. + * The target service must exist and must have been deleted within the + * last 30 days. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.undeleteService(request); + * const [response] = await operation.promise(); + */ + undeleteService( + request: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, + protos.google.api.servicemanagement.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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.undeleteService(request, options, callback); + } + /** + * Check the status of the long running operation returned by `undeleteService()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUndeleteServiceProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkUndeleteServiceProgress( + name: string + ): Promise< + LROperation< + protos.google.api.servicemanagement.v1.UndeleteServiceResponse, + protos.google.api.servicemanagement.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.undeleteService, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.api.servicemanagement.v1.UndeleteServiceResponse, + protos.google.api.servicemanagement.v1.OperationMetadata + >; + } + submitConfigSource( + request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + submitConfigSource( + request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + submitConfigSource( + request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a new service configuration (version) for a managed service based + * on + * user-supplied configuration source files (for example: OpenAPI + * Specification). This method stores the source configurations as well as the + * generated service configuration. To rollout the service configuration to + * other services, + * please call {@link google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout|CreateServiceRollout}. + * + * Only the 100 most recent configuration sources and ones referenced by + * existing service configurtions are kept for each service. The rest will be + * deleted eventually. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {google.api.servicemanagement.v1.ConfigSource} request.configSource + * Required. The source configuration for the service. + * @param {boolean} [request.validateOnly] + * Optional. If set, this will result in the generation of a + * `google.api.Service` configuration based on the `ConfigSource` provided, + * but the generated config and the sources will NOT be persisted. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.submitConfigSource(request); + * const [response] = await operation.promise(); + */ + submitConfigSource( + request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, + protos.google.api.servicemanagement.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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.submitConfigSource(request, options, callback); + } + /** + * Check the status of the long running operation returned by `submitConfigSource()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkSubmitConfigSourceProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkSubmitConfigSourceProgress( + name: string + ): Promise< + LROperation< + protos.google.api.servicemanagement.v1.SubmitConfigSourceResponse, + protos.google.api.servicemanagement.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.submitConfigSource, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.api.servicemanagement.v1.SubmitConfigSourceResponse, + protos.google.api.servicemanagement.v1.OperationMetadata + >; + } + createServiceRollout( + request: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.IRollout, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createServiceRollout( + request: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IRollout, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createServiceRollout( + request: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IRollout, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a new service configuration rollout. Based on rollout, the + * Google Service Management will roll out the service configurations to + * different backend services. For example, the logging configuration will be + * pushed to Google Cloud Logging. + * + * Please note that any previous pending and running Rollouts and associated + * Operations will be automatically cancelled so that the latest Rollout will + * not be blocked by previous Rollouts. + * + * Only the 100 most recent (in any state) and the last 10 successful (if not + * already part of the set of 100 most recent) rollouts are kept for each + * service. The rest will be deleted eventually. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {google.api.servicemanagement.v1.Rollout} request.rollout + * Required. The rollout resource. The `service_name` field is output only. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createServiceRollout(request); + * const [response] = await operation.promise(); + */ + createServiceRollout( + request: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.api.servicemanagement.v1.IRollout, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IRollout, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.IRollout, + protos.google.api.servicemanagement.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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.createServiceRollout(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createServiceRollout()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateServiceRolloutProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateServiceRolloutProgress( + name: string + ): Promise< + LROperation< + protos.google.api.servicemanagement.v1.Rollout, + protos.google.api.servicemanagement.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.createServiceRollout, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.api.servicemanagement.v1.Rollout, + protos.google.api.servicemanagement.v1.OperationMetadata + >; + } + enableService( + request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.IEnableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + enableService( + request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IEnableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + enableService( + request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IEnableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Enables a {@link google.api.servicemanagement.v1.ManagedService|service} for a project, so it can be used + * for the project. See + * [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for + * more information. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. Name of the service to enable. Specifying an unknown service name will + * cause the request to fail. + * @param {string} request.consumerId + * Required. The identity of consumer resource which service enablement will be + * applied to. + * + * The Google Service Management implementation accepts the following + * forms: + * - "project:" + * + * Note: this is made compatible with + * google.api.servicecontrol.v1.Operation.consumer_id. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.enableService(request); + * const [response] = await operation.promise(); + */ + enableService( + request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.api.servicemanagement.v1.IEnableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IEnableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.IEnableServiceResponse, + protos.google.api.servicemanagement.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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.enableService(request, options, callback); + } + /** + * Check the status of the long running operation returned by `enableService()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkEnableServiceProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkEnableServiceProgress( + name: string + ): Promise< + LROperation< + protos.google.api.servicemanagement.v1.EnableServiceResponse, + protos.google.api.servicemanagement.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.enableService, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.api.servicemanagement.v1.EnableServiceResponse, + protos.google.api.servicemanagement.v1.OperationMetadata + >; + } + disableService( + request: protos.google.api.servicemanagement.v1.IDisableServiceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.IDisableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + disableService( + request: protos.google.api.servicemanagement.v1.IDisableServiceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IDisableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + disableService( + request: protos.google.api.servicemanagement.v1.IDisableServiceRequest, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IDisableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Disables a {@link google.api.servicemanagement.v1.ManagedService|service} for a project, so it can no longer be + * be used for the project. It prevents accidental usage that may cause + * unexpected billing charges or security leaks. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. Name of the service to disable. Specifying an unknown service name + * will cause the request to fail. + * @param {string} request.consumerId + * Required. The identity of consumer resource which service disablement will be + * applied to. + * + * The Google Service Management implementation accepts the following + * forms: + * - "project:" + * + * Note: this is made compatible with + * google.api.servicecontrol.v1.Operation.consumer_id. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.disableService(request); + * const [response] = await operation.promise(); + */ + disableService( + request: protos.google.api.servicemanagement.v1.IDisableServiceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.api.servicemanagement.v1.IDisableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IDisableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.IDisableServiceResponse, + protos.google.api.servicemanagement.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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.disableService(request, options, callback); + } + /** + * Check the status of the long running operation returned by `disableService()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDisableServiceProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkDisableServiceProgress( + name: string + ): Promise< + LROperation< + protos.google.api.servicemanagement.v1.DisableServiceResponse, + protos.google.api.servicemanagement.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.disableService, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.api.servicemanagement.v1.DisableServiceResponse, + protos.google.api.servicemanagement.v1.OperationMetadata + >; + } + listServices( + request: protos.google.api.servicemanagement.v1.IListServicesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.servicemanagement.v1.IManagedService[], + protos.google.api.servicemanagement.v1.IListServicesRequest | null, + protos.google.api.servicemanagement.v1.IListServicesResponse + ] + >; + listServices( + request: protos.google.api.servicemanagement.v1.IListServicesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServicesRequest, + | protos.google.api.servicemanagement.v1.IListServicesResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IManagedService + > + ): void; + listServices( + request: protos.google.api.servicemanagement.v1.IListServicesRequest, + callback: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServicesRequest, + | protos.google.api.servicemanagement.v1.IListServicesResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IManagedService + > + ): void; + /** + * Lists managed services. + * + * Returns all public services. For authenticated users, also returns all + * services the calling user has "servicemanagement.services.get" permission + * for. + * + * **BETA:** If the caller specifies the `consumer_id`, it returns only the + * services enabled on the consumer. The `consumer_id` must have the format + * of "project:{PROJECT-ID}". + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.producerProjectId + * Include services produced by the specified project. + * @param {number} request.pageSize + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + * @param {string} request.pageToken + * Token identifying which result to start with; returned by a previous list + * call. + * @param {string} request.consumerId + * Include services consumed by the specified consumer. + * + * The Google Service Management implementation accepts the following + * forms: + * - project: + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ManagedService]{@link google.api.servicemanagement.v1.ManagedService}. + * 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 `listServicesAsync()` + * 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. + */ + listServices( + request: protos.google.api.servicemanagement.v1.IListServicesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.api.servicemanagement.v1.IListServicesRequest, + | protos.google.api.servicemanagement.v1.IListServicesResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IManagedService + >, + callback?: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServicesRequest, + | protos.google.api.servicemanagement.v1.IListServicesResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IManagedService + > + ): Promise< + [ + protos.google.api.servicemanagement.v1.IManagedService[], + protos.google.api.servicemanagement.v1.IListServicesRequest | null, + protos.google.api.servicemanagement.v1.IListServicesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + this.initialize(); + return this.innerApiCalls.listServices(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.producerProjectId + * Include services produced by the specified project. + * @param {number} request.pageSize + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + * @param {string} request.pageToken + * Token identifying which result to start with; returned by a previous list + * call. + * @param {string} request.consumerId + * Include services consumed by the specified consumer. + * + * The Google Service Management implementation accepts the following + * forms: + * - project: + * @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 [ManagedService]{@link google.api.servicemanagement.v1.ManagedService} 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 `listServicesAsync()` + * 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. + */ + listServicesStream( + request?: protos.google.api.servicemanagement.v1.IListServicesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listServices.createStream( + this.innerApiCalls.listServices as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listServices`, 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.producerProjectId + * Include services produced by the specified project. + * @param {number} request.pageSize + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + * @param {string} request.pageToken + * Token identifying which result to start with; returned by a previous list + * call. + * @param {string} request.consumerId + * Include services consumed by the specified consumer. + * + * The Google Service Management implementation accepts the following + * forms: + * - project: + * @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 + * [ManagedService]{@link google.api.servicemanagement.v1.ManagedService}. 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.listServicesAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listServicesAsync( + request?: protos.google.api.servicemanagement.v1.IListServicesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listServices.asyncIterate( + this.innerApiCalls['listServices'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + listServiceConfigs( + request: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.IService[], + protos.google.api.servicemanagement.v1.IListServiceConfigsRequest | null, + protos.google.api.servicemanagement.v1.IListServiceConfigsResponse + ] + >; + listServiceConfigs( + request: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + | protos.google.api.servicemanagement.v1.IListServiceConfigsResponse + | null + | undefined, + protos.google.api.IService + > + ): void; + listServiceConfigs( + request: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + callback: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + | protos.google.api.servicemanagement.v1.IListServiceConfigsResponse + | null + | undefined, + protos.google.api.IService + > + ): void; + /** + * Lists the history of the service configuration for a managed service, + * from the newest to the oldest. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {string} request.pageToken + * The token of the page to retrieve. + * @param {number} request.pageSize + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Service]{@link google.api.Service}. + * 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 `listServiceConfigsAsync()` + * 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. + */ + listServiceConfigs( + request: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + | protos.google.api.servicemanagement.v1.IListServiceConfigsResponse + | null + | undefined, + protos.google.api.IService + >, + callback?: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + | protos.google.api.servicemanagement.v1.IListServiceConfigsResponse + | null + | undefined, + protos.google.api.IService + > + ): Promise< + [ + protos.google.api.IService[], + protos.google.api.servicemanagement.v1.IListServiceConfigsRequest | null, + protos.google.api.servicemanagement.v1.IListServiceConfigsResponse + ] + > | 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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.listServiceConfigs(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.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {string} request.pageToken + * The token of the page to retrieve. + * @param {number} request.pageSize + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + * @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 [Service]{@link google.api.Service} 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 `listServiceConfigsAsync()` + * 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. + */ + listServiceConfigsStream( + request?: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + 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({ + service_name: request.serviceName || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listServiceConfigs.createStream( + this.innerApiCalls.listServiceConfigs as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listServiceConfigs`, 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.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {string} request.pageToken + * The token of the page to retrieve. + * @param {number} request.pageSize + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + * @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 + * [Service]{@link google.api.Service}. 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.listServiceConfigsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listServiceConfigsAsync( + request?: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + 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({ + service_name: request.serviceName || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listServiceConfigs.asyncIterate( + this.innerApiCalls['listServiceConfigs'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + listServiceRollouts( + request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.servicemanagement.v1.IRollout[], + protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest | null, + protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse + ] + >; + listServiceRollouts( + request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + | protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IRollout + > + ): void; + listServiceRollouts( + request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + callback: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + | protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IRollout + > + ): void; + /** + * Lists the history of the service configuration rollouts for a managed + * service, from the newest to the oldest. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {string} request.pageToken + * The token of the page to retrieve. + * @param {number} request.pageSize + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + * @param {string} request.filter + * Required. Use `filter` to return subset of rollouts. + * The following filters are supported: + * -- To limit the results to only those in + * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * use filter='status=SUCCESS' + * -- To limit the results to those in + * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Rollout]{@link google.api.servicemanagement.v1.Rollout}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listServiceRolloutsAsync()` + * 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. + */ + listServiceRollouts( + request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + | protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IRollout + >, + callback?: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + | protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IRollout + > + ): Promise< + [ + protos.google.api.servicemanagement.v1.IRollout[], + protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest | null, + protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse + ] + > | 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({ + service_name: request.serviceName || '', + }); + this.initialize(); + return this.innerApiCalls.listServiceRollouts(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.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {string} request.pageToken + * The token of the page to retrieve. + * @param {number} request.pageSize + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + * @param {string} request.filter + * Required. Use `filter` to return subset of rollouts. + * The following filters are supported: + * -- To limit the results to only those in + * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * use filter='status=SUCCESS' + * -- To limit the results to those in + * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Rollout]{@link google.api.servicemanagement.v1.Rollout} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listServiceRolloutsAsync()` + * 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. + */ + listServiceRolloutsStream( + request?: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + 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({ + service_name: request.serviceName || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listServiceRollouts.createStream( + this.innerApiCalls.listServiceRollouts as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listServiceRollouts`, 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.serviceName + * Required. The name of the service. See the [overview](/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {string} request.pageToken + * The token of the page to retrieve. + * @param {number} request.pageSize + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + * @param {string} request.filter + * Required. Use `filter` to return subset of rollouts. + * The following filters are supported: + * -- To limit the results to only those in + * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * use filter='status=SUCCESS' + * -- To limit the results to those in + * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Rollout]{@link google.api.servicemanagement.v1.Rollout}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listServiceRolloutsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listServiceRolloutsAsync( + request?: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + 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({ + service_name: request.serviceName || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listServiceRollouts.asyncIterate( + this.innerApiCalls['listServiceRollouts'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.serviceManagerStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client_config.json b/packages/google-api-servicemanagement/src/v1/service_manager_client_config.json new file mode 100644 index 00000000000..63ee9787bc9 --- /dev/null +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client_config.json @@ -0,0 +1,101 @@ +{ + "interfaces": { + "google.api.servicemanagement.v1.ServiceManager": { + "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": { + "ListServices": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetService": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateService": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteService": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UndeleteService": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListServiceConfigs": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetServiceConfig": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateServiceConfig": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SubmitConfigSource": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListServiceRollouts": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetServiceRollout": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateServiceRollout": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GenerateConfigReport": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "EnableService": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DisableService": { + "timeout_millis": 10000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_proto_list.json b/packages/google-api-servicemanagement/src/v1/service_manager_proto_list.json new file mode 100644 index 00000000000..205a739ef94 --- /dev/null +++ b/packages/google-api-servicemanagement/src/v1/service_manager_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/api/servicemanagement/v1/resources.proto", + "../../protos/google/api/servicemanagement/v1/servicemanager.proto" +] diff --git a/packages/google-api-servicemanagement/synth.metadata b/packages/google-api-servicemanagement/synth.metadata new file mode 100644 index 00000000000..662e3b22304 --- /dev/null +++ b/packages/google-api-servicemanagement/synth.metadata @@ -0,0 +1,37 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "sso://user/sofialeon/nodejs-service-management", + "sha": "1c6e94f8fe0215b6a8314951e5dcc482228db573" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "68fdb1b7dc47ff7a3bda6b7744f5e01887b94d3b", + "internalRef": "361897210" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "e5fa6d93e42918dd4a000a80b92be23f5f4c6ac7" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "servicemanagement", + "apiVersion": "v1", + "language": "nodejs", + "generator": "bazel" + } + } + ] +} \ No newline at end of file diff --git a/packages/google-api-servicemanagement/synth.py b/packages/google-api-servicemanagement/synth.py index cdf84d4c89d..b79ba1c4337 100644 --- a/packages/google-api-servicemanagement/synth.py +++ b/packages/google-api-servicemanagement/synth.py @@ -30,7 +30,7 @@ name, version, bazel_target=f"//google/api/servicemanagement/{version}:api-servicemanagement-{version}-nodejs") - s.copy(library, excludes=[]) + s.copy(library, excludes=["package.json","linkinator.config.json", "system-test/fixtures/sample/src/index.js","system-test/fixtures/sample/src/index.ts"]) # Copy common templates common_templates = gcp.CommonTemplates() diff --git a/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.js b/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..b30ce31fe85 --- /dev/null +++ b/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const servicemanagement = require('undefined'); + +function main() { + const serviceManagerClient = new servicemanagement.ServiceManagerClient(); +} + +main(); diff --git a/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts b/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..a3abf0dc7b9 --- /dev/null +++ b/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {ServiceManagerClient} from 'undefined'; + +// check that the client class type name can be used +function doStuffWithServiceManagerClient(client: ServiceManagerClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const serviceManagerClient = new ServiceManagerClient(); + doStuffWithServiceManagerClient(serviceManagerClient); +} + +main(); diff --git a/packages/google-api-servicemanagement/system-test/install.ts b/packages/google-api-servicemanagement/system-test/install.ts new file mode 100644 index 00000000000..d2d61c0396f --- /dev/null +++ b/packages/google-api-servicemanagement/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts new file mode 100644 index 00000000000..4c3a2bc2a3a --- /dev/null +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -0,0 +1,2962 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as servicemanagerModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ServiceManagerClient', () => { + it('has servicePath', () => { + const servicePath = + servicemanagerModule.v1.ServiceManagerClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + servicemanagerModule.v1.ServiceManagerClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = servicemanagerModule.v1.ServiceManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new servicemanagerModule.v1.ServiceManagerClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.serviceManagerStub, undefined); + await client.initialize(); + assert(client.serviceManagerStub); + }); + + it('has close method', () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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 servicemanagerModule.v1.ServiceManagerClient({ + 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('getService', () => { + it('invokes getService without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ); + client.innerApiCalls.getService = stubSimpleCall(expectedResponse); + const [response] = await client.getService(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getService without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ); + client.innerApiCalls.getService = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getService( + request, + ( + err?: Error | null, + result?: protos.google.api.servicemanagement.v1.IManagedService | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getService with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getService = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getService(request), expectedError); + assert( + (client.innerApiCalls.getService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getServiceConfig', () => { + it('invokes getServiceConfig without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.Service() + ); + client.innerApiCalls.getServiceConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getServiceConfig(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getServiceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getServiceConfig without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.Service() + ); + client.innerApiCalls.getServiceConfig = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getServiceConfig( + request, + (err?: Error | null, result?: protos.google.api.IService | null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getServiceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getServiceConfig with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getServiceConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getServiceConfig(request), expectedError); + assert( + (client.innerApiCalls.getServiceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createServiceConfig', () => { + it('invokes createServiceConfig without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.Service() + ); + client.innerApiCalls.createServiceConfig = stubSimpleCall( + expectedResponse + ); + const [response] = await client.createServiceConfig(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createServiceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createServiceConfig without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.Service() + ); + client.innerApiCalls.createServiceConfig = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createServiceConfig( + request, + (err?: Error | null, result?: protos.google.api.IService | null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createServiceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createServiceConfig with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createServiceConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createServiceConfig(request), expectedError); + assert( + (client.innerApiCalls.createServiceConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getServiceRollout', () => { + it('invokes getServiceRollout without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ); + client.innerApiCalls.getServiceRollout = stubSimpleCall(expectedResponse); + const [response] = await client.getServiceRollout(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getServiceRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getServiceRollout without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ); + client.innerApiCalls.getServiceRollout = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getServiceRollout( + request, + ( + err?: Error | null, + result?: protos.google.api.servicemanagement.v1.IRollout | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getServiceRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getServiceRollout with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getServiceRollout = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getServiceRollout(request), expectedError); + assert( + (client.innerApiCalls.getServiceRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('generateConfigReport', () => { + it('invokes generateConfigReport without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GenerateConfigReportResponse() + ); + client.innerApiCalls.generateConfigReport = stubSimpleCall( + expectedResponse + ); + const [response] = await client.generateConfigReport(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.generateConfigReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes generateConfigReport without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GenerateConfigReportResponse() + ); + client.innerApiCalls.generateConfigReport = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.generateConfigReport( + request, + ( + err?: Error | null, + result?: protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.generateConfigReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes generateConfigReport with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.generateConfigReport = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.generateConfigReport(request), expectedError); + assert( + (client.innerApiCalls.generateConfigReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createService', () => { + it('invokes createService without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createService = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.createService(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createService without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createService = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createService( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.api.servicemanagement.v1.IManagedService, + protos.google.api.servicemanagement.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.api.servicemanagement.v1.IManagedService, + protos.google.api.servicemanagement.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createService with call error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.createService = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createService(request), expectedError); + assert( + (client.innerApiCalls.createService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createService with LRO error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.createService = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createService(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateServiceProgress without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkCreateServiceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateServiceProgress with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkCreateServiceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteService', () => { + it('invokes deleteService without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.DeleteServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteService = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.deleteService(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteService without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.DeleteServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteService = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteService( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.api.servicemanagement.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.api.servicemanagement.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteService with call error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.DeleteServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteService = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteService(request), expectedError); + assert( + (client.innerApiCalls.deleteService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteService with LRO error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.DeleteServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteService = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteService(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteServiceProgress without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkDeleteServiceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteServiceProgress with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkDeleteServiceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('undeleteService', () => { + it('invokes undeleteService without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.undeleteService = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.undeleteService(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.undeleteService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes undeleteService without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.undeleteService = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.undeleteService( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.api.servicemanagement.v1.IUndeleteServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.undeleteService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes undeleteService with call error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.undeleteService = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.undeleteService(request), expectedError); + assert( + (client.innerApiCalls.undeleteService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes undeleteService with LRO error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.undeleteService = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.undeleteService(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.undeleteService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUndeleteServiceProgress without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkUndeleteServiceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUndeleteServiceProgress with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkUndeleteServiceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('submitConfigSource', () => { + it('invokes submitConfigSource without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.submitConfigSource = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.submitConfigSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.submitConfigSource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes submitConfigSource without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.submitConfigSource = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.submitConfigSource( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.submitConfigSource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes submitConfigSource with call error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.submitConfigSource = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.submitConfigSource(request), expectedError); + assert( + (client.innerApiCalls.submitConfigSource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes submitConfigSource with LRO error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.submitConfigSource = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.submitConfigSource(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.submitConfigSource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkSubmitConfigSourceProgress without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkSubmitConfigSourceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSubmitConfigSourceProgress with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkSubmitConfigSourceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createServiceRollout', () => { + it('invokes createServiceRollout without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createServiceRollout = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.createServiceRollout(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createServiceRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createServiceRollout without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createServiceRollout = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createServiceRollout( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.api.servicemanagement.v1.IRollout, + protos.google.api.servicemanagement.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.api.servicemanagement.v1.IRollout, + protos.google.api.servicemanagement.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createServiceRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createServiceRollout with call error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createServiceRollout = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createServiceRollout(request), expectedError); + assert( + (client.innerApiCalls.createServiceRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createServiceRollout with LRO error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createServiceRollout = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createServiceRollout(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createServiceRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateServiceRolloutProgress without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkCreateServiceRolloutProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateServiceRolloutProgress with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkCreateServiceRolloutProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('enableService', () => { + it('invokes enableService without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.EnableServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.enableService = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.enableService(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.enableService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes enableService without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.EnableServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.enableService = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.enableService( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.api.servicemanagement.v1.IEnableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.api.servicemanagement.v1.IEnableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.enableService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes enableService with call error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.EnableServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.enableService = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.enableService(request), expectedError); + assert( + (client.innerApiCalls.enableService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes enableService with LRO error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.EnableServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.enableService = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.enableService(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.enableService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkEnableServiceProgress without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkEnableServiceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkEnableServiceProgress with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkEnableServiceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('disableService', () => { + it('invokes disableService without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.DisableServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.disableService = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.disableService(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.disableService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes disableService without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.DisableServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.disableService = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.disableService( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.api.servicemanagement.v1.IDisableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.api.servicemanagement.v1.IDisableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.disableService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes disableService with call error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.DisableServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.disableService = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.disableService(request), expectedError); + assert( + (client.innerApiCalls.disableService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes disableService with LRO error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.DisableServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.disableService = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.disableService(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.disableService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDisableServiceProgress without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkDisableServiceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDisableServiceProgress with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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.checkDisableServiceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listServices', () => { + it('invokes listServices without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServicesRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + ]; + client.innerApiCalls.listServices = stubSimpleCall(expectedResponse); + const [response] = await client.listServices(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listServices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listServices without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServicesRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + ]; + client.innerApiCalls.listServices = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listServices( + request, + ( + err?: Error | null, + result?: + | protos.google.api.servicemanagement.v1.IManagedService[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listServices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listServices with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServicesRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.listServices = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listServices(request), expectedError); + assert( + (client.innerApiCalls.listServices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listServicesStream without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServicesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + ]; + client.descriptors.page.listServices.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listServicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.servicemanagement.v1.ManagedService[] = []; + stream.on( + 'data', + (response: protos.google.api.servicemanagement.v1.ManagedService) => { + 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.listServices.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listServices, request) + ); + }); + + it('invokes listServicesStream with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServicesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listServices.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listServicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.servicemanagement.v1.ManagedService[] = []; + stream.on( + 'data', + (response: protos.google.api.servicemanagement.v1.ManagedService) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listServices.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listServices, request) + ); + }); + + it('uses async iteration with listServices without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServicesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.ManagedService() + ), + ]; + client.descriptors.page.listServices.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.api.servicemanagement.v1.IManagedService[] = []; + const iterable = client.listServicesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listServices + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listServices with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServicesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listServices.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listServicesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.api.servicemanagement.v1.IManagedService[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listServices + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + }); + }); + + describe('listServiceConfigs', () => { + it('invokes listServiceConfigs without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.Service()), + generateSampleMessage(new protos.google.api.Service()), + generateSampleMessage(new protos.google.api.Service()), + ]; + client.innerApiCalls.listServiceConfigs = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listServiceConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listServiceConfigs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listServiceConfigs without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.Service()), + generateSampleMessage(new protos.google.api.Service()), + generateSampleMessage(new protos.google.api.Service()), + ]; + client.innerApiCalls.listServiceConfigs = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listServiceConfigs( + request, + ( + err?: Error | null, + result?: protos.google.api.IService[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listServiceConfigs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listServiceConfigs with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listServiceConfigs = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listServiceConfigs(request), expectedError); + assert( + (client.innerApiCalls.listServiceConfigs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listServiceConfigsStream without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.Service()), + generateSampleMessage(new protos.google.api.Service()), + generateSampleMessage(new protos.google.api.Service()), + ]; + client.descriptors.page.listServiceConfigs.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listServiceConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.Service[] = []; + stream.on('data', (response: protos.google.api.Service) => { + 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.listServiceConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listServiceConfigs, request) + ); + assert.strictEqual( + (client.descriptors.page.listServiceConfigs + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listServiceConfigsStream with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedError = new Error('expected'); + client.descriptors.page.listServiceConfigs.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listServiceConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.Service[] = []; + stream.on('data', (response: protos.google.api.Service) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listServiceConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listServiceConfigs, request) + ); + assert.strictEqual( + (client.descriptors.page.listServiceConfigs + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listServiceConfigs without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.Service()), + generateSampleMessage(new protos.google.api.Service()), + generateSampleMessage(new protos.google.api.Service()), + ]; + client.descriptors.page.listServiceConfigs.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.api.IService[] = []; + const iterable = client.listServiceConfigsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listServiceConfigs + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listServiceConfigs + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listServiceConfigs with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedError = new Error('expected'); + client.descriptors.page.listServiceConfigs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listServiceConfigsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.api.IService[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listServiceConfigs + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listServiceConfigs + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listServiceRollouts', () => { + it('invokes listServiceRollouts without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + ]; + client.innerApiCalls.listServiceRollouts = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listServiceRollouts(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listServiceRollouts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listServiceRollouts without error using callback', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + ]; + client.innerApiCalls.listServiceRollouts = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listServiceRollouts( + request, + ( + err?: Error | null, + result?: protos.google.api.servicemanagement.v1.IRollout[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listServiceRollouts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listServiceRollouts with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listServiceRollouts = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listServiceRollouts(request), expectedError); + assert( + (client.innerApiCalls.listServiceRollouts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listServiceRolloutsStream without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + ]; + client.descriptors.page.listServiceRollouts.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listServiceRolloutsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.servicemanagement.v1.Rollout[] = []; + stream.on( + 'data', + (response: protos.google.api.servicemanagement.v1.Rollout) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listServiceRollouts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listServiceRollouts, request) + ); + assert.strictEqual( + (client.descriptors.page.listServiceRollouts + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listServiceRolloutsStream with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedError = new Error('expected'); + client.descriptors.page.listServiceRollouts.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listServiceRolloutsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.servicemanagement.v1.Rollout[] = []; + stream.on( + 'data', + (response: protos.google.api.servicemanagement.v1.Rollout) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listServiceRollouts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listServiceRollouts, request) + ); + assert.strictEqual( + (client.descriptors.page.listServiceRollouts + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listServiceRollouts without error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + generateSampleMessage( + new protos.google.api.servicemanagement.v1.Rollout() + ), + ]; + client.descriptors.page.listServiceRollouts.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.api.servicemanagement.v1.IRollout[] = []; + const iterable = client.listServiceRolloutsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listServiceRollouts + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listServiceRollouts + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listServiceRollouts with error', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedError = new Error('expected'); + client.descriptors.page.listServiceRollouts.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listServiceRolloutsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.api.servicemanagement.v1.IRollout[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listServiceRollouts + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listServiceRollouts + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); +}); diff --git a/packages/google-api-servicemanagement/tsconfig.json b/packages/google-api-servicemanagement/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-api-servicemanagement/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-api-servicemanagement/webpack.config.js b/packages/google-api-servicemanagement/webpack.config.js new file mode 100644 index 00000000000..3f75927a086 --- /dev/null +++ b/packages/google-api-servicemanagement/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: 'ServiceManager', + filename: './service-manager.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 d04b12990c91872367c09bbc12aa950c4f737acc Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Mon, 29 Mar 2021 18:58:56 -0700 Subject: [PATCH 05/85] feat: add initial samples (#2) --- .../.repo-metadata.json | 2 +- .../google-api-servicemanagement/README.md | 28 +++++-------- .../linkinator.config.json | 2 +- .../google-api-servicemanagement/package.json | 10 ++--- .../servicemanagement/v1/servicemanager.proto | 4 +- .../protos/protos.js | 2 +- .../protos/protos.json | 2 +- .../samples/package.json | 2 +- .../samples/quickstart.js | 26 +++++------- .../samples/test/quickstart.js | 13 ++---- .../src/v1/service_manager_client.ts | 40 +++++++++---------- .../synth.metadata | 10 ++--- .../google-api-servicemanagement/synth.py | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- 15 files changed, 65 insertions(+), 82 deletions(-) diff --git a/packages/google-api-servicemanagement/.repo-metadata.json b/packages/google-api-servicemanagement/.repo-metadata.json index b7a466eeb25..686b67c241f 100644 --- a/packages/google-api-servicemanagement/.repo-metadata.json +++ b/packages/google-api-servicemanagement/.repo-metadata.json @@ -1,5 +1,5 @@ { - "name": "servicemanagement", + "name": "service-management", "name_pretty": "Service Management API", "product_documentation": "https://cloud.google.com/service-infrastructure/docs/overview/", "client_documentation": "https://cloud.google.com/service-infrastructure/docs/service-management/reference", diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index 6e79d0414da..fe5a312caf6 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -5,13 +5,13 @@ # [Service Management API: Node.js Client](https://github.com/googleapis/nodejs-service-management) [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/undefined.svg)](https://www.npmjs.org/package/undefined) +[![npm version](https://img.shields.io/npm/v/@google-cloud/service-management.svg)](https://www.npmjs.org/package/@google-cloud/service-management) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-service-management/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-service-management) -Servicemanagement client for Node.js +Service management client for Node.js A comprehensive list of changes in each version may be found in @@ -51,34 +51,28 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Installing the client library ```bash -npm install undefined +npm install @google-cloud/service-management ``` ### Using the client library ```javascript -// Imports the Google Cloud client library -// remove this line after package is released -// eslint-disable-next-line node/no-missing-require -const {ServiceManagerClient} = require(''); +// Imports the Google Cloud client library +const {ServiceManagerClient} = require('@google-cloud/service-management'); // 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 {ServiceManagerClient}(); - -//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); +const client = new ServiceManagerClient(); + +async function listServices() { + const [thing] = await client.listServices({producerProjectId: projectId}); + console.info(thing); } -doSomething(); +listServices(); ``` diff --git a/packages/google-api-servicemanagement/linkinator.config.json b/packages/google-api-servicemanagement/linkinator.config.json index 0947c2e0e5b..9b7641b88f8 100644 --- a/packages/google-api-servicemanagement/linkinator.config.json +++ b/packages/google-api-servicemanagement/linkinator.config.json @@ -1 +1 @@ -{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":10} \ No newline at end of file +{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io", "https://github.com/googleapis/nodejs-service-management/blob/master/CHANGELOG.md"],"silent":true,"concurrency":10} \ No newline at end of file diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index e29509d1e01..01528ed6655 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,8 +1,8 @@ { - "name": "undefined", + "name": "@google-cloud/service-management", "version": "0.1.0", - "description": "Servicemanagement client for Node.js", - "repository": "googleapis/nodejs-servicemanagement", + "description": "Service management client for Node.js", + "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", @@ -54,13 +54,13 @@ "mocha": "^8.3.1", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^9.2.4", + "sinon": "^10.0.0", "ts-loader": "^8.0.17", "typescript": "^4.2.3", "webpack": "^5.24.4", "webpack-cli": "^4.5.0" }, "engines": { - "node": ">=v10.24.0" + "node": ">=v10.0.0" } } diff --git a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto index f94739fbe37..e06aaf97630 100644 --- a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto +++ b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto @@ -451,10 +451,10 @@ message ListServiceRolloutsRequest { // Required. Use `filter` to return subset of rollouts. // The following filters are supported: // -- To limit the results to only those in - // [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + // status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', // use filter='status=SUCCESS' // -- To limit the results to those in - // [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + // status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' // or 'FAILED', use filter='status=CANCELLED OR status=FAILED' string filter = 4 [(google.api.field_behavior) = REQUIRED]; } diff --git a/packages/google-api-servicemanagement/protos/protos.js b/packages/google-api-servicemanagement/protos/protos.js index 1eb11393be1..7c8154b8b31 100644 --- a/packages/google-api-servicemanagement/protos/protos.js +++ b/packages/google-api-servicemanagement/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots.undefined_protos || ($protobuf.roots.undefined_protos = {}); + var $root = $protobuf.roots._google_cloud_service_management_protos || ($protobuf.roots._google_cloud_service_management_protos = {}); $root.google = (function() { diff --git a/packages/google-api-servicemanagement/protos/protos.json b/packages/google-api-servicemanagement/protos/protos.json index 1dca6cb915d..43469e53539 100644 --- a/packages/google-api-servicemanagement/protos/protos.json +++ b/packages/google-api-servicemanagement/protos/protos.json @@ -19,7 +19,7 @@ "csharp_namespace": "Google.Cloud.ServiceManagement.V1", "go_package": "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement", "java_multiple_files": true, - "java_outer_classname": "ResourcesProto", + "java_outer_classname": "ServiceManagerProto", "java_package": "com.google.api.servicemanagement.v1", "objc_class_prefix": "GASM", "php_namespace": "Google\\Cloud\\ServiceManagement\\V1", diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index b98e98c81ee..a434301a9b7 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "": "^0.1.0" + "@google-cloud/service-management": "^0.1.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-api-servicemanagement/samples/quickstart.js b/packages/google-api-servicemanagement/samples/quickstart.js index 4e07f4f8d12..cd55c0e12b3 100644 --- a/packages/google-api-servicemanagement/samples/quickstart.js +++ b/packages/google-api-servicemanagement/samples/quickstart.js @@ -13,31 +13,25 @@ 'use strict'; -async function main() { +async function main(projectId) { // [START nodejs_service_management_quickstart] - // Imports the Google Cloud client library - // remove this line after package is released - // eslint-disable-next-line node/no-missing-require - const {ServiceManagerClient} = require(''); + // Imports the Google Cloud client library + const {ServiceManagerClient} = require('@google-cloud/service-management'); // 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 {ServiceManagerClient}(); + const client = new ServiceManagerClient(); - //TODO(library generator): write the actual function you will be testing - async function doSomething() { - console.log( - 'DPE! Change this code so that it shows how to use the library! See comments below on structure.' - ); - // const [thing] = await client.methodName({ - // }); - // console.info(thing); + async function listServices() { + const [services] = await client.listServices({ + producerProjectId: projectId, + }); + console.info(services); } - doSomething(); + listServices(); // [END nodejs_service_management_quickstart] } diff --git a/packages/google-api-servicemanagement/samples/test/quickstart.js b/packages/google-api-servicemanagement/samples/test/quickstart.js index 0ab751f5754..8980e65bf13 100644 --- a/packages/google-api-servicemanagement/samples/test/quickstart.js +++ b/packages/google-api-servicemanagement/samples/test/quickstart.js @@ -21,7 +21,7 @@ const path = require('path'); const cp = require('child_process'); const {before, describe, it} = require('mocha'); // eslint-disable-next-line node/no-missing-require -const {ServiceManagerClient} = require(''); +const {ServiceManagerClient} = require('@google-cloud/service-management'); // eslint-disable-next-line no-unused-vars, node/no-missing-require const {assert} = require('chai'); @@ -29,22 +29,17 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cwd = path.join(__dirname, '..'); -const client = new {ServiceManagerClient}(); +const client = new ServiceManagerClient(); describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars let projectId; before(async () => { - // eslint-disable-next-line no-unused-vars projectId = await client.getProjectId(); }); it('should run quickstart', async () => { - //TODO: remove this line - // eslint-disable-next-line no-unused-vars - const stdout = execSync('node ./quickstart.js', {cwd}); - //assert(stdout, stdout !== null); + const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); + assert.match(stdout, /\[[\s\S]*\]/); }); }); diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index e59285f060e..a9b950ddf85 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -42,7 +42,7 @@ import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** - * [Google Service Management API](/service-management/overview) + * [Google Service Management API](https://cloud.google.com/service-management/overview) * @class * @memberof v1 */ @@ -565,7 +565,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.configId * Required. The id of the service configuration resource. @@ -679,7 +679,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {google.api.Service} request.serviceConfig * Required. The service configuration resource. @@ -780,7 +780,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.rolloutId * Required. The id of the rollout resource. @@ -1138,7 +1138,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1286,7 +1286,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1441,7 +1441,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {google.api.servicemanagement.v1.ConfigSource} request.configSource * Required. The source configuration for the service. @@ -1603,7 +1603,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https:/cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {google.api.servicemanagement.v1.Rollout} request.rollout * Required. The rollout resource. The `service_name` field is output only. @@ -2264,7 +2264,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2334,7 +2334,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2382,7 +2382,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2465,7 +2465,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com//service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2476,10 +2476,10 @@ export class ServiceManagerClient { * Required. Use `filter` to return subset of rollouts. * The following filters are supported: * -- To limit the results to only those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', * use filter='status=SUCCESS' * -- To limit the results to those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -2544,7 +2544,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2555,10 +2555,10 @@ export class ServiceManagerClient { * Required. Use `filter` to return subset of rollouts. * The following filters are supported: * -- To limit the results to only those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', * use filter='status=SUCCESS' * -- To limit the results to those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -2601,7 +2601,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2612,10 +2612,10 @@ export class ServiceManagerClient { * Required. Use `filter` to return subset of rollouts. * The following filters are supported: * -- To limit the results to only those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', * use filter='status=SUCCESS' * -- To limit the results to those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. diff --git a/packages/google-api-servicemanagement/synth.metadata b/packages/google-api-servicemanagement/synth.metadata index 662e3b22304..c4fe526ef86 100644 --- a/packages/google-api-servicemanagement/synth.metadata +++ b/packages/google-api-servicemanagement/synth.metadata @@ -3,23 +3,23 @@ { "git": { "name": ".", - "remote": "sso://user/sofialeon/nodejs-service-management", - "sha": "1c6e94f8fe0215b6a8314951e5dcc482228db573" + "remote": "git@github.com:googleapis/nodejs-service-management.git", + "sha": "728ac209c44ba39714fb8c8acb38a7c0163acd6c" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "68fdb1b7dc47ff7a3bda6b7744f5e01887b94d3b", - "internalRef": "361897210" + "sha": "5da78db589d423db6bcd6a35637c923fe1a7665c", + "internalRef": "363947872" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e5fa6d93e42918dd4a000a80b92be23f5f4c6ac7" + "sha": "79c8dd7ee768292f933012d3a69a5b4676404cda" } } ], diff --git a/packages/google-api-servicemanagement/synth.py b/packages/google-api-servicemanagement/synth.py index b79ba1c4337..8e8ea37d8c4 100644 --- a/packages/google-api-servicemanagement/synth.py +++ b/packages/google-api-servicemanagement/synth.py @@ -30,7 +30,7 @@ name, version, bazel_target=f"//google/api/servicemanagement/{version}:api-servicemanagement-{version}-nodejs") - s.copy(library, excludes=["package.json","linkinator.config.json", "system-test/fixtures/sample/src/index.js","system-test/fixtures/sample/src/index.ts"]) + s.copy(library, excludes=["package.json","README.md"]) # Copy common templates common_templates = gcp.CommonTemplates() diff --git a/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.js b/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.js index b30ce31fe85..eba23b1d518 100644 --- a/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.js +++ b/packages/google-api-servicemanagement/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 servicemanagement = require('undefined'); +const servicemanagement = require('@google-cloud/service-management'); function main() { const serviceManagerClient = new servicemanagement.ServiceManagerClient(); diff --git a/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts b/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts index a3abf0dc7b9..e09ceaa8399 100644 --- a/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts +++ b/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts @@ -16,7 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {ServiceManagerClient} from 'undefined'; +import {ServiceManagerClient} from '@google-cloud/service-management'; // check that the client class type name can be used function doStuffWithServiceManagerClient(client: ServiceManagerClient) { From 3483e96859b42f646f409580e6db980b63f78483 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 30 Mar 2021 17:26:07 +0000 Subject: [PATCH 06/85] chore: release 0.2.0 (#15) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release \*beep\* \*boop\* --- ## 0.2.0 (2021-03-30) ### ⚠ BREAKING CHANGES * initial stub of library ### Features * add initial samples ([#2](https://www.github.com/googleapis/nodejs-service-management/issues/2)) ([e12039f](https://www.github.com/googleapis/nodejs-service-management/commit/e12039fff76d1d76692c7f87852c2e878c0f847f)) * initial stub of library ([728ac20](https://www.github.com/googleapis/nodejs-service-management/commit/728ac209c44ba39714fb8c8acb38a7c0163acd6c)) ### Bug Fixes * **build:** release first version of library as v0.2.0 ([#14](https://www.github.com/googleapis/nodejs-service-management/issues/14)) ([3707e68](https://www.github.com/googleapis/nodejs-service-management/commit/3707e680f7cd038ea4b6c7589a5846b8ce5fcc96)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .../google-api-servicemanagement/CHANGELOG.md | 18 ++++++++++++++++++ .../google-api-servicemanagement/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 packages/google-api-servicemanagement/CHANGELOG.md diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md new file mode 100644 index 00000000000..48e0dedea25 --- /dev/null +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -0,0 +1,18 @@ +# Changelog + +## 0.2.0 (2021-03-30) + + +### ⚠ BREAKING CHANGES + +* initial stub of library + +### Features + +* add initial samples ([#2](https://www.github.com/googleapis/nodejs-service-management/issues/2)) ([e12039f](https://www.github.com/googleapis/nodejs-service-management/commit/e12039fff76d1d76692c7f87852c2e878c0f847f)) +* initial stub of library ([728ac20](https://www.github.com/googleapis/nodejs-service-management/commit/728ac209c44ba39714fb8c8acb38a7c0163acd6c)) + + +### Bug Fixes + +* **build:** release first version of library as v0.2.0 ([#14](https://www.github.com/googleapis/nodejs-service-management/issues/14)) ([3707e68](https://www.github.com/googleapis/nodejs-service-management/commit/3707e680f7cd038ea4b6c7589a5846b8ce5fcc96)) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 01528ed6655..ab8082c8b5b 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "0.1.0", + "version": "0.2.0", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index a434301a9b7..0be0b581f2c 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^0.1.0" + "@google-cloud/service-management": "^0.2.0" }, "devDependencies": { "c8": "^7.1.0", From 27ca36efe180b6faf3b7b3d8429bb9c353629375 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 31 Mar 2021 09:51:59 -0700 Subject: [PATCH 07/85] chore: release 0.2.0 (#16) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .../google-api-servicemanagement/CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index 48e0dedea25..02d5d7f08bd 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -13,6 +13,23 @@ * initial stub of library ([728ac20](https://www.github.com/googleapis/nodejs-service-management/commit/728ac209c44ba39714fb8c8acb38a7c0163acd6c)) +### Bug Fixes + +* **build:** release first version of library as v0.2.0 ([#14](https://www.github.com/googleapis/nodejs-service-management/issues/14)) ([3707e68](https://www.github.com/googleapis/nodejs-service-management/commit/3707e680f7cd038ea4b6c7589a5846b8ce5fcc96)) + +## 0.2.0 (2021-03-30) + + +### ⚠ BREAKING CHANGES + +* initial stub of library + +### Features + +* add initial samples ([#2](https://www.github.com/googleapis/nodejs-service-management/issues/2)) ([e12039f](https://www.github.com/googleapis/nodejs-service-management/commit/e12039fff76d1d76692c7f87852c2e878c0f847f)) +* initial stub of library ([728ac20](https://www.github.com/googleapis/nodejs-service-management/commit/728ac209c44ba39714fb8c8acb38a7c0163acd6c)) + + ### Bug Fixes * **build:** release first version of library as v0.2.0 ([#14](https://www.github.com/googleapis/nodejs-service-management/issues/14)) ([3707e68](https://www.github.com/googleapis/nodejs-service-management/commit/3707e680f7cd038ea4b6c7589a5846b8ce5fcc96)) From 0a5d6b088027b85fb2f74a04c0c292b72b5fffa1 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 7 Apr 2021 10:36:45 -0700 Subject: [PATCH 08/85] build: fix blank distribution name (#29) --- packages/google-api-servicemanagement/.repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/.repo-metadata.json b/packages/google-api-servicemanagement/.repo-metadata.json index 686b67c241f..4e78ebd1f15 100644 --- a/packages/google-api-servicemanagement/.repo-metadata.json +++ b/packages/google-api-servicemanagement/.repo-metadata.json @@ -7,7 +7,7 @@ "release_level": "GA", "language": "nodejs", "repo": "googleapis/nodejs-service-management", - "distribution_name": "", + "distribution_name": "@google-cloud/service-management", "api_id": "servicemanagement.googleapis.com", "requires_billing": true } From c044b171b0b3708513661e81bb9b84ea78aecc60 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Apr 2021 23:12:06 +0200 Subject: [PATCH 09/85] chore(deps): update dependency @types/sinon to v10 (#36) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/sinon](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^9.0.11` -> `^10.0.0`](https://renovatebot.com/diffs/npm/@types%2fsinon/9.0.11/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/compatibility-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/confidence-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-service-management). --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index ab8082c8b5b..79fd5bf30c8 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -44,7 +44,7 @@ "devDependencies": { "@types/mocha": "^8.2.1", "@types/node": "^14.14.32", - "@types/sinon": "^9.0.11", + "@types/sinon": "^10.0.0", "c8": "^7.6.0", "gts": "^3.1.0", "jsdoc": "^3.6.6", From 221db266372d67b6700f36582412927ca8511ed2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 19 Apr 2021 19:39:45 +0200 Subject: [PATCH 10/85] chore(deps): update dependency ts-loader to v9 (#38) --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 79fd5bf30c8..70b75edfb36 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -55,7 +55,7 @@ "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", - "ts-loader": "^8.0.17", + "ts-loader": "^9.0.0", "typescript": "^4.2.3", "webpack": "^5.24.4", "webpack-cli": "^4.5.0" From e81156f7ea026d2bf78c34388867dd58cd06424c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 23 Apr 2021 11:56:49 -0700 Subject: [PATCH 11/85] build: update links and package name (#43) * build: update package-name, update links to service control and service management PiperOrigin-RevId: 364666178 Source-Author: Google APIs Source-Date: Tue Mar 23 16:01:41 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 336d6f419fe9466e4540083bbfa46a57f67dc92e Source-Link: https://github.com/googleapis/googleapis/commit/336d6f419fe9466e4540083bbfa46a57f67dc92e * build: update links for service-management, update package name for appengine-admin PiperOrigin-RevId: 366472163 Source-Author: Google APIs Source-Date: Fri Apr 2 10:47:13 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 8ff7d794576311d3d68d4df2ac6da93bbfcd7476 Source-Link: https://github.com/googleapis/googleapis/commit/8ff7d794576311d3d68d4df2ac6da93bbfcd7476 * build: fix typo in package name PiperOrigin-RevId: 369759326 Source-Author: Google APIs Source-Date: Wed Apr 21 16:28:59 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 9f2dcbf032a77508144cf8a50b0d261e33653568 Source-Link: https://github.com/googleapis/googleapis/commit/9f2dcbf032a77508144cf8a50b0d261e33653568 --- .../google-api-servicemanagement/.jsdoc.js | 2 +- .../google-api-servicemanagement/README.md | 6 ++++-- .../linkinator.config.json | 11 +++++++++- .../api/servicemanagement/v1/resources.proto | 2 +- .../servicemanagement/v1/servicemanager.proto | 20 +++++++++---------- .../src/v1/gapic_metadata.json | 2 +- .../src/v1/service_manager_client.ts | 4 ++-- .../synth.metadata | 8 ++++---- 8 files changed, 33 insertions(+), 22 deletions(-) diff --git a/packages/google-api-servicemanagement/.jsdoc.js b/packages/google-api-servicemanagement/.jsdoc.js index ca63d7a439d..6c7d9676b9c 100644 --- a/packages/google-api-servicemanagement/.jsdoc.js +++ b/packages/google-api-servicemanagement/.jsdoc.js @@ -43,7 +43,7 @@ module.exports = { copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, - systemName: 'servicemanagement', + systemName: '@google-cloud/service-management', theme: 'lumen', default: { outputSourceFiles: false diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index fe5a312caf6..8013c982f7d 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -69,8 +69,10 @@ const {ServiceManagerClient} = require('@google-cloud/service-management'); const client = new ServiceManagerClient(); async function listServices() { - const [thing] = await client.listServices({producerProjectId: projectId}); - console.info(thing); + const [services] = await client.listServices({ + producerProjectId: projectId, + }); + console.info(services); } listServices(); diff --git a/packages/google-api-servicemanagement/linkinator.config.json b/packages/google-api-servicemanagement/linkinator.config.json index 9b7641b88f8..29a223b6db6 100644 --- a/packages/google-api-servicemanagement/linkinator.config.json +++ b/packages/google-api-servicemanagement/linkinator.config.json @@ -1 +1,10 @@ -{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io", "https://github.com/googleapis/nodejs-service-management/blob/master/CHANGELOG.md"],"silent":true,"concurrency":10} \ No newline at end of file +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io" + ], + "silent": true, + "concurrency": 10 +} diff --git a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto index 37ac30099d1..0d9ed6b5430 100644 --- a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto +++ b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto @@ -41,7 +41,7 @@ option ruby_package = "Google::Cloud::ServiceManagement::V1"; // The full representation of a Service that is managed by // Google Service Management. message ManagedService { - // The name of the service. See the [overview](/service-management/overview) + // The name of the service. See the [overview](https://cloud.google.com/service-management/overview) // for naming requirements. string service_name = 2; diff --git a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto index e06aaf97630..c12f7748b30 100644 --- a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto +++ b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto @@ -35,7 +35,7 @@ option objc_class_prefix = "GASM"; option php_namespace = "Google\\Cloud\\ServiceManagement\\V1"; option ruby_package = "Google::Cloud::ServiceManagement::V1"; -// [Google Service Management API](/service-management/overview) +// [Google Service Management API](https://cloud.google.com/service-management/overview) service ServiceManager { option (google.api.default_host) = "servicemanagement.googleapis.com"; option (google.api.oauth_scopes) = @@ -325,14 +325,14 @@ message CreateServiceRequest { // Request message for DeleteService method. message DeleteServiceRequest { - // Required. The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for UndeleteService method. message UndeleteServiceRequest { - // Required. The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -356,7 +356,7 @@ message GetServiceConfigRequest { FULL = 1; } - // Required. The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -373,7 +373,7 @@ message GetServiceConfigRequest { // Request message for ListServiceConfigs method. message ListServiceConfigsRequest { - // Required. The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -396,7 +396,7 @@ message ListServiceConfigsResponse { // Request message for CreateServiceConfig method. message CreateServiceConfigRequest { - // Required. The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -406,7 +406,7 @@ message CreateServiceConfigRequest { // Request message for SubmitConfigSource method. message SubmitConfigSourceRequest { - // Required. The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -427,7 +427,7 @@ message SubmitConfigSourceResponse { // Request message for 'CreateServiceRollout' message CreateServiceRolloutRequest { - // Required. The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -437,7 +437,7 @@ message CreateServiceRolloutRequest { // Request message for 'ListServiceRollouts' message ListServiceRolloutsRequest { - // Required. The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -470,7 +470,7 @@ message ListServiceRolloutsResponse { // Request message for GetServiceRollout method. message GetServiceRolloutRequest { - // Required. The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; diff --git a/packages/google-api-servicemanagement/src/v1/gapic_metadata.json b/packages/google-api-servicemanagement/src/v1/gapic_metadata.json index 5425ca8c94f..6dd503c264f 100644 --- a/packages/google-api-servicemanagement/src/v1/gapic_metadata.json +++ b/packages/google-api-servicemanagement/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.api.servicemanagement.v1", - "libraryPackage": "servicemanagement", + "libraryPackage": "@google-cloud/service-management", "services": { "ServiceManager": { "clients": { diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index a9b950ddf85..a5536e1873c 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -1603,7 +1603,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https:/cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {google.api.servicemanagement.v1.Rollout} request.rollout * Required. The rollout resource. The `service_name` field is output only. @@ -2465,7 +2465,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com//service-management/overview) + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. diff --git a/packages/google-api-servicemanagement/synth.metadata b/packages/google-api-servicemanagement/synth.metadata index c4fe526ef86..0ed74b5bda4 100644 --- a/packages/google-api-servicemanagement/synth.metadata +++ b/packages/google-api-servicemanagement/synth.metadata @@ -3,16 +3,16 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-service-management.git", - "sha": "728ac209c44ba39714fb8c8acb38a7c0163acd6c" + "remote": "https://github.com/googleapis/nodejs-service-management.git", + "sha": "2cc8c9375e2e9827626f2758ac61fa5e3a75b942" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5da78db589d423db6bcd6a35637c923fe1a7665c", - "internalRef": "363947872" + "sha": "9f2dcbf032a77508144cf8a50b0d261e33653568", + "internalRef": "369759326" } }, { From d2f3d885d735461eee23047139d8e83f6734db32 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Apr 2021 14:05:47 -0700 Subject: [PATCH 12/85] build(node): remove unused tokens (#44) * feat: fetch for default branch Source-Author: Billy Jacobson Source-Date: Thu Apr 15 20:13:42 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: 898b38a6f4fab89a76dfb152480bb034a781331b Source-Link: https://github.com/googleapis/synthtool/commit/898b38a6f4fab89a76dfb152480bb034a781331b * build(node): remove unused tokens Source-Author: Benjamin E. Coe Source-Date: Fri Apr 16 10:12:05 2021 -0700 Source-Repo: googleapis/synthtool Source-Sha: b33b0e2056a85fc2264b294f2cf47dcd45e95186 Source-Link: https://github.com/googleapis/synthtool/commit/b33b0e2056a85fc2264b294f2cf47dcd45e95186 * fix(node): default-branch should use $default_branch Source-Author: Benjamin E. Coe Source-Date: Fri Apr 16 10:25:52 2021 -0700 Source-Repo: googleapis/synthtool Source-Sha: c6706ee5d693e9ae5967614170732646590d8374 Source-Link: https://github.com/googleapis/synthtool/commit/c6706ee5d693e9ae5967614170732646590d8374 --- packages/google-api-servicemanagement/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/synth.metadata b/packages/google-api-servicemanagement/synth.metadata index 0ed74b5bda4..8395f229b7f 100644 --- a/packages/google-api-servicemanagement/synth.metadata +++ b/packages/google-api-servicemanagement/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-service-management.git", - "sha": "2cc8c9375e2e9827626f2758ac61fa5e3a75b942" + "sha": "13f1d7c5eedae569b7cd09e852d304d5540dd49a" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "79c8dd7ee768292f933012d3a69a5b4676404cda" + "sha": "c6706ee5d693e9ae5967614170732646590d8374" } } ], From 55e495e63962e732d0d3abf6b3e68a1ae01b830e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 28 Apr 2021 17:26:32 -0700 Subject: [PATCH 13/85] build: add generated-files bot config (#45) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/a8c8456e-ad55-437d-a21c-2a0857049024/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/e6f3d54be015a394b6ab5a25903ec09062a2b424 Source-Link: https://github.com/googleapis/synthtool/commit/04573fd73f56791c659832aa84d35a4ec860d6f7 --- packages/google-api-servicemanagement/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/synth.metadata b/packages/google-api-servicemanagement/synth.metadata index 8395f229b7f..8a1d5d34d05 100644 --- a/packages/google-api-servicemanagement/synth.metadata +++ b/packages/google-api-servicemanagement/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-service-management.git", - "sha": "13f1d7c5eedae569b7cd09e852d304d5540dd49a" + "sha": "35a796f54a272527f788d79fc6f858822e95e32f" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "c6706ee5d693e9ae5967614170732646590d8374" + "sha": "e6f3d54be015a394b6ab5a25903ec09062a2b424" } } ], From 859700b3d202d39f80761302ff7e127500c77d98 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 5 May 2021 12:39:52 -0700 Subject: [PATCH 14/85] build: update falsy values in protos.d.ts --- .../protos/protos.d.ts | 26 +++++----- .../protos/protos.js | 52 +++++++++---------- .../synth.metadata | 2 +- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/packages/google-api-servicemanagement/protos/protos.d.ts b/packages/google-api-servicemanagement/protos/protos.d.ts index 69c7f48618a..7004c059d25 100644 --- a/packages/google-api-servicemanagement/protos/protos.d.ts +++ b/packages/google-api-servicemanagement/protos/protos.d.ts @@ -3853,19 +3853,19 @@ export namespace google { public selector: string; /** HttpRule get. */ - public get: string; + public get?: (string|null); /** HttpRule put. */ - public put: string; + public put?: (string|null); /** HttpRule post. */ - public post: string; + public post?: (string|null); /** HttpRule delete. */ - public delete: string; + public delete?: (string|null); /** HttpRule patch. */ - public patch: string; + public patch?: (string|null); /** HttpRule custom. */ public custom?: (google.api.ICustomHttpPattern|null); @@ -5563,10 +5563,10 @@ export namespace google { constructor(properties?: google.api.IJwtLocation); /** JwtLocation header. */ - public header: string; + public header?: (string|null); /** JwtLocation query. */ - public query: string; + public query?: (string|null); /** JwtLocation valuePrefix. */ public valuePrefix: string; @@ -6100,10 +6100,10 @@ export namespace google { public pathTranslation: (google.api.BackendRule.PathTranslation|keyof typeof google.api.BackendRule.PathTranslation); /** BackendRule jwtAudience. */ - public jwtAudience: string; + public jwtAudience?: (string|null); /** BackendRule disableAuth. */ - public disableAuth: boolean; + public disableAuth?: (boolean|null); /** BackendRule protocol. */ public protocol: string; @@ -12088,16 +12088,16 @@ export namespace google { constructor(properties?: google.protobuf.IValue); /** Value nullValue. */ - public nullValue: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue); + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); /** Value numberValue. */ - public numberValue: number; + public numberValue?: (number|null); /** Value stringValue. */ - public stringValue: string; + public stringValue?: (string|null); /** Value boolValue. */ - public boolValue: boolean; + public boolValue?: (boolean|null); /** Value structValue. */ public structValue?: (google.protobuf.IStruct|null); diff --git a/packages/google-api-servicemanagement/protos/protos.js b/packages/google-api-servicemanagement/protos/protos.js index 7c8154b8b31..82767a4e970 100644 --- a/packages/google-api-servicemanagement/protos/protos.js +++ b/packages/google-api-servicemanagement/protos/protos.js @@ -8601,43 +8601,43 @@ /** * HttpRule get. - * @member {string} get + * @member {string|null|undefined} get * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.get = ""; + HttpRule.prototype.get = null; /** * HttpRule put. - * @member {string} put + * @member {string|null|undefined} put * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.put = ""; + HttpRule.prototype.put = null; /** * HttpRule post. - * @member {string} post + * @member {string|null|undefined} post * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.post = ""; + HttpRule.prototype.post = null; /** * HttpRule delete. - * @member {string} delete + * @member {string|null|undefined} delete * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype["delete"] = ""; + HttpRule.prototype["delete"] = null; /** * HttpRule patch. - * @member {string} patch + * @member {string|null|undefined} patch * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.patch = ""; + HttpRule.prototype.patch = null; /** * HttpRule custom. @@ -13677,19 +13677,19 @@ /** * JwtLocation header. - * @member {string} header + * @member {string|null|undefined} header * @memberof google.api.JwtLocation * @instance */ - JwtLocation.prototype.header = ""; + JwtLocation.prototype.header = null; /** * JwtLocation query. - * @member {string} query + * @member {string|null|undefined} query * @memberof google.api.JwtLocation * @instance */ - JwtLocation.prototype.query = ""; + JwtLocation.prototype.query = null; /** * JwtLocation valuePrefix. @@ -14912,19 +14912,19 @@ /** * BackendRule jwtAudience. - * @member {string} jwtAudience + * @member {string|null|undefined} jwtAudience * @memberof google.api.BackendRule * @instance */ - BackendRule.prototype.jwtAudience = ""; + BackendRule.prototype.jwtAudience = null; /** * BackendRule disableAuth. - * @member {boolean} disableAuth + * @member {boolean|null|undefined} disableAuth * @memberof google.api.BackendRule * @instance */ - BackendRule.prototype.disableAuth = false; + BackendRule.prototype.disableAuth = null; /** * BackendRule protocol. @@ -30831,35 +30831,35 @@ /** * Value nullValue. - * @member {google.protobuf.NullValue} nullValue + * @member {google.protobuf.NullValue|null|undefined} nullValue * @memberof google.protobuf.Value * @instance */ - Value.prototype.nullValue = 0; + Value.prototype.nullValue = null; /** * Value numberValue. - * @member {number} numberValue + * @member {number|null|undefined} numberValue * @memberof google.protobuf.Value * @instance */ - Value.prototype.numberValue = 0; + Value.prototype.numberValue = null; /** * Value stringValue. - * @member {string} stringValue + * @member {string|null|undefined} stringValue * @memberof google.protobuf.Value * @instance */ - Value.prototype.stringValue = ""; + Value.prototype.stringValue = null; /** * Value boolValue. - * @member {boolean} boolValue + * @member {boolean|null|undefined} boolValue * @memberof google.protobuf.Value * @instance */ - Value.prototype.boolValue = false; + Value.prototype.boolValue = null; /** * Value structValue. diff --git a/packages/google-api-servicemanagement/synth.metadata b/packages/google-api-servicemanagement/synth.metadata index 8a1d5d34d05..030acd081f3 100644 --- a/packages/google-api-servicemanagement/synth.metadata +++ b/packages/google-api-servicemanagement/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-service-management.git", - "sha": "35a796f54a272527f788d79fc6f858822e95e32f" + "sha": "2735e9e9b0782dd7e433b62ddf9333072228cba5" } }, { From 501b8b792001d111180259aa2abe788435e76b38 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 6 May 2021 17:52:33 -0700 Subject: [PATCH 15/85] fix(deps): require google-gax v2.12.0 (#48) --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 70b75edfb36..4fb7db780c8 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.10.3" + "google-gax": "^2.12.0" }, "devDependencies": { "@types/mocha": "^8.2.1", From 24d006d395fd9a226ad3fcbebedd2d094ed611b9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 21 May 2021 10:07:33 -0700 Subject: [PATCH 16/85] fix: use require() to load JSON protos (#50) * fix: use require() to load JSON protos The library is regenerated with gapic-generator-typescript v1.3.1. Committer: @alexander-fenster PiperOrigin-RevId: 372468161 Source-Author: Google APIs Source-Date: Thu May 6 18:50:48 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 75880c3e6a6aa2597400582848e81bbbfac51dea Source-Link: https://github.com/googleapis/googleapis/commit/75880c3e6a6aa2597400582848e81bbbfac51dea * chore: update gapic-generator-typescript to v1.3.2 Committer: @alexander-fenster PiperOrigin-RevId: 372656503 Source-Author: Google APIs Source-Date: Fri May 7 17:14:53 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 6fa858c6489b1bbc505a7d7afe39f2dc45819c38 Source-Link: https://github.com/googleapis/googleapis/commit/6fa858c6489b1bbc505a7d7afe39f2dc45819c38 --- .../src/v1/service_manager_client.ts | 27 +++---------------- .../synth.metadata | 6 ++--- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index a5536e1873c..3f8f1fb2d15 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -27,11 +27,11 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; -import * as path from 'path'; 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/service_manager_client_config.json`. @@ -146,22 +146,7 @@ export class ServiceManagerClient { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath - ); + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); // Some of the methods on this service return "paged" results, // (e.g. 50 results at a time, with tokens to get subsequent @@ -184,15 +169,11 @@ export class ServiceManagerClient { ), }; + 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 protoFilesRoot = opts.fallback - ? this._gaxModule.protobuf.Root.fromJSON( - // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - ) - : this._gaxModule.protobuf.loadSync(nodejsProtoPath); this.operationsClient = this._gaxModule .lro({ diff --git a/packages/google-api-servicemanagement/synth.metadata b/packages/google-api-servicemanagement/synth.metadata index 030acd081f3..028452ebf02 100644 --- a/packages/google-api-servicemanagement/synth.metadata +++ b/packages/google-api-servicemanagement/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-service-management.git", - "sha": "2735e9e9b0782dd7e433b62ddf9333072228cba5" + "sha": "e679ea9d735b9edd25913b990e3a0d037025c984" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "9f2dcbf032a77508144cf8a50b0d261e33653568", - "internalRef": "369759326" + "sha": "6fa858c6489b1bbc505a7d7afe39f2dc45819c38", + "internalRef": "372656503" } }, { From 80e3f2196d9e96d171aa8524ada369d5d92b2cff Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 24 May 2021 13:30:04 -0700 Subject: [PATCH 17/85] build: remove codecov action, update linting (#52) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/d2181a4a-8c05-4f13-b080-92526da78619/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/b891fb474173f810051a7fdb0d66915e0a9bc82f --- .../src/v1/service_manager_client.ts | 165 +++++----- .../synth.metadata | 2 +- .../test/gapic_service_manager_v1.ts | 295 ++++++++---------- 3 files changed, 203 insertions(+), 259 deletions(-) diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index 3f8f1fb2d15..846745e52b1 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -326,13 +326,14 @@ export class ServiceManagerClient { ]; for (const methodName of serviceManagerStubMethods) { const callPromise = this.serviceManagerStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, (err: Error | null | undefined) => () => { throw err; } @@ -498,11 +499,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.getService(request, options, callback); } @@ -605,11 +605,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.getServiceConfig(request, options, callback); } @@ -713,11 +712,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.createServiceConfig(request, options, callback); } @@ -814,11 +812,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.getServiceRollout(request, options, callback); } @@ -1175,11 +1172,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.deleteService(request, options, callback); } @@ -1323,11 +1319,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.undeleteService(request, options, callback); } @@ -1484,11 +1479,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.submitConfigSource(request, options, callback); } @@ -1642,11 +1636,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.createServiceRollout(request, options, callback); } @@ -1800,11 +1793,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.enableService(request, options, callback); } @@ -1957,11 +1949,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.disableService(request, options, callback); } @@ -2203,7 +2194,7 @@ export class ServiceManagerClient { this.initialize(); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -2301,11 +2292,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.listServiceConfigs(request, options, callback); } @@ -2342,11 +2332,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listServiceConfigs.createStream( @@ -2394,17 +2383,16 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listServiceConfigs.asyncIterate( this.innerApiCalls['listServiceConfigs'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -2511,11 +2499,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); this.initialize(); return this.innerApiCalls.listServiceRollouts(request, options, callback); } @@ -2561,11 +2548,10 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listServiceRollouts.createStream( @@ -2622,17 +2608,16 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - service_name: request.serviceName || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + service_name: request.serviceName || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listServiceRollouts.asyncIterate( this.innerApiCalls['listServiceRollouts'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-api-servicemanagement/synth.metadata b/packages/google-api-servicemanagement/synth.metadata index 028452ebf02..78188c1885c 100644 --- a/packages/google-api-servicemanagement/synth.metadata +++ b/packages/google-api-servicemanagement/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e6f3d54be015a394b6ab5a25903ec09062a2b424" + "sha": "b891fb474173f810051a7fdb0d66915e0a9bc82f" } } ], diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index 4c3a2bc2a3a..b3181a9c6d6 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -28,10 +28,9 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); + 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; @@ -281,9 +280,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.ManagedService() ); - client.innerApiCalls.getService = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getService = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getService( request, @@ -393,9 +391,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.Service() ); - client.innerApiCalls.getServiceConfig = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getServiceConfig = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getServiceConfig( request, @@ -471,9 +468,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.Service() ); - client.innerApiCalls.createServiceConfig = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.createServiceConfig = + stubSimpleCall(expectedResponse); const [response] = await client.createServiceConfig(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -504,9 +500,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.Service() ); - client.innerApiCalls.createServiceConfig = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createServiceConfig = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createServiceConfig( request, @@ -613,9 +608,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.Rollout() ); - client.innerApiCalls.getServiceRollout = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getServiceRollout = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getServiceRollout( request, @@ -686,9 +680,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportResponse() ); - client.innerApiCalls.generateConfigReport = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.generateConfigReport = + stubSimpleCall(expectedResponse); const [response] = await client.generateConfigReport(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -711,9 +704,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportResponse() ); - client.innerApiCalls.generateConfigReport = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.generateConfigReport = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.generateConfigReport( request, @@ -776,9 +768,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createService = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.createService = + stubLongRunningCall(expectedResponse); const [operation] = await client.createService(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -802,9 +793,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createService = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createService = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createService( request, @@ -948,9 +938,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteService = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.deleteService = + stubLongRunningCall(expectedResponse); const [operation] = await client.deleteService(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -982,9 +971,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteService = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteService = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteService( request, @@ -1144,9 +1132,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.undeleteService = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.undeleteService = + stubLongRunningCall(expectedResponse); const [operation] = await client.undeleteService(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1178,9 +1165,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.undeleteService = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.undeleteService = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.undeleteService( request, @@ -1340,9 +1326,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.submitConfigSource = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.submitConfigSource = + stubLongRunningCall(expectedResponse); const [operation] = await client.submitConfigSource(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1374,9 +1359,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.submitConfigSource = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.submitConfigSource = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.submitConfigSource( request, @@ -1536,9 +1520,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createServiceRollout = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.createServiceRollout = + stubLongRunningCall(expectedResponse); const [operation] = await client.createServiceRollout(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1570,9 +1553,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createServiceRollout = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createServiceRollout = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createServiceRollout( request, @@ -1732,9 +1714,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.enableService = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.enableService = + stubLongRunningCall(expectedResponse); const [operation] = await client.enableService(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1766,9 +1747,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.enableService = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.enableService = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.enableService( request, @@ -1928,9 +1908,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.disableService = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.disableService = + stubLongRunningCall(expectedResponse); const [operation] = await client.disableService(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1962,9 +1941,8 @@ describe('v1.ServiceManagerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.disableService = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.disableService = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.disableService( request, @@ -2155,9 +2133,8 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.ManagedService() ), ]; - client.innerApiCalls.listServices = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listServices = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listServices( request, @@ -2227,12 +2204,12 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.ManagedService() ), ]; - client.descriptors.page.listServices.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listServices.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listServicesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.api.servicemanagement.v1.ManagedService[] = []; + const responses: protos.google.api.servicemanagement.v1.ManagedService[] = + []; stream.on( 'data', (response: protos.google.api.servicemanagement.v1.ManagedService) => { @@ -2271,7 +2248,8 @@ describe('v1.ServiceManagerClient', () => { ); const stream = client.listServicesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.api.servicemanagement.v1.ManagedService[] = []; + const responses: protos.google.api.servicemanagement.v1.ManagedService[] = + []; stream.on( 'data', (response: protos.google.api.servicemanagement.v1.ManagedService) => { @@ -2313,18 +2291,19 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.ManagedService() ), ]; - client.descriptors.page.listServices.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.api.servicemanagement.v1.IManagedService[] = []; + client.descriptors.page.listServices.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.api.servicemanagement.v1.IManagedService[] = + []; const iterable = client.listServicesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listServices - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listServices.asyncIterate as SinonStub + ).getCall(0).args[1], request ); }); @@ -2339,20 +2318,20 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.ListServicesRequest() ); const expectedError = new Error('expected'); - client.descriptors.page.listServices.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listServices.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listServicesAsync(request); await assert.rejects(async () => { - const responses: protos.google.api.servicemanagement.v1.IManagedService[] = []; + const responses: protos.google.api.servicemanagement.v1.IManagedService[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listServices - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listServices.asyncIterate as SinonStub + ).getCall(0).args[1], request ); }); @@ -2382,9 +2361,8 @@ describe('v1.ServiceManagerClient', () => { generateSampleMessage(new protos.google.api.Service()), generateSampleMessage(new protos.google.api.Service()), ]; - client.innerApiCalls.listServiceConfigs = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listServiceConfigs = + stubSimpleCall(expectedResponse); const [response] = await client.listServiceConfigs(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -2417,9 +2395,8 @@ describe('v1.ServiceManagerClient', () => { generateSampleMessage(new protos.google.api.Service()), generateSampleMessage(new protos.google.api.Service()), ]; - client.innerApiCalls.listServiceConfigs = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listServiceConfigs = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listServiceConfigs( request, @@ -2491,9 +2468,8 @@ describe('v1.ServiceManagerClient', () => { generateSampleMessage(new protos.google.api.Service()), generateSampleMessage(new protos.google.api.Service()), ]; - client.descriptors.page.listServiceConfigs.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listServiceConfigs.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listServiceConfigsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.api.Service[] = []; @@ -2515,10 +2491,9 @@ describe('v1.ServiceManagerClient', () => { .calledWith(client.innerApiCalls.listServiceConfigs, request) ); assert.strictEqual( - (client.descriptors.page.listServiceConfigs - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceConfigs.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2535,10 +2510,8 @@ describe('v1.ServiceManagerClient', () => { request.serviceName = ''; const expectedHeaderRequestParams = 'service_name='; const expectedError = new Error('expected'); - client.descriptors.page.listServiceConfigs.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listServiceConfigs.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listServiceConfigsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.api.Service[] = []; @@ -2559,10 +2532,9 @@ describe('v1.ServiceManagerClient', () => { .calledWith(client.innerApiCalls.listServiceConfigs, request) ); assert.strictEqual( - (client.descriptors.page.listServiceConfigs - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceConfigs.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2583,9 +2555,8 @@ describe('v1.ServiceManagerClient', () => { generateSampleMessage(new protos.google.api.Service()), generateSampleMessage(new protos.google.api.Service()), ]; - client.descriptors.page.listServiceConfigs.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listServiceConfigs.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.api.IService[] = []; const iterable = client.listServiceConfigsAsync(request); for await (const resource of iterable) { @@ -2593,15 +2564,15 @@ describe('v1.ServiceManagerClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listServiceConfigs - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listServiceConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listServiceConfigs - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceConfigs.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2618,10 +2589,8 @@ describe('v1.ServiceManagerClient', () => { request.serviceName = ''; const expectedHeaderRequestParams = 'service_name='; const expectedError = new Error('expected'); - client.descriptors.page.listServiceConfigs.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listServiceConfigs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listServiceConfigsAsync(request); await assert.rejects(async () => { const responses: protos.google.api.IService[] = []; @@ -2630,15 +2599,15 @@ describe('v1.ServiceManagerClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listServiceConfigs - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listServiceConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listServiceConfigs - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceConfigs.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2674,9 +2643,8 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.Rollout() ), ]; - client.innerApiCalls.listServiceRollouts = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listServiceRollouts = + stubSimpleCall(expectedResponse); const [response] = await client.listServiceRollouts(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -2715,9 +2683,8 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.Rollout() ), ]; - client.innerApiCalls.listServiceRollouts = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listServiceRollouts = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listServiceRollouts( request, @@ -2795,9 +2762,8 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.Rollout() ), ]; - client.descriptors.page.listServiceRollouts.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listServiceRollouts.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listServiceRolloutsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.api.servicemanagement.v1.Rollout[] = []; @@ -2822,10 +2788,9 @@ describe('v1.ServiceManagerClient', () => { .calledWith(client.innerApiCalls.listServiceRollouts, request) ); assert.strictEqual( - (client.descriptors.page.listServiceRollouts - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceRollouts.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2842,10 +2807,8 @@ describe('v1.ServiceManagerClient', () => { request.serviceName = ''; const expectedHeaderRequestParams = 'service_name='; const expectedError = new Error('expected'); - client.descriptors.page.listServiceRollouts.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listServiceRollouts.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listServiceRolloutsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.api.servicemanagement.v1.Rollout[] = []; @@ -2869,10 +2832,9 @@ describe('v1.ServiceManagerClient', () => { .calledWith(client.innerApiCalls.listServiceRollouts, request) ); assert.strictEqual( - (client.descriptors.page.listServiceRollouts - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceRollouts.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2899,9 +2861,8 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.Rollout() ), ]; - client.descriptors.page.listServiceRollouts.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listServiceRollouts.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.api.servicemanagement.v1.IRollout[] = []; const iterable = client.listServiceRolloutsAsync(request); for await (const resource of iterable) { @@ -2909,15 +2870,15 @@ describe('v1.ServiceManagerClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listServiceRollouts - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listServiceRollouts.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listServiceRollouts - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceRollouts.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2934,10 +2895,8 @@ describe('v1.ServiceManagerClient', () => { request.serviceName = ''; const expectedHeaderRequestParams = 'service_name='; const expectedError = new Error('expected'); - client.descriptors.page.listServiceRollouts.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listServiceRollouts.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listServiceRolloutsAsync(request); await assert.rejects(async () => { const responses: protos.google.api.servicemanagement.v1.IRollout[] = []; @@ -2946,15 +2905,15 @@ describe('v1.ServiceManagerClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listServiceRollouts - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listServiceRollouts.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listServiceRollouts - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceRollouts.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); From eb33cfca1725c3f6e5f0c149c050700db1f87e42 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Mon, 24 May 2021 15:28:51 -0700 Subject: [PATCH 18/85] chore: migrate to owl bot (#39) * chore: migrate to owl bot * chore: copy files from googleapis-gen ea0f18027eafb4801813fa253f16ffeef904b4c6 * chore: run the post processor Co-authored-by: Sofia Leon --- .../.github/.OwlBot.yaml | 26 ++++++++++++ .../.repo-metadata.json | 18 ++++---- .../google-api-servicemanagement/synth.py | 41 ------------------- 3 files changed, 35 insertions(+), 50 deletions(-) create mode 100644 packages/google-api-servicemanagement/.github/.OwlBot.yaml delete mode 100644 packages/google-api-servicemanagement/synth.py diff --git a/packages/google-api-servicemanagement/.github/.OwlBot.yaml b/packages/google-api-servicemanagement/.github/.OwlBot.yaml new file mode 100644 index 00000000000..efafe9c13ea --- /dev/null +++ b/packages/google-api-servicemanagement/.github/.OwlBot.yaml @@ -0,0 +1,26 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/api/servicemanagement/(v.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + +begin-after-commit-hash: ea0f18027eafb4801813fa253f16ffeef904b4c6 + diff --git a/packages/google-api-servicemanagement/.repo-metadata.json b/packages/google-api-servicemanagement/.repo-metadata.json index 4e78ebd1f15..73cbbd0d371 100644 --- a/packages/google-api-servicemanagement/.repo-metadata.json +++ b/packages/google-api-servicemanagement/.repo-metadata.json @@ -1,14 +1,14 @@ { - "name": "service-management", - "name_pretty": "Service Management API", - "product_documentation": "https://cloud.google.com/service-infrastructure/docs/overview/", - "client_documentation": "https://cloud.google.com/service-infrastructure/docs/service-management/reference", "issue_tracker": "https://github.com/googleapis/nodejs-service-management/issues", - "release_level": "GA", - "language": "nodejs", - "repo": "googleapis/nodejs-service-management", "distribution_name": "@google-cloud/service-management", + "client_documentation": "https://cloud.google.com/service-infrastructure/docs/service-management/reference", + "product_documentation": "https://cloud.google.com/service-infrastructure/docs/overview/", + "name_pretty": "Service Management API", + "release_level": "GA", + "default_version": "v1", + "name": "service-management", "api_id": "servicemanagement.googleapis.com", - "requires_billing": true + "requires_billing": true, + "language": "nodejs", + "repo": "googleapis/nodejs-service-management" } - diff --git a/packages/google-api-servicemanagement/synth.py b/packages/google-api-servicemanagement/synth.py deleted file mode 100644 index 8e8ea37d8c4..00000000000 --- a/packages/google-api-servicemanagement/synth.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""This script is used to synthesize generated parts of this library.""" - -import synthtool as s -import synthtool.gcp as gcp -import synthtool.languages.node as node -import subprocess -import logging - -logging.basicConfig(level=logging.DEBUG) - -# run the gapic generator -gapic = gcp.GAPICBazel() -versions = ["v1"] -name = 'servicemanagement' -for version in versions: - library = gapic.node_library( - name, - version, - bazel_target=f"//google/api/servicemanagement/{version}:api-servicemanagement-{version}-nodejs") - s.copy(library, excludes=["package.json","README.md"]) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library( - source_location='build/src', versions=["v1"], default_version="v1") -s.copy(templates, excludes=[]) - -node.postprocess_gapic_library() From 762b6a715b0b4830bbd24516cd7e8c979473cc6e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 23:10:05 +0000 Subject: [PATCH 19/85] chore: release 0.2.1 (#49) :robot: I have created a release \*beep\* \*boop\* --- ### [0.2.1](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.0...v0.2.1) (2021-05-24) ### Bug Fixes * **deps:** require google-gax v2.12.0 ([#48](https://www.github.com/googleapis/nodejs-service-management/issues/48)) ([e679ea9](https://www.github.com/googleapis/nodejs-service-management/commit/e679ea9d735b9edd25913b990e3a0d037025c984)) * use require() to load JSON protos ([#50](https://www.github.com/googleapis/nodejs-service-management/issues/50)) ([786af32](https://www.github.com/googleapis/nodejs-service-management/commit/786af32612aed97ef4ec55b2d0b02932e351be38)) --- 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-api-servicemanagement/CHANGELOG.md | 8 ++++++++ packages/google-api-servicemanagement/package.json | 2 +- .../google-api-servicemanagement/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index 02d5d7f08bd..2bed6640481 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [0.2.1](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.0...v0.2.1) (2021-05-24) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#48](https://www.github.com/googleapis/nodejs-service-management/issues/48)) ([e679ea9](https://www.github.com/googleapis/nodejs-service-management/commit/e679ea9d735b9edd25913b990e3a0d037025c984)) +* use require() to load JSON protos ([#50](https://www.github.com/googleapis/nodejs-service-management/issues/50)) ([786af32](https://www.github.com/googleapis/nodejs-service-management/commit/786af32612aed97ef4ec55b2d0b02932e351be38)) + ## 0.2.0 (2021-03-30) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 4fb7db780c8..3beb6c30c1c 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "0.2.0", + "version": "0.2.1", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 0be0b581f2c..4e6c8829aac 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^0.2.0" + "@google-cloud/service-management": "^0.2.1" }, "devDependencies": { "c8": "^7.1.0", From ff8e7b6fa7f8c316728d51ea75325c2da6cbe69b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 18:00:11 +0200 Subject: [PATCH 20/85] chore(deps): update dependency sinon to v11 (#53) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^10.0.0` -> `^11.0.0`](https://renovatebot.com/diffs/npm/sinon/10.0.0/11.1.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/compatibility-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/confidence-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v11.1.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1110--2021-05-25) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.0.0...31be9a5d5a4762ef01cb195f29024616dfee9ce8) \================== - Add sinon.promise() implementation ([#​2369](https://togithub.com/sinonjs/sinon/issues/2369)) - Set wrappedMethod on getters/setters ([#​2378](https://togithub.com/sinonjs/sinon/issues/2378)) - \[Docs] Update fake-server usage & descriptions ([#​2365](https://togithub.com/sinonjs/sinon/issues/2365)) - Fake docs improvement ([#​2360](https://togithub.com/sinonjs/sinon/issues/2360)) - Update nise to 5.1.0 (fixed [#​2318](https://togithub.com/sinonjs/sinon/issues/2318)) ### [`v11.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1100--2021-05-24) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.1...v11.0.0) \================== - Explicitly use samsam 6.0.2 with fix for [#​2345](https://togithub.com/sinonjs/sinon/issues/2345) - Update most packages ([#​2371](https://togithub.com/sinonjs/sinon/issues/2371)) - Update compatibility docs ([#​2366](https://togithub.com/sinonjs/sinon/issues/2366)) - Update packages (includes breaking fake-timers change, see [#​2352](https://togithub.com/sinonjs/sinon/issues/2352)) - Warn of potential memory leaks ([#​2357](https://togithub.com/sinonjs/sinon/issues/2357)) - Fix clock test errors ### [`v10.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1001--2021-04-08) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.0...v10.0.1) \================== - Upgrade sinon components (bumps y18n to 4.0.1) - Bump y18n from 4.0.0 to 4.0.1
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-service-management). --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 3beb6c30c1c..3c6d37a8fbc 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -54,7 +54,7 @@ "mocha": "^8.3.1", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.0.0", "typescript": "^4.2.3", "webpack": "^5.24.4", From ec1200a1ba47e9255c4e150a11347f73d1f9cdab Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 20:48:21 +0000 Subject: [PATCH 21/85] fix: GoogleAdsError missing using generator version after 1.3.0 (#54) [PR](https://github.com/googleapis/gapic-generator-typescript/pull/878) within updated gapic-generator-typescript version 1.4.0 Committer: @summer-ji-eng PiperOrigin-RevId: 375759421 Source-Link: https://github.com/googleapis/googleapis/commit/95fa72fdd0d69b02d72c33b37d1e4cc66d4b1446 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f40a34377ad488a7c2bc3992b3c8d5faf5a15c46 --- .../src/v1/service_manager_client.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index 846745e52b1..8ce1df3693a 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -141,6 +141,8 @@ export class ServiceManagerClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); From 635309d112f7d1a68a8d26ae06ef78c06d2caad0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 18:19:21 -0400 Subject: [PATCH 22/85] chore: release 0.2.2 (#55) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-api-servicemanagement/CHANGELOG.md | 7 +++++++ packages/google-api-servicemanagement/package.json | 2 +- packages/google-api-servicemanagement/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index 2bed6640481..c19b1696b0c 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.2.2](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.1...v0.2.2) (2021-05-25) + + +### Bug Fixes + +* GoogleAdsError missing using generator version after 1.3.0 ([#54](https://www.github.com/googleapis/nodejs-service-management/issues/54)) ([9376a6c](https://www.github.com/googleapis/nodejs-service-management/commit/9376a6c9836b9460d512a8fbd32094cc4f5ccb85)) + ### [0.2.1](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.0...v0.2.1) (2021-05-24) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 3c6d37a8fbc..43e0f74d5c8 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "0.2.1", + "version": "0.2.2", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 4e6c8829aac..a0902c4c64f 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^0.2.1" + "@google-cloud/service-management": "^0.2.2" }, "devDependencies": { "c8": "^7.1.0", From 2029c59a8a6e1e6128006d39ce66490f8980fcdb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Jun 2021 10:00:16 -0700 Subject: [PATCH 23/85] fix: make request optional in all cases (#61) Committer: @miraleung PiperOrigin-RevId: 380641501 --- .../src/v1/service_manager_client.ts | 74 +++++++++++-------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index 8ce1df3693a..29191dce1c0 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -416,7 +416,7 @@ export class ServiceManagerClient { // -- Service calls -- // ------------------- getService( - request: protos.google.api.servicemanagement.v1.IGetServiceRequest, + request?: protos.google.api.servicemanagement.v1.IGetServiceRequest, options?: CallOptions ): Promise< [ @@ -466,7 +466,7 @@ export class ServiceManagerClient { * const [response] = await client.getService(request); */ getService( - request: protos.google.api.servicemanagement.v1.IGetServiceRequest, + request?: protos.google.api.servicemanagement.v1.IGetServiceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -509,7 +509,7 @@ export class ServiceManagerClient { return this.innerApiCalls.getService(request, options, callback); } getServiceConfig( - request: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, + request?: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, options?: CallOptions ): Promise< [ @@ -569,7 +569,7 @@ export class ServiceManagerClient { * const [response] = await client.getServiceConfig(request); */ getServiceConfig( - request: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, + request?: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, optionsOrCallback?: | CallOptions | Callback< @@ -615,7 +615,7 @@ export class ServiceManagerClient { return this.innerApiCalls.getServiceConfig(request, options, callback); } createServiceConfig( - request: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, + request?: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, options?: CallOptions ): Promise< [ @@ -676,7 +676,7 @@ export class ServiceManagerClient { * const [response] = await client.createServiceConfig(request); */ createServiceConfig( - request: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, + request?: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, optionsOrCallback?: | CallOptions | Callback< @@ -722,7 +722,7 @@ export class ServiceManagerClient { return this.innerApiCalls.createServiceConfig(request, options, callback); } getServiceRollout( - request: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, + request?: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, options?: CallOptions ): Promise< [ @@ -776,7 +776,7 @@ export class ServiceManagerClient { * const [response] = await client.getServiceRollout(request); */ getServiceRollout( - request: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, + request?: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, optionsOrCallback?: | CallOptions | Callback< @@ -822,7 +822,7 @@ export class ServiceManagerClient { return this.innerApiCalls.getServiceRollout(request, options, callback); } generateConfigReport( - request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, + request?: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, options?: CallOptions ): Promise< [ @@ -893,7 +893,7 @@ export class ServiceManagerClient { * const [response] = await client.generateConfigReport(request); */ generateConfigReport( - request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, + request?: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, optionsOrCallback?: | CallOptions | Callback< @@ -934,7 +934,7 @@ export class ServiceManagerClient { } createService( - request: protos.google.api.servicemanagement.v1.ICreateServiceRequest, + request?: protos.google.api.servicemanagement.v1.ICreateServiceRequest, options?: CallOptions ): Promise< [ @@ -993,7 +993,7 @@ export class ServiceManagerClient { * const [response] = await operation.promise(); */ createService( - request: protos.google.api.servicemanagement.v1.ICreateServiceRequest, + request?: protos.google.api.servicemanagement.v1.ICreateServiceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1072,7 +1072,7 @@ export class ServiceManagerClient { >; } deleteService( - request: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, + request?: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, options?: CallOptions ): Promise< [ @@ -1134,7 +1134,7 @@ export class ServiceManagerClient { * const [response] = await operation.promise(); */ deleteService( - request: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, + request?: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1219,7 +1219,7 @@ export class ServiceManagerClient { >; } undeleteService( - request: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, + request?: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, options?: CallOptions ): Promise< [ @@ -1281,7 +1281,7 @@ export class ServiceManagerClient { * const [response] = await operation.promise(); */ undeleteService( - request: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, + request?: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1366,7 +1366,7 @@ export class ServiceManagerClient { >; } submitConfigSource( - request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, + request?: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, options?: CallOptions ): Promise< [ @@ -1441,7 +1441,7 @@ export class ServiceManagerClient { * const [response] = await operation.promise(); */ submitConfigSource( - request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, + request?: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1526,7 +1526,7 @@ export class ServiceManagerClient { >; } createServiceRollout( - request: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, + request?: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, options?: CallOptions ): Promise< [ @@ -1598,7 +1598,7 @@ export class ServiceManagerClient { * const [response] = await operation.promise(); */ createServiceRollout( - request: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, + request?: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1683,7 +1683,7 @@ export class ServiceManagerClient { >; } enableService( - request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, + request?: protos.google.api.servicemanagement.v1.IEnableServiceRequest, options?: CallOptions ): Promise< [ @@ -1753,9 +1753,10 @@ export class ServiceManagerClient { * @example * const [operation] = await client.enableService(request); * const [response] = await operation.promise(); + * @deprecated EnableService is deprecated and may be removed in a future version. */ enableService( - request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, + request?: protos.google.api.servicemanagement.v1.IEnableServiceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1800,6 +1801,11 @@ export class ServiceManagerClient { service_name: request.serviceName || '', }); this.initialize(); + gax.warn( + 'DEP$ServiceManager-$EnableService', + 'EnableService is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); return this.innerApiCalls.enableService(request, options, callback); } /** @@ -1816,6 +1822,7 @@ export class ServiceManagerClient { * console.log(decodedOperation.result); * console.log(decodedOperation.done); * console.log(decodedOperation.metadata); + * @deprecated EnableService is deprecated and may be removed in a future version. */ async checkEnableServiceProgress( name: string @@ -1840,7 +1847,7 @@ export class ServiceManagerClient { >; } disableService( - request: protos.google.api.servicemanagement.v1.IDisableServiceRequest, + request?: protos.google.api.servicemanagement.v1.IDisableServiceRequest, options?: CallOptions ): Promise< [ @@ -1909,9 +1916,10 @@ export class ServiceManagerClient { * @example * const [operation] = await client.disableService(request); * const [response] = await operation.promise(); + * @deprecated DisableService is deprecated and may be removed in a future version. */ disableService( - request: protos.google.api.servicemanagement.v1.IDisableServiceRequest, + request?: protos.google.api.servicemanagement.v1.IDisableServiceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1956,6 +1964,11 @@ export class ServiceManagerClient { service_name: request.serviceName || '', }); this.initialize(); + gax.warn( + 'DEP$ServiceManager-$DisableService', + 'DisableService is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); return this.innerApiCalls.disableService(request, options, callback); } /** @@ -1972,6 +1985,7 @@ export class ServiceManagerClient { * console.log(decodedOperation.result); * console.log(decodedOperation.done); * console.log(decodedOperation.metadata); + * @deprecated DisableService is deprecated and may be removed in a future version. */ async checkDisableServiceProgress( name: string @@ -1996,7 +2010,7 @@ export class ServiceManagerClient { >; } listServices( - request: protos.google.api.servicemanagement.v1.IListServicesRequest, + request?: protos.google.api.servicemanagement.v1.IListServicesRequest, options?: CallOptions ): Promise< [ @@ -2067,7 +2081,7 @@ export class ServiceManagerClient { * for more details and examples. */ listServices( - request: protos.google.api.servicemanagement.v1.IListServicesRequest, + request?: protos.google.api.servicemanagement.v1.IListServicesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -2201,7 +2215,7 @@ export class ServiceManagerClient { ) as AsyncIterable; } listServiceConfigs( - request: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + request?: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, options?: CallOptions ): Promise< [ @@ -2259,7 +2273,7 @@ export class ServiceManagerClient { * for more details and examples. */ listServiceConfigs( - request: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, + request?: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -2399,7 +2413,7 @@ export class ServiceManagerClient { ) as AsyncIterable; } listServiceRollouts( - request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + request?: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, options?: CallOptions ): Promise< [ @@ -2466,7 +2480,7 @@ export class ServiceManagerClient { * for more details and examples. */ listServiceRollouts( - request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + request?: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< From b26ca6591009148aa311f6194b187abdf7ba948b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 29 Jun 2021 16:54:22 +0000 Subject: [PATCH 24/85] chore: release 0.2.3 (#63) :robot: I have created a release \*beep\* \*boop\* --- ### [0.2.3](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.2...v0.2.3) (2021-06-25) ### Bug Fixes * make request optional in all cases ([#61](https://www.github.com/googleapis/nodejs-service-management/issues/61)) ([8ba608c](https://www.github.com/googleapis/nodejs-service-management/commit/8ba608caad06f54c0f4fb650b18948a1143440f4)) --- 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-api-servicemanagement/CHANGELOG.md | 7 +++++++ packages/google-api-servicemanagement/package.json | 2 +- packages/google-api-servicemanagement/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index c19b1696b0c..1d894828d3b 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.2.3](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.2...v0.2.3) (2021-06-25) + + +### Bug Fixes + +* make request optional in all cases ([#61](https://www.github.com/googleapis/nodejs-service-management/issues/61)) ([8ba608c](https://www.github.com/googleapis/nodejs-service-management/commit/8ba608caad06f54c0f4fb650b18948a1143440f4)) + ### [0.2.2](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.1...v0.2.2) (2021-05-25) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 43e0f74d5c8..b8f10fdab36 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "0.2.2", + "version": "0.2.3", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index a0902c4c64f..86e04c7d8ad 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^0.2.2" + "@google-cloud/service-management": "^0.2.3" }, "devDependencies": { "c8": "^7.1.0", From f7a5775fb14fb2cd776f3cdcf39cabb0b54b2cf0 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 30 Jun 2021 12:14:59 -0400 Subject: [PATCH 25/85] fix(deps): google-gax v2.17.0 with mTLS (#67) --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index b8f10fdab36..fa1b83ec0e7 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^2.17.0" }, "devDependencies": { "@types/mocha": "^8.2.1", From 30d4065fda065975fe31305f2c303f1c7c33ac56 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 30 Jun 2021 16:24:41 +0000 Subject: [PATCH 26/85] chore: release 0.2.4 (#69) :robot: I have created a release \*beep\* \*boop\* --- ### [0.2.4](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.3...v0.2.4) (2021-06-30) ### Bug Fixes * **deps:** google-gax v2.17.0 with mTLS ([#67](https://www.github.com/googleapis/nodejs-service-management/issues/67)) ([39328cd](https://www.github.com/googleapis/nodejs-service-management/commit/39328cdd1389ab2bddb1744bb8a77774e5a924c2)) --- 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-api-servicemanagement/CHANGELOG.md | 7 +++++++ packages/google-api-servicemanagement/package.json | 2 +- packages/google-api-servicemanagement/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index 1d894828d3b..fbdcfbdbf5a 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.2.4](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.3...v0.2.4) (2021-06-30) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#67](https://www.github.com/googleapis/nodejs-service-management/issues/67)) ([39328cd](https://www.github.com/googleapis/nodejs-service-management/commit/39328cdd1389ab2bddb1744bb8a77774e5a924c2)) + ### [0.2.3](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.2...v0.2.3) (2021-06-25) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index fa1b83ec0e7..c3eb98afada 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "0.2.3", + "version": "0.2.4", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 86e04c7d8ad..5b11a7065f9 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^0.2.3" + "@google-cloud/service-management": "^0.2.4" }, "devDependencies": { "c8": "^7.1.0", From f3919ab026f2d3b826a7451c076a722e85f672c7 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 17:46:36 -0400 Subject: [PATCH 27/85] fix(deps): google-gax v2.17.1 (#70) --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index c3eb98afada..5f252881c8f 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.17.0" + "google-gax": "^2.17.1" }, "devDependencies": { "@types/mocha": "^8.2.1", From 176747d551f5b83b2ec21bed62748d835ff0b374 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 12 Jul 2021 22:20:44 +0000 Subject: [PATCH 28/85] chore: release 0.2.5 (#71) :robot: I have created a release \*beep\* \*boop\* --- ### [0.2.5](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.4...v0.2.5) (2021-07-12) ### Bug Fixes * **deps:** google-gax v2.17.1 ([#70](https://www.github.com/googleapis/nodejs-service-management/issues/70)) ([fc4f996](https://www.github.com/googleapis/nodejs-service-management/commit/fc4f99666252f8f06f399438aedebb6e5502f2e9)) --- 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-api-servicemanagement/CHANGELOG.md | 7 +++++++ packages/google-api-servicemanagement/package.json | 2 +- packages/google-api-servicemanagement/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index fbdcfbdbf5a..0417fa626c6 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.2.5](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.4...v0.2.5) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#70](https://www.github.com/googleapis/nodejs-service-management/issues/70)) ([fc4f996](https://www.github.com/googleapis/nodejs-service-management/commit/fc4f99666252f8f06f399438aedebb6e5502f2e9)) + ### [0.2.4](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.3...v0.2.4) (2021-06-30) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 5f252881c8f..d776d81e6d2 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "0.2.4", + "version": "0.2.5", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 5b11a7065f9..8bc4c0a4fd9 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^0.2.4" + "@google-cloud/service-management": "^0.2.5" }, "devDependencies": { "c8": "^7.1.0", From d1d8de00240cd430563d6c8036046930396ecec3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 30 Jul 2021 14:41:38 -0500 Subject: [PATCH 29/85] build: failing tests for LRO check methods (#76) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build: failing tests for LRO check methods Updated gapic-generator-typescript to v2.1.1. Committer: @alexander-fenster PiperOrigin-RevId: 387841814 Source-Link: https://github.com/googleapis/googleapis/commit/f973532115a6d2c4f264be00190922e04d773380 Source-Link: https://github.com/googleapis/googleapis-gen/commit/acb489dd3df575f42c891dd66fdecb6d3b11cf7a * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/service_manager_client.ts | 25 ++++++++++++++++--- .../test/gapic_service_manager_v1.ts | 24 ++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index 29191dce1c0..e0d61b42110 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -49,6 +49,7 @@ const version = require('../../../package.json').version; export class ServiceManagerClient { 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: {}; @@ -60,6 +61,7 @@ export class ServiceManagerClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; operationsClient: gax.OperationsClient; serviceManagerStub?: Promise<{[name: string]: Function}>; @@ -103,6 +105,9 @@ export class ServiceManagerClient { const staticMembers = this.constructor as typeof ServiceManagerClient; 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 = @@ -276,6 +281,9 @@ export class ServiceManagerClient { // 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; } /** @@ -304,7 +312,8 @@ export class ServiceManagerClient { ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.api.servicemanagement.v1.ServiceManager, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -1801,7 +1810,7 @@ export class ServiceManagerClient { service_name: request.serviceName || '', }); this.initialize(); - gax.warn( + this.warn( 'DEP$ServiceManager-$EnableService', 'EnableService is deprecated and may be removed in a future version.', 'DeprecationWarning' @@ -1832,6 +1841,11 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.v1.OperationMetadata > > { + this.warn( + 'DEP$ServiceManager-$checkEnableServiceProgress', + 'checkEnableServiceProgress is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); const request = new operationsProtos.google.longrunning.GetOperationRequest( {name} ); @@ -1964,7 +1978,7 @@ export class ServiceManagerClient { service_name: request.serviceName || '', }); this.initialize(); - gax.warn( + this.warn( 'DEP$ServiceManager-$DisableService', 'DisableService is deprecated and may be removed in a future version.', 'DeprecationWarning' @@ -1995,6 +2009,11 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.v1.OperationMetadata > > { + this.warn( + 'DEP$ServiceManager-$checkDisableServiceProgress', + 'checkDisableServiceProgress is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); const request = new operationsProtos.google.longrunning.GetOperationRequest( {name} ); diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index b3181a9c6d6..b02094e8c78 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -1698,6 +1698,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.EnableServiceRequest() @@ -1718,6 +1719,7 @@ describe('v1.ServiceManagerClient', () => { stubLongRunningCall(expectedResponse); const [operation] = await client.enableService(request); const [response] = await operation.promise(); + assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( (client.innerApiCalls.enableService as SinonStub) @@ -1731,6 +1733,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.EnableServiceRequest() @@ -1772,6 +1775,7 @@ describe('v1.ServiceManagerClient', () => { protos.google.api.servicemanagement.v1.IOperationMetadata >; const [response] = await operation.promise(); + assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( (client.innerApiCalls.enableService as SinonStub) @@ -1785,6 +1789,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.EnableServiceRequest() @@ -1804,6 +1809,7 @@ describe('v1.ServiceManagerClient', () => { expectedError ); await assert.rejects(client.enableService(request), expectedError); + assert(stub.calledOnce); assert( (client.innerApiCalls.enableService as SinonStub) .getCall(0) @@ -1816,6 +1822,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.EnableServiceRequest() @@ -1837,6 +1844,7 @@ describe('v1.ServiceManagerClient', () => { ); const [operation] = await client.enableService(request); await assert.rejects(operation.promise(), expectedError); + assert(stub.calledOnce); assert( (client.innerApiCalls.enableService as SinonStub) .getCall(0) @@ -1849,6 +1857,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -1861,6 +1870,7 @@ describe('v1.ServiceManagerClient', () => { const decodedOperation = await client.checkEnableServiceProgress( expectedResponse.name ); + assert(stub.calledOnce); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); @@ -1871,6 +1881,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const expectedError = new Error('expected'); @@ -1882,6 +1893,7 @@ describe('v1.ServiceManagerClient', () => { client.checkEnableServiceProgress(''), expectedError ); + assert(stub.calledOnce); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); @@ -1892,6 +1904,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DisableServiceRequest() @@ -1912,6 +1925,7 @@ describe('v1.ServiceManagerClient', () => { stubLongRunningCall(expectedResponse); const [operation] = await client.disableService(request); const [response] = await operation.promise(); + assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( (client.innerApiCalls.disableService as SinonStub) @@ -1925,6 +1939,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DisableServiceRequest() @@ -1966,6 +1981,7 @@ describe('v1.ServiceManagerClient', () => { protos.google.api.servicemanagement.v1.IOperationMetadata >; const [response] = await operation.promise(); + assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( (client.innerApiCalls.disableService as SinonStub) @@ -1979,6 +1995,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DisableServiceRequest() @@ -1998,6 +2015,7 @@ describe('v1.ServiceManagerClient', () => { expectedError ); await assert.rejects(client.disableService(request), expectedError); + assert(stub.calledOnce); assert( (client.innerApiCalls.disableService as SinonStub) .getCall(0) @@ -2010,6 +2028,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DisableServiceRequest() @@ -2031,6 +2050,7 @@ describe('v1.ServiceManagerClient', () => { ); const [operation] = await client.disableService(request); await assert.rejects(operation.promise(), expectedError); + assert(stub.calledOnce); assert( (client.innerApiCalls.disableService as SinonStub) .getCall(0) @@ -2043,6 +2063,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2055,6 +2076,7 @@ describe('v1.ServiceManagerClient', () => { const decodedOperation = await client.checkDisableServiceProgress( expectedResponse.name ); + assert(stub.calledOnce); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); @@ -2065,6 +2087,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const expectedError = new Error('expected'); @@ -2076,6 +2099,7 @@ describe('v1.ServiceManagerClient', () => { client.checkDisableServiceProgress(''), expectedError ); + assert(stub.calledOnce); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); From 6509518b5e0614dfb08999b6fe5998e4ba0d9344 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:02:25 -0400 Subject: [PATCH 30/85] chore(nodejs): update client ref docs link in metadata (#77) --- packages/google-api-servicemanagement/.repo-metadata.json | 2 +- packages/google-api-servicemanagement/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/.repo-metadata.json b/packages/google-api-servicemanagement/.repo-metadata.json index 73cbbd0d371..a639f9dbb01 100644 --- a/packages/google-api-servicemanagement/.repo-metadata.json +++ b/packages/google-api-servicemanagement/.repo-metadata.json @@ -1,7 +1,7 @@ { "issue_tracker": "https://github.com/googleapis/nodejs-service-management/issues", "distribution_name": "@google-cloud/service-management", - "client_documentation": "https://cloud.google.com/service-infrastructure/docs/service-management/reference", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/service-management/latest", "product_documentation": "https://cloud.google.com/service-infrastructure/docs/overview/", "name_pretty": "Service Management API", "release_level": "GA", diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index 8013c982f7d..05069af5608 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -143,7 +143,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-service-management/blob/master/LICENSE) -[client-docs]: https://cloud.google.com/service-infrastructure/docs/service-management/reference +[client-docs]: https://cloud.google.com/nodejs/docs/reference/service-management/latest [product-docs]: https://cloud.google.com/service-infrastructure/docs/overview/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 65bcf25c2a6b0f400fbcad1fdcfa9c2913bf5aa0 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 22:46:22 -0400 Subject: [PATCH 31/85] fix(deps): google-gax v2.24.1 (#79) --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index d776d81e6d2..4dcd2b37705 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.17.1" + "google-gax": "^2.24.1" }, "devDependencies": { "@types/mocha": "^8.2.1", From f9f58f951eeb97551912acccb39db3e8ed15c219 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Aug 2021 17:20:33 +0000 Subject: [PATCH 32/85] chore: release 0.2.6 (#80) :robot: I have created a release \*beep\* \*boop\* --- ### [0.2.6](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.5...v0.2.6) (2021-08-17) ### Bug Fixes * **deps:** google-gax v2.24.1 ([#79](https://www.github.com/googleapis/nodejs-service-management/issues/79)) ([b679b6c](https://www.github.com/googleapis/nodejs-service-management/commit/b679b6c3dff457764698044b8b325a52922fbb46)) --- 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-api-servicemanagement/CHANGELOG.md | 7 +++++++ packages/google-api-servicemanagement/package.json | 2 +- packages/google-api-servicemanagement/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index 0417fa626c6..c1698d9915d 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.2.6](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.5...v0.2.6) (2021-08-17) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#79](https://www.github.com/googleapis/nodejs-service-management/issues/79)) ([b679b6c](https://www.github.com/googleapis/nodejs-service-management/commit/b679b6c3dff457764698044b8b325a52922fbb46)) + ### [0.2.5](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.4...v0.2.5) (2021-07-12) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 4dcd2b37705..5faf9b29375 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "0.2.5", + "version": "0.2.6", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 8bc4c0a4fd9..b13e32d6a2b 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^0.2.5" + "@google-cloud/service-management": "^0.2.6" }, "devDependencies": { "c8": "^7.1.0", From 59acb2fb595a4dc8e0abb51c5c9917df6ddafc98 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:32:15 +0000 Subject: [PATCH 33/85] feat: turns on self-signed JWT feature flag (#81) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 392067151 Source-Link: https://github.com/googleapis/googleapis/commit/06345f7b95c4b4a3ffe4303f1f2984ccc304b2e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95882b37970e41e4cd51b22fa507cfd46dc7c4b6 --- .../src/v1/service_manager_client.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index e0d61b42110..8827794a273 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -132,6 +132,12 @@ export class ServiceManagerClient { // 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; @@ -2669,6 +2675,7 @@ export class ServiceManagerClient { return this.serviceManagerStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); From cf947dc1a21b301b2b0f370830e68085928df43d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 Aug 2021 08:34:15 -0700 Subject: [PATCH 34/85] chore: release 0.3.0 (#82) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-api-servicemanagement/CHANGELOG.md | 7 +++++++ packages/google-api-servicemanagement/package.json | 2 +- packages/google-api-servicemanagement/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index c1698d9915d..557c0a32ee4 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.3.0](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.6...v0.3.0) (2021-08-23) + + +### Features + +* turns on self-signed JWT feature flag ([#81](https://www.github.com/googleapis/nodejs-service-management/issues/81)) ([237698f](https://www.github.com/googleapis/nodejs-service-management/commit/237698f72dfdd14e95d956a2e45f6db423e45e23)) + ### [0.2.6](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.5...v0.2.6) (2021-08-17) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 5faf9b29375..191a2017026 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "0.2.6", + "version": "0.3.0", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index b13e32d6a2b..818760f9772 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^0.2.6" + "@google-cloud/service-management": "^0.3.0" }, "devDependencies": { "c8": "^7.1.0", From 361adb811dfa6e9a89c43dd50041817bac79251f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 25 Aug 2021 23:38:50 +0000 Subject: [PATCH 35/85] chore: disable renovate dependency dashboard (#1194) (#84) --- packages/google-api-servicemanagement/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index 05069af5608..ad43a3bfdb4 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -134,8 +134,8 @@ Contributions welcome! See the [Contributing Guide](https://github.com/googleapi Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) are generated from a central template. To edit one of these files, make an edit -to its template in this -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). +to its templates in +[directory](https://github.com/googleapis/synthtool). ## License From f69a9e4708101c331bbcfcfdbd17a66851f2b3df Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 10 Sep 2021 12:51:36 -0400 Subject: [PATCH 36/85] fix(build): set default branch to main (#85) --- packages/google-api-servicemanagement/README.md | 12 ++++++------ .../google-api-servicemanagement/samples/README.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index ad43a3bfdb4..695924d2d5d 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/service-management.svg)](https://www.npmjs.org/package/@google-cloud/service-management) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-service-management/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-service-management) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-service-management/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-service-management) @@ -15,7 +15,7 @@ Service management client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-service-management/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-service-management/blob/main/CHANGELOG.md). * [Service Management API Node.js Client API Reference][client-docs] * [Service Management API Documentation][product-docs] @@ -82,11 +82,11 @@ listServices(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-service-management/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-service-management/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-service-management/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-service-management&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-service-management/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-service-management&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -129,7 +129,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-service-management/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-service-management/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`) @@ -141,7 +141,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-service-management/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-service-management/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/service-management/latest [product-docs]: https://cloud.google.com/service-infrastructure/docs/overview/ diff --git a/packages/google-api-servicemanagement/samples/README.md b/packages/google-api-servicemanagement/samples/README.md index c86555cbb8b..89b9ef15789 100644 --- a/packages/google-api-servicemanagement/samples/README.md +++ b/packages/google-api-servicemanagement/samples/README.md @@ -31,7 +31,7 @@ Before running the samples, make sure you've followed the steps outlined in ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-service-management/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-service-management/blob/main/samples/quickstart.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-service-management&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) From 661aef96a9c2accd7696b76a7dbfbcd733e9aee9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 10 Sep 2021 10:54:20 -0700 Subject: [PATCH 37/85] chore: release 0.3.1 (#86) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-api-servicemanagement/CHANGELOG.md | 7 +++++++ packages/google-api-servicemanagement/package.json | 2 +- packages/google-api-servicemanagement/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index 557c0a32ee4..4e069e27ed2 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.3.1](https://www.github.com/googleapis/nodejs-service-management/compare/v0.3.0...v0.3.1) (2021-09-10) + + +### Bug Fixes + +* **build:** set default branch to main ([#85](https://www.github.com/googleapis/nodejs-service-management/issues/85)) ([b343eac](https://www.github.com/googleapis/nodejs-service-management/commit/b343eaca04b4f651c737d8a84baa5a75a361c4b0)) + ## [0.3.0](https://www.github.com/googleapis/nodejs-service-management/compare/v0.2.6...v0.3.0) (2021-08-23) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 191a2017026..c49110ee4c6 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "0.3.0", + "version": "0.3.1", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 818760f9772..247dcf4e555 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^0.3.0" + "@google-cloud/service-management": "^0.3.1" }, "devDependencies": { "c8": "^7.1.0", From e72b4a8890f3438b4e4abea7adf57da7af4a0a62 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 00:45:13 +0000 Subject: [PATCH 38/85] build(node): update deps used during postprocessing (#1243) (#93) --- .../protos/protos.d.ts | 27 +++--- .../protos/protos.js | 85 ++++++++++--------- .../protos/protos.json | 34 ++++++-- 3 files changed, 85 insertions(+), 61 deletions(-) diff --git a/packages/google-api-servicemanagement/protos/protos.d.ts b/packages/google-api-servicemanagement/protos/protos.d.ts index 7004c059d25..e6fdee86ab1 100644 --- a/packages/google-api-servicemanagement/protos/protos.d.ts +++ b/packages/google-api-servicemanagement/protos/protos.d.ts @@ -4269,7 +4269,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } /** Properties of a MetricDescriptor. */ @@ -5105,21 +5106,18 @@ export namespace google { /** Properties of a Service. */ interface IService { - /** Service configVersion */ - configVersion?: (google.protobuf.IUInt32Value|null); - /** Service name */ name?: (string|null); - /** Service id */ - id?: (string|null); - /** Service title */ title?: (string|null); /** Service producerProjectId */ producerProjectId?: (string|null); + /** Service id */ + id?: (string|null); + /** Service apis */ apis?: (google.protobuf.IApi[]|null); @@ -5179,6 +5177,9 @@ export namespace google { /** Service sourceInfo */ sourceInfo?: (google.api.ISourceInfo|null); + + /** Service configVersion */ + configVersion?: (google.protobuf.IUInt32Value|null); } /** Represents a Service. */ @@ -5190,21 +5191,18 @@ export namespace google { */ constructor(properties?: google.api.IService); - /** Service configVersion. */ - public configVersion?: (google.protobuf.IUInt32Value|null); - /** Service name. */ public name: string; - /** Service id. */ - public id: string; - /** Service title. */ public title: string; /** Service producerProjectId. */ public producerProjectId: string; + /** Service id. */ + public id: string; + /** Service apis. */ public apis: google.protobuf.IApi[]; @@ -5265,6 +5263,9 @@ export namespace google { /** Service sourceInfo. */ public sourceInfo?: (google.api.ISourceInfo|null); + /** Service configVersion. */ + public configVersion?: (google.protobuf.IUInt32Value|null); + /** * Creates a new Service instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-api-servicemanagement/protos/protos.js b/packages/google-api-servicemanagement/protos/protos.js index 82767a4e970..3c989aa454e 100644 --- a/packages/google-api-servicemanagement/protos/protos.js +++ b/packages/google-api-servicemanagement/protos/protos.js @@ -9767,6 +9767,7 @@ * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -9777,6 +9778,7 @@ values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; return values; })(); @@ -12187,11 +12189,10 @@ * Properties of a Service. * @memberof google.api * @interface IService - * @property {google.protobuf.IUInt32Value|null} [configVersion] Service configVersion * @property {string|null} [name] Service name - * @property {string|null} [id] Service id * @property {string|null} [title] Service title * @property {string|null} [producerProjectId] Service producerProjectId + * @property {string|null} [id] Service id * @property {Array.|null} [apis] Service apis * @property {Array.|null} [types] Service types * @property {Array.|null} [enums] Service enums @@ -12212,6 +12213,7 @@ * @property {google.api.IMonitoring|null} [monitoring] Service monitoring * @property {google.api.ISystemParameters|null} [systemParameters] Service systemParameters * @property {google.api.ISourceInfo|null} [sourceInfo] Service sourceInfo + * @property {google.protobuf.IUInt32Value|null} [configVersion] Service configVersion */ /** @@ -12236,14 +12238,6 @@ this[keys[i]] = properties[keys[i]]; } - /** - * Service configVersion. - * @member {google.protobuf.IUInt32Value|null|undefined} configVersion - * @memberof google.api.Service - * @instance - */ - Service.prototype.configVersion = null; - /** * Service name. * @member {string} name @@ -12252,14 +12246,6 @@ */ Service.prototype.name = ""; - /** - * Service id. - * @member {string} id - * @memberof google.api.Service - * @instance - */ - Service.prototype.id = ""; - /** * Service title. * @member {string} title @@ -12276,6 +12262,14 @@ */ Service.prototype.producerProjectId = ""; + /** + * Service id. + * @member {string} id + * @memberof google.api.Service + * @instance + */ + Service.prototype.id = ""; + /** * Service apis. * @member {Array.} apis @@ -12436,6 +12430,14 @@ */ Service.prototype.sourceInfo = null; + /** + * Service configVersion. + * @member {google.protobuf.IUInt32Value|null|undefined} configVersion + * @memberof google.api.Service + * @instance + */ + Service.prototype.configVersion = null; + /** * Creates a new Service instance using the specified properties. * @function create @@ -12551,21 +12553,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 20: - message.configVersion = $root.google.protobuf.UInt32Value.decode(reader, reader.uint32()); - break; case 1: message.name = reader.string(); break; - case 33: - message.id = reader.string(); - break; case 2: message.title = reader.string(); break; case 22: message.producerProjectId = reader.string(); break; + case 33: + message.id = reader.string(); + break; case 3: if (!(message.apis && message.apis.length)) message.apis = []; @@ -12640,6 +12639,9 @@ case 37: message.sourceInfo = $root.google.api.SourceInfo.decode(reader, reader.uint32()); break; + case 20: + message.configVersion = $root.google.protobuf.UInt32Value.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -12675,23 +12677,18 @@ Service.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.configVersion != null && message.hasOwnProperty("configVersion")) { - var error = $root.google.protobuf.UInt32Value.verify(message.configVersion); - if (error) - return "configVersion." + error; - } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; if (message.title != null && message.hasOwnProperty("title")) if (!$util.isString(message.title)) return "title: string expected"; if (message.producerProjectId != null && message.hasOwnProperty("producerProjectId")) if (!$util.isString(message.producerProjectId)) return "producerProjectId: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; if (message.apis != null && message.hasOwnProperty("apis")) { if (!Array.isArray(message.apis)) return "apis: array expected"; @@ -12820,6 +12817,11 @@ if (error) return "sourceInfo." + error; } + if (message.configVersion != null && message.hasOwnProperty("configVersion")) { + var error = $root.google.protobuf.UInt32Value.verify(message.configVersion); + if (error) + return "configVersion." + error; + } return null; }; @@ -12835,19 +12837,14 @@ if (object instanceof $root.google.api.Service) return object; var message = new $root.google.api.Service(); - if (object.configVersion != null) { - if (typeof object.configVersion !== "object") - throw TypeError(".google.api.Service.configVersion: object expected"); - message.configVersion = $root.google.protobuf.UInt32Value.fromObject(object.configVersion); - } if (object.name != null) message.name = String(object.name); - if (object.id != null) - message.id = String(object.id); if (object.title != null) message.title = String(object.title); if (object.producerProjectId != null) message.producerProjectId = String(object.producerProjectId); + if (object.id != null) + message.id = String(object.id); if (object.apis) { if (!Array.isArray(object.apis)) throw TypeError(".google.api.Service.apis: array expected"); @@ -12983,6 +12980,11 @@ throw TypeError(".google.api.Service.sourceInfo: object expected"); message.sourceInfo = $root.google.api.SourceInfo.fromObject(object.sourceInfo); } + if (object.configVersion != null) { + if (typeof object.configVersion !== "object") + throw TypeError(".google.api.Service.configVersion: object expected"); + message.configVersion = $root.google.protobuf.UInt32Value.fromObject(object.configVersion); + } return message; }; @@ -27158,6 +27160,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -27262,6 +27265,10 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-api-servicemanagement/protos/protos.json b/packages/google-api-servicemanagement/protos/protos.json index 43469e53539..b9b92cd7f55 100644 --- a/packages/google-api-servicemanagement/protos/protos.json +++ b/packages/google-api-servicemanagement/protos/protos.json @@ -1098,7 +1098,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "MetricDescriptor": { @@ -1315,18 +1316,10 @@ }, "Service": { "fields": { - "configVersion": { - "type": "google.protobuf.UInt32Value", - "id": 20 - }, "name": { "type": "string", "id": 1 }, - "id": { - "type": "string", - "id": 33 - }, "title": { "type": "string", "id": 2 @@ -1335,6 +1328,10 @@ "type": "string", "id": 22 }, + "id": { + "type": "string", + "id": 33 + }, "apis": { "rule": "repeated", "type": "google.protobuf.Api", @@ -1421,6 +1418,13 @@ "sourceInfo": { "type": "SourceInfo", "id": 37 + }, + "configVersion": { + "type": "google.protobuf.UInt32Value", + "id": 20, + "options": { + "deprecated": true + } } } }, @@ -2626,6 +2630,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From 77b357001503f979205bf5e94be4e8cb25eedf71 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 21 Oct 2021 11:30:43 -0400 Subject: [PATCH 39/85] chore(cloud-rad): delete api-extractor config (#95) --- .../api-extractor.json | 369 ------------------ 1 file changed, 369 deletions(-) delete mode 100644 packages/google-api-servicemanagement/api-extractor.json diff --git a/packages/google-api-servicemanagement/api-extractor.json b/packages/google-api-servicemanagement/api-extractor.json deleted file mode 100644 index de228294b23..00000000000 --- a/packages/google-api-servicemanagement/api-extractor.json +++ /dev/null @@ -1,369 +0,0 @@ -/** - * Config file for API Extractor. For more info, please visit: https://api-extractor.com - */ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - /** - * Optionally specifies another JSON config file that this file extends from. This provides a way for - * standard settings to be shared across multiple projects. - * - * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains - * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be - * resolved using NodeJS require(). - * - * SUPPORTED TOKENS: none - * DEFAULT VALUE: "" - */ - // "extends": "./shared/api-extractor-base.json" - // "extends": "my-package/include/api-extractor-base.json" - - /** - * Determines the "" token that can be used with other config file settings. The project folder - * typically contains the tsconfig.json and package.json config files, but the path is user-defined. - * - * The path is resolved relative to the folder of the config file that contains the setting. - * - * The default value for "projectFolder" is the token "", which means the folder is determined by traversing - * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder - * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error - * will be reported. - * - * SUPPORTED TOKENS: - * DEFAULT VALUE: "" - */ - // "projectFolder": "..", - - /** - * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor - * analyzes the symbols exported by this module. - * - * The file extension must be ".d.ts" and not ".ts". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - */ - "mainEntryPointFilePath": "/protos/protos.d.ts", - - /** - * A list of NPM package names whose exports should be treated as part of this package. - * - * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", - * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part - * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly - * imports library2. To avoid this, we can specify: - * - * "bundledPackages": [ "library2" ], - * - * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been - * local files for library1. - */ - "bundledPackages": [ ], - - /** - * Determines how the TypeScript compiler engine will be invoked by API Extractor. - */ - "compiler": { - /** - * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * Note: This setting will be ignored if "overrideTsconfig" is used. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/tsconfig.json" - */ - // "tsconfigFilePath": "/tsconfig.json", - - /** - * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. - * The object must conform to the TypeScript tsconfig schema: - * - * http://json.schemastore.org/tsconfig - * - * If omitted, then the tsconfig.json file will be read from the "projectFolder". - * - * DEFAULT VALUE: no overrideTsconfig section - */ - // "overrideTsconfig": { - // . . . - // } - - /** - * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended - * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when - * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses - * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. - * - * DEFAULT VALUE: false - */ - // "skipLibCheck": true, - }, - - /** - * Configures how the API report file (*.api.md) will be generated. - */ - "apiReport": { - /** - * (REQUIRED) Whether to generate an API report. - */ - "enabled": true, - - /** - * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce - * a full file path. - * - * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". - * - * SUPPORTED TOKENS: , - * DEFAULT VALUE: ".api.md" - */ - // "reportFileName": ".api.md", - - /** - * Specifies the folder where the API report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, - * e.g. for an API review. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/etc/" - */ - // "reportFolder": "/etc/", - - /** - * Specifies the folder where the temporary report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * After the temporary file is written to disk, it is compared with the file in the "reportFolder". - * If they are different, a production build will fail. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/" - */ - // "reportTempFolder": "/temp/" - }, - - /** - * Configures how the doc model file (*.api.json) will be generated. - */ - "docModel": { - /** - * (REQUIRED) Whether to generate a doc model file. - */ - "enabled": true, - - /** - * The output path for the doc model file. The file extension should be ".api.json". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/.api.json" - */ - // "apiJsonFilePath": "/temp/.api.json" - }, - - /** - * Configures how the .d.ts rollup file will be generated. - */ - "dtsRollup": { - /** - * (REQUIRED) Whether to generate the .d.ts rollup file. - */ - "enabled": true, - - /** - * Specifies the output path for a .d.ts rollup file to be generated without any trimming. - * This file will include all declarations that are exported by the main entry point. - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/dist/.d.ts" - */ - // "untrimmedFilePath": "/dist/.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. - * This file will include only declarations that are marked as "@public" or "@beta". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "betaTrimmedFilePath": "/dist/-beta.d.ts", - - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. - * This file will include only declarations that are marked as "@public". - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "publicTrimmedFilePath": "/dist/-public.d.ts", - - /** - * When a declaration is trimmed, by default it will be replaced by a code comment such as - * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the - * declaration completely. - * - * DEFAULT VALUE: false - */ - // "omitTrimmingComments": true - }, - - /** - * Configures how the tsdoc-metadata.json file will be generated. - */ - "tsdocMetadata": { - /** - * Whether to generate the tsdoc-metadata.json file. - * - * DEFAULT VALUE: true - */ - // "enabled": true, - - /** - * Specifies where the TSDoc metadata file should be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", - * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup - * falls back to "tsdoc-metadata.json" in the package folder. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" - }, - - /** - * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files - * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. - * To use the OS's default newline kind, specify "os". - * - * DEFAULT VALUE: "crlf" - */ - // "newlineKind": "crlf", - - /** - * Configures how API Extractor reports error and warning messages produced during analysis. - * - * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. - */ - "messages": { - /** - * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing - * the input .d.ts files. - * - * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "compilerMessageReporting": { - /** - * Configures the default routing for messages that don't match an explicit rule in this table. - */ - "default": { - /** - * Specifies whether the message should be written to the the tool's output log. Note that - * the "addToApiReportFile" property may supersede this option. - * - * Possible values: "error", "warning", "none" - * - * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail - * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes - * the "--local" option), the warning is displayed but the build will not fail. - * - * DEFAULT VALUE: "warning" - */ - "logLevel": "warning", - - /** - * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), - * then the message will be written inside that file; otherwise, the message is instead logged according to - * the "logLevel" option. - * - * DEFAULT VALUE: false - */ - // "addToApiReportFile": false - }, - - // "TS2551": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by API Extractor during its analysis. - * - * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" - * - * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings - */ - "extractorMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - }, - - // "ae-extra-release-tag": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by the TSDoc parser when analyzing code comments. - * - * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "tsdocMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - } - - // "tsdoc-link-tag-unescaped-text": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - } - } - -} From 69f0a69f7232dd5d52200cb15928ac82720d6a0f Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 27 Oct 2021 11:26:21 -0700 Subject: [PATCH 40/85] chore: fix the wrong post processor image (#97) --- packages/google-api-servicemanagement/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/.github/.OwlBot.yaml b/packages/google-api-servicemanagement/.github/.OwlBot.yaml index efafe9c13ea..b5a6d445b4f 100644 --- a/packages/google-api-servicemanagement/.github/.OwlBot.yaml +++ b/packages/google-api-servicemanagement/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: From 86af231e67732f25c1c25d41eaf93d4175ec8acf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 21:22:22 +0200 Subject: [PATCH 41/85] chore(deps): update dependency @types/node to v16 (#96) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^14.14.32` -> `^16.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/14.17.32/16.11.6) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/compatibility-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/confidence-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-service-management). --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index c49110ee4c6..c2b529ffa8d 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@types/mocha": "^8.2.1", - "@types/node": "^14.14.32", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.6.0", "gts": "^3.1.0", From 8fd9a88f4d5f9216ffbb05f1ff28b3f96887b765 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:46:20 +0100 Subject: [PATCH 42/85] chore(deps): update dependency sinon to v12 (#98) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.2/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) > 'npm unlink' would implicitly unlink the current dir > until version 7, which requires an argument - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) > - Fix bundling of cjs module > > - Run prettier *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* #### 12.0.0 ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-service-management). --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index c2b529ffa8d..754a4407ef2 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -54,7 +54,7 @@ "mocha": "^8.3.1", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.0.0", "typescript": "^4.2.3", "webpack": "^5.24.4", From d2bd0dac0f2c165e4bf197ba72b9f37bc7404ff0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:54:21 +0000 Subject: [PATCH 43/85] docs(samples): add example tags to generated samples (#99) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 --- .../linkinator.config.json | 2 +- .../v1/service_manager.create_service.js | 53 + .../service_manager.create_service_config.js | 58 ++ .../service_manager.create_service_rollout.js | 61 ++ .../v1/service_manager.delete_service.js | 54 + .../v1/service_manager.disable_service.js | 65 ++ .../v1/service_manager.enable_service.js | 65 ++ .../service_manager.generate_config_report.js | 66 ++ .../v1/service_manager.get_service.js | 53 + .../v1/service_manager.get_service_config.js | 65 ++ .../v1/service_manager.get_service_rollout.js | 58 ++ .../service_manager.list_service_configs.js | 66 ++ .../service_manager.list_service_rollouts.js | 78 ++ .../v1/service_manager.list_services.js | 69 ++ .../service_manager.submit_config_source.js | 67 ++ .../v1/service_manager.undelete_service.js | 54 + .../src/v1/service_manager_client.ts | 984 +++++++++--------- .../test/gapic_service_manager_v1.ts | 20 +- 18 files changed, 1423 insertions(+), 515 deletions(-) create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js diff --git a/packages/google-api-servicemanagement/linkinator.config.json b/packages/google-api-servicemanagement/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-api-servicemanagement/linkinator.config.json +++ b/packages/google-api-servicemanagement/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js new file mode 100644 index 00000000000..55bf7963f3b --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(service) { + // [START servicemanagement_v1_generated_ServiceManager_CreateService_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Initial values for the service resource. + */ + // const service = {} + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callCreateService() { + // Construct request + const request = { + service, + }; + + // Run request + const [operation] = await servicemanagementClient.createService(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateService(); + // [END servicemanagement_v1_generated_ServiceManager_CreateService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js new file mode 100644 index 00000000000..edafb7a9e6e --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName, serviceConfig) { + // [START servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + */ + // const serviceName = 'abc123' + /** + * Required. The service configuration resource. + */ + // const serviceConfig = {} + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callCreateServiceConfig() { + // Construct request + const request = { + serviceName, + serviceConfig, + }; + + // Run request + const response = await servicemanagementClient.createServiceConfig(request); + console.log(response); + } + + callCreateServiceConfig(); + // [END servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js new file mode 100644 index 00000000000..c1288506952 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js @@ -0,0 +1,61 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName, rollout) { + // [START servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + */ + // const serviceName = 'abc123' + /** + * Required. The rollout resource. The `service_name` field is output only. + */ + // const rollout = {} + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callCreateServiceRollout() { + // Construct request + const request = { + serviceName, + rollout, + }; + + // Run request + const [operation] = await servicemanagementClient.createServiceRollout( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateServiceRollout(); + // [END servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js new file mode 100644 index 00000000000..ccaf69b7711 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName) { + // [START servicemanagement_v1_generated_ServiceManager_DeleteService_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + */ + // const serviceName = 'abc123' + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callDeleteService() { + // Construct request + const request = { + serviceName, + }; + + // Run request + const [operation] = await servicemanagementClient.deleteService(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteService(); + // [END servicemanagement_v1_generated_ServiceManager_DeleteService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.js new file mode 100644 index 00000000000..693c8ecd5b1 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName, consumerId) { + // [START servicemanagement_v1_generated_ServiceManager_DisableService_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the service to disable. Specifying an unknown service name + * will cause the request to fail. + */ + // const serviceName = 'abc123' + /** + * Required. The identity of consumer resource which service disablement will be + * applied to. + * The Google Service Management implementation accepts the following + * forms: + * - "project:" + * Note: this is made compatible with + * google.api.servicecontrol.v1.Operation.consumer_id. + */ + // const consumerId = 'abc123' + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callDisableService() { + // Construct request + const request = { + serviceName, + consumerId, + }; + + // Run request + const [operation] = await servicemanagementClient.disableService(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDisableService(); + // [END servicemanagement_v1_generated_ServiceManager_DisableService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.js new file mode 100644 index 00000000000..86e2e65e823 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName, consumerId) { + // [START servicemanagement_v1_generated_ServiceManager_EnableService_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the service to enable. Specifying an unknown service name will + * cause the request to fail. + */ + // const serviceName = 'abc123' + /** + * Required. The identity of consumer resource which service enablement will be + * applied to. + * The Google Service Management implementation accepts the following + * forms: + * - "project:" + * Note: this is made compatible with + * google.api.servicecontrol.v1.Operation.consumer_id. + */ + // const consumerId = 'abc123' + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callEnableService() { + // Construct request + const request = { + serviceName, + consumerId, + }; + + // Run request + const [operation] = await servicemanagementClient.enableService(request); + const [response] = await operation.promise(); + console.log(response); + } + + callEnableService(); + // [END servicemanagement_v1_generated_ServiceManager_EnableService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js new file mode 100644 index 00000000000..cbd977f44a9 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js @@ -0,0 +1,66 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(newConfig) { + // [START servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Service configuration for which we want to generate the report. + * For this version of API, the supported types are + * google.api.servicemanagement.v1.ConfigRef google.api.servicemanagement.v1.ConfigRef, + * google.api.servicemanagement.v1.ConfigSource google.api.servicemanagement.v1.ConfigSource, + * and google.api.Service google.api.Service + */ + // const newConfig = {} + /** + * Optional. Service configuration against which the comparison will be done. + * For this version of API, the supported types are + * google.api.servicemanagement.v1.ConfigRef google.api.servicemanagement.v1.ConfigRef, + * google.api.servicemanagement.v1.ConfigSource google.api.servicemanagement.v1.ConfigSource, + * and google.api.Service google.api.Service + */ + // const oldConfig = {} + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callGenerateConfigReport() { + // Construct request + const request = { + newConfig, + }; + + // Run request + const response = await servicemanagementClient.generateConfigReport( + request + ); + console.log(response); + } + + callGenerateConfigReport(); + // [END servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js new file mode 100644 index 00000000000..d27f3b33ea9 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName) { + // [START servicemanagement_v1_generated_ServiceManager_GetService_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the service. See the `ServiceManager` overview for naming + * requirements. For example: `example.googleapis.com`. + */ + // const serviceName = 'abc123' + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callGetService() { + // Construct request + const request = { + serviceName, + }; + + // Run request + const response = await servicemanagementClient.getService(request); + console.log(response); + } + + callGetService(); + // [END servicemanagement_v1_generated_ServiceManager_GetService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js new file mode 100644 index 00000000000..c81fcf3392a --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName, configId) { + // [START servicemanagement_v1_generated_ServiceManager_GetServiceConfig_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + */ + // const serviceName = 'abc123' + /** + * Required. The id of the service configuration resource. + * This field must be specified for the server to return all fields, including + * `SourceInfo`. + */ + // const configId = 'abc123' + /** + * Specifies which parts of the Service Config should be returned in the + * response. + */ + // const view = {} + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callGetServiceConfig() { + // Construct request + const request = { + serviceName, + configId, + }; + + // Run request + const response = await servicemanagementClient.getServiceConfig(request); + console.log(response); + } + + callGetServiceConfig(); + // [END servicemanagement_v1_generated_ServiceManager_GetServiceConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js new file mode 100644 index 00000000000..368704d34bd --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName, rolloutId) { + // [START servicemanagement_v1_generated_ServiceManager_GetServiceRollout_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + */ + // const serviceName = 'abc123' + /** + * Required. The id of the rollout resource. + */ + // const rolloutId = 'abc123' + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callGetServiceRollout() { + // Construct request + const request = { + serviceName, + rolloutId, + }; + + // Run request + const response = await servicemanagementClient.getServiceRollout(request); + console.log(response); + } + + callGetServiceRollout(); + // [END servicemanagement_v1_generated_ServiceManager_GetServiceRollout_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js new file mode 100644 index 00000000000..51cfa2a7c00 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js @@ -0,0 +1,66 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName) { + // [START servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + */ + // const serviceName = 'abc123' + /** + * The token of the page to retrieve. + */ + // const pageToken = 'abc123' + /** + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + */ + // const pageSize = 1234 + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callListServiceConfigs() { + // Construct request + const request = { + serviceName, + }; + + // Run request + const iterable = await servicemanagementClient.listServiceConfigsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + callListServiceConfigs(); + // [END servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js new file mode 100644 index 00000000000..a721153f523 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js @@ -0,0 +1,78 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName, filter) { + // [START servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + */ + // const serviceName = 'abc123' + /** + * The token of the page to retrieve. + */ + // const pageToken = 'abc123' + /** + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + */ + // const pageSize = 1234 + /** + * Required. Use `filter` to return subset of rollouts. + * The following filters are supported: + * -- To limit the results to only those in + * status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * use filter='status=SUCCESS' + * -- To limit the results to those in + * status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' + */ + // const filter = 'abc123' + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callListServiceRollouts() { + // Construct request + const request = { + serviceName, + filter, + }; + + // Run request + const iterable = await servicemanagementClient.listServiceRolloutsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + callListServiceRollouts(); + // [END servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js new file mode 100644 index 00000000000..1c1257af881 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START servicemanagement_v1_generated_ServiceManager_ListServices_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Include services produced by the specified project. + */ + // const producerProjectId = 'abc123' + /** + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + */ + // const pageSize = 1234 + /** + * Token identifying which result to start with; returned by a previous list + * call. + */ + // const pageToken = 'abc123' + /** + * Include services consumed by the specified consumer. + * The Google Service Management implementation accepts the following + * forms: + * - project: + */ + // const consumerId = 'abc123' + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callListServices() { + // Construct request + const request = {}; + + // Run request + const iterable = await servicemanagementClient.listServicesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListServices(); + // [END servicemanagement_v1_generated_ServiceManager_ListServices_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js new file mode 100644 index 00000000000..f43d86d8d14 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js @@ -0,0 +1,67 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName, configSource) { + // [START servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + */ + // const serviceName = 'abc123' + /** + * Required. The source configuration for the service. + */ + // const configSource = {} + /** + * Optional. If set, this will result in the generation of a + * `google.api.Service` configuration based on the `ConfigSource` provided, + * but the generated config and the sources will NOT be persisted. + */ + // const validateOnly = true + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callSubmitConfigSource() { + // Construct request + const request = { + serviceName, + configSource, + }; + + // Run request + const [operation] = await servicemanagementClient.submitConfigSource( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + callSubmitConfigSource(); + // [END servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js new file mode 100644 index 00000000000..4e2ec50a874 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(serviceName) { + // [START servicemanagement_v1_generated_ServiceManager_UndeleteService_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + */ + // const serviceName = 'abc123' + + // Imports the Servicemanagement library + const {ServiceManagerClient} = require('@google-cloud/service-management').v1; + + // Instantiates a client + const servicemanagementClient = new ServiceManagerClient(); + + async function callUndeleteService() { + // Construct request + const request = { + serviceName, + }; + + // Run request + const [operation] = await servicemanagementClient.undeleteService(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUndeleteService(); + // [END servicemanagement_v1_generated_ServiceManager_UndeleteService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index 8827794a273..b2fadeae40c 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -430,6 +430,25 @@ export class ServiceManagerClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Gets a managed service. Authentication is required unless the service is + * public. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the `ServiceManager` overview for naming + * requirements. For example: `example.googleapis.com`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ManagedService]{@link google.api.servicemanagement.v1.ManagedService}. + * 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/service_manager.get_service.js + * region_tag:servicemanagement_v1_generated_ServiceManager_GetService_async + */ getService( request?: protos.google.api.servicemanagement.v1.IGetServiceRequest, options?: CallOptions @@ -461,25 +480,6 @@ export class ServiceManagerClient { {} | null | undefined > ): void; - /** - * Gets a managed service. Authentication is required unless the service is - * public. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.serviceName - * Required. The name of the service. See the `ServiceManager` overview for naming - * requirements. For example: `example.googleapis.com`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ManagedService]{@link google.api.servicemanagement.v1.ManagedService}. - * 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.getService(request); - */ getService( request?: protos.google.api.servicemanagement.v1.IGetServiceRequest, optionsOrCallback?: @@ -523,6 +523,32 @@ export class ServiceManagerClient { this.initialize(); return this.innerApiCalls.getService(request, options, callback); } + /** + * Gets a service configuration (version) for a managed service. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {string} request.configId + * Required. The id of the service configuration resource. + * + * This field must be specified for the server to return all fields, including + * `SourceInfo`. + * @param {google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView} request.view + * Specifies which parts of the Service Config should be returned in the + * response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Service]{@link google.api.Service}. + * 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/service_manager.get_service_config.js + * region_tag:servicemanagement_v1_generated_ServiceManager_GetServiceConfig_async + */ getServiceConfig( request?: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, options?: CallOptions @@ -557,32 +583,6 @@ export class ServiceManagerClient { {} | null | undefined > ): void; - /** - * Gets a service configuration (version) for a managed service. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. - * @param {string} request.configId - * Required. The id of the service configuration resource. - * - * This field must be specified for the server to return all fields, including - * `SourceInfo`. - * @param {google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView} request.view - * Specifies which parts of the Service Config should be returned in the - * response. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Service]{@link google.api.Service}. - * 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.getServiceConfig(request); - */ getServiceConfig( request?: protos.google.api.servicemanagement.v1.IGetServiceConfigRequest, optionsOrCallback?: @@ -629,6 +629,33 @@ export class ServiceManagerClient { this.initialize(); return this.innerApiCalls.getServiceConfig(request, options, callback); } + /** + * Creates a new service configuration (version) for a managed service. + * This method only stores the service configuration. To roll out the service + * configuration to backend systems please call + * {@link google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout|CreateServiceRollout}. + * + * Only the 100 most recent service configurations and ones referenced by + * existing rollouts are kept for each service. The rest will be deleted + * eventually. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {google.api.Service} request.serviceConfig + * Required. The service configuration resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Service]{@link google.api.Service}. + * 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/service_manager.create_service_config.js + * region_tag:servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_async + */ createServiceConfig( request?: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, options?: CallOptions @@ -663,33 +690,6 @@ export class ServiceManagerClient { {} | null | undefined > ): void; - /** - * Creates a new service configuration (version) for a managed service. - * This method only stores the service configuration. To roll out the service - * configuration to backend systems please call - * {@link google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout|CreateServiceRollout}. - * - * Only the 100 most recent service configurations and ones referenced by - * existing rollouts are kept for each service. The rest will be deleted - * eventually. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. - * @param {google.api.Service} request.serviceConfig - * Required. The service configuration resource. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Service]{@link google.api.Service}. - * 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.createServiceConfig(request); - */ createServiceConfig( request?: protos.google.api.servicemanagement.v1.ICreateServiceConfigRequest, optionsOrCallback?: @@ -736,6 +736,26 @@ export class ServiceManagerClient { this.initialize(); return this.innerApiCalls.createServiceConfig(request, options, callback); } + /** + * Gets a service configuration {@link google.api.servicemanagement.v1.Rollout|rollout}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {string} request.rolloutId + * Required. The id of the rollout resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Rollout]{@link google.api.servicemanagement.v1.Rollout}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/service_manager.get_service_rollout.js + * region_tag:servicemanagement_v1_generated_ServiceManager_GetServiceRollout_async + */ getServiceRollout( request?: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, options?: CallOptions @@ -770,26 +790,6 @@ export class ServiceManagerClient { {} | null | undefined > ): void; - /** - * Gets a service configuration {@link google.api.servicemanagement.v1.Rollout|rollout}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. - * @param {string} request.rolloutId - * Required. The id of the rollout resource. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Rollout]{@link google.api.servicemanagement.v1.Rollout}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getServiceRollout(request); - */ getServiceRollout( request?: protos.google.api.servicemanagement.v1.IGetServiceRolloutRequest, optionsOrCallback?: @@ -836,40 +836,6 @@ export class ServiceManagerClient { this.initialize(); return this.innerApiCalls.getServiceRollout(request, options, callback); } - generateConfigReport( - request?: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, - options?: CallOptions - ): Promise< - [ - protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, - ( - | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest - | undefined - ), - {} | undefined - ] - >; - generateConfigReport( - request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, - options: CallOptions, - callback: Callback< - protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, - | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest - | null - | undefined, - {} | null | undefined - > - ): void; - generateConfigReport( - request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, - callback: Callback< - protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, - | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest - | null - | undefined, - {} | null | undefined - > - ): void; /** * Generates and returns a report (errors, warnings and changes from * existing configurations) associated with @@ -904,9 +870,43 @@ export class ServiceManagerClient { * 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.generateConfigReport(request); + * @example include:samples/generated/v1/service_manager.generate_config_report.js + * region_tag:servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_async */ + generateConfigReport( + request?: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, + ( + | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest + | undefined + ), + {} | undefined + ] + >; + generateConfigReport( + request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, + options: CallOptions, + callback: Callback< + protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, + | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateConfigReport( + request: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, + callback: Callback< + protos.google.api.servicemanagement.v1.IGenerateConfigReportResponse, + | protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; generateConfigReport( request?: protos.google.api.servicemanagement.v1.IGenerateConfigReportRequest, optionsOrCallback?: @@ -944,10 +944,34 @@ export class ServiceManagerClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.generateConfigReport(request, options, callback); } + /** + * Creates a new managed service. + * Please note one producer project can own no more than 20 services. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {google.api.servicemanagement.v1.ManagedService} request.service + * Required. Initial values for the service resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * 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/service_manager.create_service.js + * region_tag:servicemanagement_v1_generated_ServiceManager_CreateService_async + */ createService( request?: protos.google.api.servicemanagement.v1.ICreateServiceRequest, options?: CallOptions @@ -984,29 +1008,6 @@ export class ServiceManagerClient { {} | null | undefined > ): void; - /** - * Creates a new managed service. - * Please note one producer project can own no more than 20 services. - * - * Operation - * - * @param {Object} request - * The request object that will be sent. - * @param {google.api.servicemanagement.v1.ManagedService} request.service - * Required. Initial values for the service resource. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.createService(request); - * const [response] = await operation.promise(); - */ createService( request?: protos.google.api.servicemanagement.v1.ICreateServiceRequest, optionsOrCallback?: @@ -1046,6 +1047,8 @@ export class ServiceManagerClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.createService(request, options, callback); } @@ -1058,11 +1061,8 @@ export class ServiceManagerClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateServiceProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/service_manager.create_service.js + * region_tag:servicemanagement_v1_generated_ServiceManager_CreateService_async */ async checkCreateServiceProgress( name: string @@ -1086,6 +1086,31 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.v1.OperationMetadata >; } + /** + * Deletes a managed service. This method will change the service to the + * `Soft-Delete` state for 30 days. Within this period, service producers may + * call {@link google.api.servicemanagement.v1.ServiceManager.UndeleteService|UndeleteService} to restore the service. + * After 30 days, the service will be permanently deleted. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/service_manager.delete_service.js + * region_tag:servicemanagement_v1_generated_ServiceManager_DeleteService_async + */ deleteService( request?: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, options?: CallOptions @@ -1119,35 +1144,9 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - /** - * Deletes a managed service. This method will change the service to the - * `Soft-Delete` state for 30 days. Within this period, service producers may - * call {@link google.api.servicemanagement.v1.ServiceManager.UndeleteService|UndeleteService} to restore the service. - * After 30 days, the service will be permanently deleted. - * - * Operation - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteService(request); - * const [response] = await operation.promise(); - */ + {} | null | undefined + > + ): void; deleteService( request?: protos.google.api.servicemanagement.v1.IDeleteServiceRequest, optionsOrCallback?: @@ -1205,11 +1204,8 @@ export class ServiceManagerClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteServiceProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/service_manager.delete_service.js + * region_tag:servicemanagement_v1_generated_ServiceManager_DeleteService_async */ async checkDeleteServiceProgress( name: string @@ -1233,6 +1229,31 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.v1.OperationMetadata >; } + /** + * Revives a previously deleted managed service. The method restores the + * service using the configuration at the time the service was deleted. + * The target service must exist and must have been deleted within the + * last 30 days. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/service_manager.undelete_service.js + * region_tag:servicemanagement_v1_generated_ServiceManager_UndeleteService_async + */ undeleteService( request?: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, options?: CallOptions @@ -1269,32 +1290,6 @@ export class ServiceManagerClient { {} | null | undefined > ): void; - /** - * Revives a previously deleted managed service. The method restores the - * service using the configuration at the time the service was deleted. - * The target service must exist and must have been deleted within the - * last 30 days. - * - * Operation - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.undeleteService(request); - * const [response] = await operation.promise(); - */ undeleteService( request?: protos.google.api.servicemanagement.v1.IUndeleteServiceRequest, optionsOrCallback?: @@ -1352,11 +1347,8 @@ export class ServiceManagerClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUndeleteServiceProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/service_manager.undelete_service.js + * region_tag:servicemanagement_v1_generated_ServiceManager_UndeleteService_async */ async checkUndeleteServiceProgress( name: string @@ -1380,42 +1372,6 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.v1.OperationMetadata >; } - submitConfigSource( - request?: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - submitConfigSource( - request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - submitConfigSource( - request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, - callback: Callback< - LROperation< - protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Creates a new service configuration (version) for a managed service based * on @@ -1451,10 +1407,45 @@ export class ServiceManagerClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.submitConfigSource(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/service_manager.submit_config_source.js + * region_tag:servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_async */ + submitConfigSource( + request?: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + submitConfigSource( + request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + submitConfigSource( + request: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.ISubmitConfigSourceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; submitConfigSource( request?: protos.google.api.servicemanagement.v1.ISubmitConfigSourceRequest, optionsOrCallback?: @@ -1512,11 +1503,8 @@ export class ServiceManagerClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkSubmitConfigSourceProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/service_manager.submit_config_source.js + * region_tag:servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_async */ async checkSubmitConfigSourceProgress( name: string @@ -1540,6 +1528,41 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.v1.OperationMetadata >; } + /** + * Creates a new service configuration rollout. Based on rollout, the + * Google Service Management will roll out the service configurations to + * different backend services. For example, the logging configuration will be + * pushed to Google Cloud Logging. + * + * Please note that any previous pending and running Rollouts and associated + * Operations will be automatically cancelled so that the latest Rollout will + * not be blocked by previous Rollouts. + * + * Only the 100 most recent (in any state) and the last 10 successful (if not + * already part of the set of 100 most recent) rollouts are kept for each + * service. The rest will be deleted eventually. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {google.api.servicemanagement.v1.Rollout} request.rollout + * Required. The rollout resource. The `service_name` field is output only. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/service_manager.create_service_rollout.js + * region_tag:servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_async + */ createServiceRollout( request?: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, options?: CallOptions @@ -1576,42 +1599,6 @@ export class ServiceManagerClient { {} | null | undefined > ): void; - /** - * Creates a new service configuration rollout. Based on rollout, the - * Google Service Management will roll out the service configurations to - * different backend services. For example, the logging configuration will be - * pushed to Google Cloud Logging. - * - * Please note that any previous pending and running Rollouts and associated - * Operations will be automatically cancelled so that the latest Rollout will - * not be blocked by previous Rollouts. - * - * Only the 100 most recent (in any state) and the last 10 successful (if not - * already part of the set of 100 most recent) rollouts are kept for each - * service. The rest will be deleted eventually. - * - * Operation - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. - * @param {google.api.servicemanagement.v1.Rollout} request.rollout - * Required. The rollout resource. The `service_name` field is output only. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.createServiceRollout(request); - * const [response] = await operation.promise(); - */ createServiceRollout( request?: protos.google.api.servicemanagement.v1.ICreateServiceRolloutRequest, optionsOrCallback?: @@ -1669,11 +1656,8 @@ export class ServiceManagerClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateServiceRolloutProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/service_manager.create_service_rollout.js + * region_tag:servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_async */ async checkCreateServiceRolloutProgress( name: string @@ -1697,42 +1681,6 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.v1.OperationMetadata >; } - enableService( - request?: protos.google.api.servicemanagement.v1.IEnableServiceRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.api.servicemanagement.v1.IEnableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - enableService( - request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.api.servicemanagement.v1.IEnableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - enableService( - request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, - callback: Callback< - LROperation< - protos.google.api.servicemanagement.v1.IEnableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Enables a {@link google.api.servicemanagement.v1.ManagedService|service} for a project, so it can be used * for the project. See @@ -1765,11 +1713,46 @@ export class ServiceManagerClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.enableService(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/service_manager.enable_service.js + * region_tag:servicemanagement_v1_generated_ServiceManager_EnableService_async * @deprecated EnableService is deprecated and may be removed in a future version. */ + enableService( + request?: protos.google.api.servicemanagement.v1.IEnableServiceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.api.servicemanagement.v1.IEnableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + enableService( + request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IEnableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + enableService( + request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, + callback: Callback< + LROperation< + protos.google.api.servicemanagement.v1.IEnableServiceResponse, + protos.google.api.servicemanagement.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; enableService( request?: protos.google.api.servicemanagement.v1.IEnableServiceRequest, optionsOrCallback?: @@ -1832,11 +1815,8 @@ export class ServiceManagerClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkEnableServiceProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/service_manager.enable_service.js + * region_tag:servicemanagement_v1_generated_ServiceManager_EnableService_async * @deprecated EnableService is deprecated and may be removed in a future version. */ async checkEnableServiceProgress( @@ -1866,6 +1846,41 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.v1.OperationMetadata >; } + /** + * Disables a {@link google.api.servicemanagement.v1.ManagedService|service} for a project, so it can no longer be + * be used for the project. It prevents accidental usage that may cause + * unexpected billing charges or security leaks. + * + * Operation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. Name of the service to disable. Specifying an unknown service name + * will cause the request to fail. + * @param {string} request.consumerId + * Required. The identity of consumer resource which service disablement will be + * applied to. + * + * The Google Service Management implementation accepts the following + * forms: + * - "project:" + * + * Note: this is made compatible with + * google.api.servicecontrol.v1.Operation.consumer_id. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/service_manager.disable_service.js + * region_tag:servicemanagement_v1_generated_ServiceManager_DisableService_async + * @deprecated DisableService is deprecated and may be removed in a future version. + */ disableService( request?: protos.google.api.servicemanagement.v1.IDisableServiceRequest, options?: CallOptions @@ -1902,42 +1917,6 @@ export class ServiceManagerClient { {} | null | undefined > ): void; - /** - * Disables a {@link google.api.servicemanagement.v1.ManagedService|service} for a project, so it can no longer be - * be used for the project. It prevents accidental usage that may cause - * unexpected billing charges or security leaks. - * - * Operation - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.serviceName - * Required. Name of the service to disable. Specifying an unknown service name - * will cause the request to fail. - * @param {string} request.consumerId - * Required. The identity of consumer resource which service disablement will be - * applied to. - * - * The Google Service Management implementation accepts the following - * forms: - * - "project:" - * - * Note: this is made compatible with - * google.api.servicecontrol.v1.Operation.consumer_id. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.disableService(request); - * const [response] = await operation.promise(); - * @deprecated DisableService is deprecated and may be removed in a future version. - */ disableService( request?: protos.google.api.servicemanagement.v1.IDisableServiceRequest, optionsOrCallback?: @@ -2000,11 +1979,8 @@ export class ServiceManagerClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDisableServiceProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/service_manager.disable_service.js + * region_tag:servicemanagement_v1_generated_ServiceManager_DisableService_async * @deprecated DisableService is deprecated and may be removed in a future version. */ async checkDisableServiceProgress( @@ -2034,37 +2010,6 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.v1.OperationMetadata >; } - listServices( - request?: protos.google.api.servicemanagement.v1.IListServicesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.api.servicemanagement.v1.IManagedService[], - protos.google.api.servicemanagement.v1.IListServicesRequest | null, - protos.google.api.servicemanagement.v1.IListServicesResponse - ] - >; - listServices( - request: protos.google.api.servicemanagement.v1.IListServicesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.api.servicemanagement.v1.IListServicesRequest, - | protos.google.api.servicemanagement.v1.IListServicesResponse - | null - | undefined, - protos.google.api.servicemanagement.v1.IManagedService - > - ): void; - listServices( - request: protos.google.api.servicemanagement.v1.IListServicesRequest, - callback: PaginationCallback< - protos.google.api.servicemanagement.v1.IListServicesRequest, - | protos.google.api.servicemanagement.v1.IListServicesResponse - | null - | undefined, - protos.google.api.servicemanagement.v1.IManagedService - > - ): void; /** * Lists managed services. * @@ -2105,6 +2050,37 @@ export class ServiceManagerClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listServices( + request?: protos.google.api.servicemanagement.v1.IListServicesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.servicemanagement.v1.IManagedService[], + protos.google.api.servicemanagement.v1.IListServicesRequest | null, + protos.google.api.servicemanagement.v1.IListServicesResponse + ] + >; + listServices( + request: protos.google.api.servicemanagement.v1.IListServicesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServicesRequest, + | protos.google.api.servicemanagement.v1.IListServicesResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IManagedService + > + ): void; + listServices( + request: protos.google.api.servicemanagement.v1.IListServicesRequest, + callback: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServicesRequest, + | protos.google.api.servicemanagement.v1.IListServicesResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IManagedService + > + ): void; listServices( request?: protos.google.api.servicemanagement.v1.IListServicesRequest, optionsOrCallback?: @@ -2139,6 +2115,8 @@ export class ServiceManagerClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.listServices(request, options, callback); } @@ -2179,7 +2157,10 @@ export class ServiceManagerClient { ): Transform { request = request || {}; options = options || {}; - const callSettings = new gax.CallSettings(options); + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listServices']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as gax.GaxCall, @@ -2218,11 +2199,8 @@ export class ServiceManagerClient { * 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.listServicesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/service_manager.list_services.js + * region_tag:servicemanagement_v1_generated_ServiceManager_ListServices_async */ listServicesAsync( request?: protos.google.api.servicemanagement.v1.IListServicesRequest, @@ -2230,8 +2208,10 @@ export class ServiceManagerClient { ): AsyncIterable { request = request || {}; options = options || {}; - options = options || {}; - const callSettings = new gax.CallSettings(options); + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listServices']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, @@ -2239,6 +2219,33 @@ export class ServiceManagerClient { callSettings ) as AsyncIterable; } + /** + * Lists the history of the service configuration for a managed service, + * from the newest to the oldest. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.serviceName + * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * for naming requirements. For example: `example.googleapis.com`. + * @param {string} request.pageToken + * The token of the page to retrieve. + * @param {number} request.pageSize + * The max number of items to include in the response list. Page size is 50 + * if not specified. Maximum value is 100. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Service]{@link google.api.Service}. + * 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 `listServiceConfigsAsync()` + * 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. + */ listServiceConfigs( request?: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, options?: CallOptions @@ -2270,33 +2277,6 @@ export class ServiceManagerClient { protos.google.api.IService > ): void; - /** - * Lists the history of the service configuration for a managed service, - * from the newest to the oldest. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. - * @param {string} request.pageToken - * The token of the page to retrieve. - * @param {number} request.pageSize - * The max number of items to include in the response list. Page size is 50 - * if not specified. Maximum value is 100. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Service]{@link google.api.Service}. - * 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 `listServiceConfigsAsync()` - * 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. - */ listServiceConfigs( request?: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, optionsOrCallback?: @@ -2377,7 +2357,8 @@ export class ServiceManagerClient { gax.routingHeader.fromParams({ service_name: request.serviceName || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listServiceConfigs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listServiceConfigs.createStream( this.innerApiCalls.listServiceConfigs as gax.GaxCall, @@ -2410,11 +2391,8 @@ export class ServiceManagerClient { * 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.listServiceConfigsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/service_manager.list_service_configs.js + * region_tag:servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_async */ listServiceConfigsAsync( request?: protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, @@ -2428,8 +2406,8 @@ export class ServiceManagerClient { gax.routingHeader.fromParams({ service_name: request.serviceName || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listServiceConfigs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listServiceConfigs.asyncIterate( this.innerApiCalls['listServiceConfigs'] as GaxCall, @@ -2437,37 +2415,6 @@ export class ServiceManagerClient { callSettings ) as AsyncIterable; } - listServiceRollouts( - request?: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.api.servicemanagement.v1.IRollout[], - protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest | null, - protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse - ] - >; - listServiceRollouts( - request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, - | protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse - | null - | undefined, - protos.google.api.servicemanagement.v1.IRollout - > - ): void; - listServiceRollouts( - request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, - callback: PaginationCallback< - protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, - | protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse - | null - | undefined, - protos.google.api.servicemanagement.v1.IRollout - > - ): void; /** * Lists the history of the service configuration rollouts for a managed * service, from the newest to the oldest. @@ -2504,6 +2451,37 @@ export class ServiceManagerClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listServiceRollouts( + request?: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.api.servicemanagement.v1.IRollout[], + protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest | null, + protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse + ] + >; + listServiceRollouts( + request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + | protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IRollout + > + ): void; + listServiceRollouts( + request: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + callback: PaginationCallback< + protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, + | protos.google.api.servicemanagement.v1.IListServiceRolloutsResponse + | null + | undefined, + protos.google.api.servicemanagement.v1.IRollout + > + ): void; listServiceRollouts( request?: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, optionsOrCallback?: @@ -2593,7 +2571,8 @@ export class ServiceManagerClient { gax.routingHeader.fromParams({ service_name: request.serviceName || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listServiceRollouts']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listServiceRollouts.createStream( this.innerApiCalls.listServiceRollouts as gax.GaxCall, @@ -2635,11 +2614,8 @@ export class ServiceManagerClient { * 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.listServiceRolloutsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/service_manager.list_service_rollouts.js + * region_tag:servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_async */ listServiceRolloutsAsync( request?: protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, @@ -2653,8 +2629,8 @@ export class ServiceManagerClient { gax.routingHeader.fromParams({ service_name: request.serviceName || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listServiceRollouts']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listServiceRollouts.asyncIterate( this.innerApiCalls['listServiceRollouts'] as GaxCall, diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index b02094e8c78..dbe0d0bf5df 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -676,7 +676,7 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportResponse() ); @@ -700,7 +700,7 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportResponse() ); @@ -739,7 +739,7 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.generateConfigReport = stubSimpleCall( undefined, @@ -764,7 +764,7 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -789,7 +789,7 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -835,7 +835,7 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.createService = stubLongRunningCall( undefined, @@ -858,7 +858,7 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.createService = stubLongRunningCall( undefined, @@ -2114,7 +2114,7 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage( new protos.google.api.servicemanagement.v1.ManagedService() @@ -2145,7 +2145,7 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage( new protos.google.api.servicemanagement.v1.ManagedService() @@ -2194,7 +2194,7 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.listServices = stubSimpleCall( undefined, From 2484204b7e01b9c878d1bb8db68a2bd09e4e209e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 Dec 2021 21:18:17 +0000 Subject: [PATCH 44/85] build: add generated samples to .eslintignore (#100) --- packages/google-api-servicemanagement/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-api-servicemanagement/.eslintignore b/packages/google-api-servicemanagement/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-api-servicemanagement/.eslintignore +++ b/packages/google-api-servicemanagement/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From a9452ef70ff54b79a3c7462543110408b99996bd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 21:38:18 +0000 Subject: [PATCH 45/85] docs(node): support "stable"/"preview" release level (#1312) (#103) --- packages/google-api-servicemanagement/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index 695924d2d5d..af8c1ce75d4 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -123,6 +123,8 @@ This library follows [Semantic Versioning](http://semver.org/). + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 9ca1c8b83621e5be3a74771ff09b4570705f28e3 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 11:45:03 -0500 Subject: [PATCH 46/85] chore: add api_shortname and library_type to repo metadata (#102) --- packages/google-api-servicemanagement/.repo-metadata.json | 6 ++++-- packages/google-api-servicemanagement/README.md | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/google-api-servicemanagement/.repo-metadata.json b/packages/google-api-servicemanagement/.repo-metadata.json index a639f9dbb01..697842fd409 100644 --- a/packages/google-api-servicemanagement/.repo-metadata.json +++ b/packages/google-api-servicemanagement/.repo-metadata.json @@ -4,11 +4,13 @@ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/service-management/latest", "product_documentation": "https://cloud.google.com/service-infrastructure/docs/overview/", "name_pretty": "Service Management API", - "release_level": "GA", + "release_level": "preview", "default_version": "v1", "name": "service-management", "api_id": "servicemanagement.googleapis.com", "requires_billing": true, "language": "nodejs", - "repo": "googleapis/nodejs-service-management" + "repo": "googleapis/nodejs-service-management", + "api_shortname": "service-management", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index af8c1ce75d4..ab6d3161787 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -4,7 +4,7 @@ # [Service Management API: Node.js Client](https://github.com/googleapis/nodejs-service-management) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) + [![npm version](https://img.shields.io/npm/v/@google-cloud/service-management.svg)](https://www.npmjs.org/package/@google-cloud/service-management) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-service-management/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-service-management) @@ -124,6 +124,10 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + More Information: [Google Cloud Platform Launch Stages][launch_stages] From 6829debe23a1f9aca16ba98ff4aa66eb9f39b030 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 23:08:17 +0000 Subject: [PATCH 47/85] docs(badges): tweak badge to use new preview/stable language (#1314) (#105) --- packages/google-api-servicemanagement/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index ab6d3161787..af1e8522dcd 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -4,9 +4,8 @@ # [Service Management API: Node.js Client](https://github.com/googleapis/nodejs-service-management) - +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/service-management.svg)](https://www.npmjs.org/package/@google-cloud/service-management) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-service-management/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-service-management) From 7de37be0096471ecc7441fa145ccdecec9600689 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:02:13 +0000 Subject: [PATCH 48/85] test(nodejs): remove 15 add 16 (#1322) (#107) --- packages/google-api-servicemanagement/protos/protos.d.ts | 2 +- packages/google-api-servicemanagement/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/protos/protos.d.ts b/packages/google-api-servicemanagement/protos/protos.d.ts index e6fdee86ab1..7ef5b5c5516 100644 --- a/packages/google-api-servicemanagement/protos/protos.d.ts +++ b/packages/google-api-servicemanagement/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-api-servicemanagement/protos/protos.js b/packages/google-api-servicemanagement/protos/protos.js index 3c989aa454e..ccc72be6c0f 100644 --- a/packages/google-api-servicemanagement/protos/protos.js +++ b/packages/google-api-servicemanagement/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From ed70542809aeca8f755c9a96abfa37b02dcb525a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 20 Jan 2022 00:36:09 -0800 Subject: [PATCH 49/85] build: update copyright year to 2022 (#110) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): upgrade gapic-generator-java to 2.4.1 PiperOrigin-RevId: 422607515 Source-Link: https://github.com/googleapis/googleapis/commit/ba2ffd6fe6642e28b4fed2ffae217b4c5f084034 Source-Link: https://github.com/googleapis/googleapis-gen/commit/73ba4add239a619da567ffbd4e5730fdd6de04d3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzNiYTRhZGQyMzlhNjE5ZGE1NjdmZmJkNGU1NzMwZmRkNmRlMDRkMyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-api-servicemanagement/.jsdoc.js | 4 ++-- .../generated/v1/service_manager.create_service.js | 1 + .../v1/service_manager.create_service_config.js | 1 + .../v1/service_manager.create_service_rollout.js | 5 ++--- .../generated/v1/service_manager.delete_service.js | 1 + .../generated/v1/service_manager.disable_service.js | 1 + .../generated/v1/service_manager.enable_service.js | 1 + .../v1/service_manager.generate_config_report.js | 9 ++++----- .../samples/generated/v1/service_manager.get_service.js | 1 + .../generated/v1/service_manager.get_service_config.js | 1 + .../generated/v1/service_manager.get_service_rollout.js | 1 + .../generated/v1/service_manager.list_service_configs.js | 7 +++---- .../v1/service_manager.list_service_rollouts.js | 7 +++---- .../generated/v1/service_manager.list_services.js | 6 ++++-- .../generated/v1/service_manager.submit_config_source.js | 5 ++--- .../generated/v1/service_manager.undelete_service.js | 1 + packages/google-api-servicemanagement/src/v1/index.ts | 2 +- .../src/v1/service_manager_client.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../google-api-servicemanagement/system-test/install.ts | 2 +- .../test/gapic_service_manager_v1.ts | 2 +- 22 files changed, 35 insertions(+), 29 deletions(-) diff --git a/packages/google-api-servicemanagement/.jsdoc.js b/packages/google-api-servicemanagement/.jsdoc.js index 6c7d9676b9c..888e97fc97b 100644 --- a/packages/google-api-servicemanagement/.jsdoc.js +++ b/packages/google-api-servicemanagement/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/service-management', diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js index 55bf7963f3b..35c94909c6f 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(service) { diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js index edafb7a9e6e..b4ab38b3202 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName, serviceConfig) { diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js index c1288506952..1798bff131d 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName, rollout) { @@ -43,9 +44,7 @@ function main(serviceName, rollout) { }; // Run request - const [operation] = await servicemanagementClient.createServiceRollout( - request - ); + const [operation] = await servicemanagementClient.createServiceRollout(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js index ccaf69b7711..598dc32e667 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName) { diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.js index 693c8ecd5b1..35db40174fb 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName, consumerId) { diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.js index 86e2e65e823..12e1c92651f 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName, consumerId) { diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js index cbd977f44a9..fbeeb9643ca 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(newConfig) { @@ -24,7 +25,7 @@ function main(newConfig) { * For this version of API, the supported types are * google.api.servicemanagement.v1.ConfigRef google.api.servicemanagement.v1.ConfigRef, * google.api.servicemanagement.v1.ConfigSource google.api.servicemanagement.v1.ConfigSource, - * and google.api.Service google.api.Service + * and google.api.Service google.api.Service */ // const newConfig = {} /** @@ -32,7 +33,7 @@ function main(newConfig) { * For this version of API, the supported types are * google.api.servicemanagement.v1.ConfigRef google.api.servicemanagement.v1.ConfigRef, * google.api.servicemanagement.v1.ConfigSource google.api.servicemanagement.v1.ConfigSource, - * and google.api.Service google.api.Service + * and google.api.Service google.api.Service */ // const oldConfig = {} @@ -49,9 +50,7 @@ function main(newConfig) { }; // Run request - const response = await servicemanagementClient.generateConfigReport( - request - ); + const response = await servicemanagementClient.generateConfigReport(request); console.log(response); } diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js index d27f3b33ea9..af79dbac99a 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName) { diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js index c81fcf3392a..525bfe5e0f8 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName, configId) { diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js index 368704d34bd..301fa4b2f37 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName, rolloutId) { diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js index 51cfa2a7c00..e846f9c5fe8 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName) { @@ -47,11 +48,9 @@ function main(serviceName) { }; // Run request - const iterable = await servicemanagementClient.listServiceConfigsAsync( - request - ); + const iterable = await servicemanagementClient.listServiceConfigsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js index a721153f523..febf2047b51 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName, filter) { @@ -59,11 +60,9 @@ function main(serviceName, filter) { }; // Run request - const iterable = await servicemanagementClient.listServiceRolloutsAsync( - request - ); + const iterable = await servicemanagementClient.listServiceRolloutsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js index 1c1257af881..9f65fae4ce1 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -49,12 +50,13 @@ function main() { async function callListServices() { // Construct request - const request = {}; + const request = { + }; // Run request const iterable = await servicemanagementClient.listServicesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js index f43d86d8d14..52c07413957 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName, configSource) { @@ -49,9 +50,7 @@ function main(serviceName, configSource) { }; // Run request - const [operation] = await servicemanagementClient.submitConfigSource( - request - ); + const [operation] = await servicemanagementClient.submitConfigSource(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js index 4e2ec50a874..3b0d8333b89 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(serviceName) { diff --git a/packages/google-api-servicemanagement/src/v1/index.ts b/packages/google-api-servicemanagement/src/v1/index.ts index b4eab76ce72..fa343c94e89 100644 --- a/packages/google-api-servicemanagement/src/v1/index.ts +++ b/packages/google-api-servicemanagement/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index b2fadeae40c..99388f14cc4 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.js b/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.js index eba23b1d518..f8ba014bf8f 100644 --- a/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.js +++ b/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts b/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts index e09ceaa8399..4ede399e2ae 100644 --- a/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts +++ b/packages/google-api-servicemanagement/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-api-servicemanagement/system-test/install.ts b/packages/google-api-servicemanagement/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-api-servicemanagement/system-test/install.ts +++ b/packages/google-api-servicemanagement/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index dbe0d0bf5df..7dea0ccda28 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 6c73da4627699a59be0fda26a73ee0cae6633a10 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 26 Jan 2022 19:56:27 +0000 Subject: [PATCH 50/85] chore: update v2.12.0 gapic-generator-typescript (#112) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 424244721 Source-Link: https://github.com/googleapis/googleapis/commit/4b6b01f507ebc3df95fdf8e1d76b0ae0ae33e52c Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ac83fba606d008c7e8a42e7d55b6596ec4be35f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9 --- .../linkinator.config.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/linkinator.config.json b/packages/google-api-servicemanagement/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-api-servicemanagement/linkinator.config.json +++ b/packages/google-api-servicemanagement/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } From 7e20e401e66ccfa00d0fee972f79ed438bdb5507 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 16:08:53 +0000 Subject: [PATCH 51/85] docs(nodejs): version support policy edits (#1346) (#114) --- .../google-api-servicemanagement/README.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index af1e8522dcd..55c8fefe2c9 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -97,21 +97,21 @@ also contains samples. Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/service-management@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From 9ac20c294ec1e240dfcb15200e56bed1e19d4dca Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 10:15:14 -0800 Subject: [PATCH 52/85] chore: cleanup unused imports in google/api/servicemanagement/v1 (#115) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: cleanup unused imports in google/api/servicemanagement/v1 PiperOrigin-RevId: 428077790 Source-Link: https://github.com/googleapis/googleapis/commit/4807247cecbe811c89f829910873b2ad22b2f79f Source-Link: https://github.com/googleapis/googleapis-gen/commit/3b0415f46dd190e3524d80bc8e66e8a161cec955 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2IwNDE1ZjQ2ZGQxOTBlMzUyNGQ4MGJjOGU2NmU4YTE2MWNlYzk1NSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../api/servicemanagement/v1/resources.proto | 8 - .../protos/protos.d.ts | 3784 ++--- .../protos/protos.js | 14056 ++++++++-------- .../protos/protos.json | 584 +- 4 files changed, 9212 insertions(+), 9220 deletions(-) diff --git a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto index 0d9ed6b5430..26fc67564b9 100644 --- a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto +++ b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto @@ -17,17 +17,9 @@ syntax = "proto3"; package google.api.servicemanagement.v1; -import "google/api/annotations.proto"; import "google/api/config_change.proto"; import "google/api/field_behavior.proto"; -import "google/api/metric.proto"; -import "google/api/quota.proto"; -import "google/api/service.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.ServiceManagement.V1"; option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement"; diff --git a/packages/google-api-servicemanagement/protos/protos.d.ts b/packages/google-api-servicemanagement/protos/protos.d.ts index 7ef5b5c5516..33f1fabb52a 100644 --- a/packages/google-api-servicemanagement/protos/protos.d.ts +++ b/packages/google-api-servicemanagement/protos/protos.d.ts @@ -3710,6 +3710,230 @@ export namespace google { } } + /** Properties of a ConfigChange. */ + interface IConfigChange { + + /** ConfigChange element */ + element?: (string|null); + + /** ConfigChange oldValue */ + oldValue?: (string|null); + + /** ConfigChange newValue */ + newValue?: (string|null); + + /** ConfigChange changeType */ + changeType?: (google.api.ChangeType|keyof typeof google.api.ChangeType|null); + + /** ConfigChange advices */ + advices?: (google.api.IAdvice[]|null); + } + + /** Represents a ConfigChange. */ + class ConfigChange implements IConfigChange { + + /** + * Constructs a new ConfigChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IConfigChange); + + /** ConfigChange element. */ + public element: string; + + /** ConfigChange oldValue. */ + public oldValue: string; + + /** ConfigChange newValue. */ + public newValue: string; + + /** ConfigChange changeType. */ + public changeType: (google.api.ChangeType|keyof typeof google.api.ChangeType); + + /** ConfigChange advices. */ + public advices: google.api.IAdvice[]; + + /** + * Creates a new ConfigChange instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigChange instance + */ + public static create(properties?: google.api.IConfigChange): google.api.ConfigChange; + + /** + * Encodes the specified ConfigChange message. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. + * @param message ConfigChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IConfigChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfigChange message, length delimited. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. + * @param message ConfigChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IConfigChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfigChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigChange + * @throws {Error} If the payload is not 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.ConfigChange; + + /** + * Decodes a ConfigChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigChange + * @throws {Error} If the payload 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.ConfigChange; + + /** + * Verifies a ConfigChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfigChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigChange + */ + public static fromObject(object: { [k: string]: any }): google.api.ConfigChange; + + /** + * Creates a plain object from a ConfigChange message. Also converts values to other types if specified. + * @param message ConfigChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ConfigChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Advice. */ + interface IAdvice { + + /** Advice description */ + description?: (string|null); + } + + /** Represents an Advice. */ + class Advice implements IAdvice { + + /** + * Constructs a new Advice. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IAdvice); + + /** Advice description. */ + public description: string; + + /** + * Creates a new Advice instance using the specified properties. + * @param [properties] Properties to set + * @returns Advice instance + */ + public static create(properties?: google.api.IAdvice): google.api.Advice; + + /** + * Encodes the specified Advice message. Does not implicitly {@link google.api.Advice.verify|verify} messages. + * @param message Advice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IAdvice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Advice message, length delimited. Does not implicitly {@link google.api.Advice.verify|verify} messages. + * @param message Advice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IAdvice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Advice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Advice + * @throws {Error} If the payload is not 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.Advice; + + /** + * Decodes an Advice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Advice + * @throws {Error} If the payload 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.Advice; + + /** + * Verifies an Advice message. + * @param message Plain 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 Advice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Advice + */ + public static fromObject(object: { [k: string]: any }): google.api.Advice; + + /** + * Creates a plain object from an Advice message. Also converts values to other types if specified. + * @param message Advice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Advice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Advice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** ChangeType enum. */ + enum ChangeType { + CHANGE_TYPE_UNSPECIFIED = 0, + ADDED = 1, + REMOVED = 2, + MODIFIED = 3 + } + + /** 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 Http. */ interface IHttp { @@ -4049,2339 +4273,1779 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of a ConfigChange. */ - interface IConfigChange { + /** Properties of a Service. */ + interface IService { - /** ConfigChange element */ - element?: (string|null); + /** Service name */ + name?: (string|null); - /** ConfigChange oldValue */ - oldValue?: (string|null); + /** Service title */ + title?: (string|null); - /** ConfigChange newValue */ - newValue?: (string|null); + /** Service producerProjectId */ + producerProjectId?: (string|null); - /** ConfigChange changeType */ - changeType?: (google.api.ChangeType|keyof typeof google.api.ChangeType|null); + /** Service id */ + id?: (string|null); - /** ConfigChange advices */ - advices?: (google.api.IAdvice[]|null); - } + /** Service apis */ + apis?: (google.protobuf.IApi[]|null); - /** Represents a ConfigChange. */ - class ConfigChange implements IConfigChange { + /** Service types */ + types?: (google.protobuf.IType[]|null); - /** - * Constructs a new ConfigChange. - * @param [properties] Properties to set + /** Service enums */ + enums?: (google.protobuf.IEnum[]|null); + + /** Service documentation */ + documentation?: (google.api.IDocumentation|null); + + /** Service backend */ + backend?: (google.api.IBackend|null); + + /** Service http */ + http?: (google.api.IHttp|null); + + /** Service quota */ + quota?: (google.api.IQuota|null); + + /** Service authentication */ + authentication?: (google.api.IAuthentication|null); + + /** Service context */ + context?: (google.api.IContext|null); + + /** Service usage */ + usage?: (google.api.IUsage|null); + + /** Service endpoints */ + endpoints?: (google.api.IEndpoint[]|null); + + /** Service control */ + control?: (google.api.IControl|null); + + /** Service logs */ + logs?: (google.api.ILogDescriptor[]|null); + + /** Service metrics */ + metrics?: (google.api.IMetricDescriptor[]|null); + + /** Service monitoredResources */ + monitoredResources?: (google.api.IMonitoredResourceDescriptor[]|null); + + /** Service billing */ + billing?: (google.api.IBilling|null); + + /** Service logging */ + logging?: (google.api.ILogging|null); + + /** Service monitoring */ + monitoring?: (google.api.IMonitoring|null); + + /** Service systemParameters */ + systemParameters?: (google.api.ISystemParameters|null); + + /** Service sourceInfo */ + sourceInfo?: (google.api.ISourceInfo|null); + + /** Service configVersion */ + configVersion?: (google.protobuf.IUInt32Value|null); + } + + /** Represents a Service. */ + class Service implements IService { + + /** + * Constructs a new Service. + * @param [properties] Properties to set */ - constructor(properties?: google.api.IConfigChange); + constructor(properties?: google.api.IService); - /** ConfigChange element. */ - public element: string; + /** Service name. */ + public name: string; - /** ConfigChange oldValue. */ - public oldValue: string; + /** Service title. */ + public title: string; - /** ConfigChange newValue. */ - public newValue: string; + /** Service producerProjectId. */ + public producerProjectId: string; - /** ConfigChange changeType. */ - public changeType: (google.api.ChangeType|keyof typeof google.api.ChangeType); + /** Service id. */ + public id: string; - /** ConfigChange advices. */ - public advices: google.api.IAdvice[]; + /** Service apis. */ + public apis: google.protobuf.IApi[]; + + /** Service types. */ + public types: google.protobuf.IType[]; + + /** Service enums. */ + public enums: google.protobuf.IEnum[]; + + /** Service documentation. */ + public documentation?: (google.api.IDocumentation|null); + + /** Service backend. */ + public backend?: (google.api.IBackend|null); + + /** Service http. */ + public http?: (google.api.IHttp|null); + + /** Service quota. */ + public quota?: (google.api.IQuota|null); + + /** Service authentication. */ + public authentication?: (google.api.IAuthentication|null); + + /** Service context. */ + public context?: (google.api.IContext|null); + + /** Service usage. */ + public usage?: (google.api.IUsage|null); + + /** Service endpoints. */ + public endpoints: google.api.IEndpoint[]; + + /** Service control. */ + public control?: (google.api.IControl|null); + + /** Service logs. */ + public logs: google.api.ILogDescriptor[]; + + /** Service metrics. */ + public metrics: google.api.IMetricDescriptor[]; + + /** Service monitoredResources. */ + public monitoredResources: google.api.IMonitoredResourceDescriptor[]; + + /** Service billing. */ + public billing?: (google.api.IBilling|null); + + /** Service logging. */ + public logging?: (google.api.ILogging|null); + + /** Service monitoring. */ + public monitoring?: (google.api.IMonitoring|null); + + /** Service systemParameters. */ + public systemParameters?: (google.api.ISystemParameters|null); + + /** Service sourceInfo. */ + public sourceInfo?: (google.api.ISourceInfo|null); + + /** Service configVersion. */ + public configVersion?: (google.protobuf.IUInt32Value|null); /** - * Creates a new ConfigChange instance using the specified properties. + * Creates a new Service instance using the specified properties. * @param [properties] Properties to set - * @returns ConfigChange instance + * @returns Service instance */ - public static create(properties?: google.api.IConfigChange): google.api.ConfigChange; + public static create(properties?: google.api.IService): google.api.Service; /** - * Encodes the specified ConfigChange message. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. - * @param message ConfigChange message or plain object to encode + * Encodes the specified Service message. Does not implicitly {@link google.api.Service.verify|verify} messages. + * @param message Service message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IConfigChange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IService, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConfigChange message, length delimited. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. - * @param message ConfigChange message or plain object to encode + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.api.Service.verify|verify} messages. + * @param message Service message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IConfigChange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IService, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConfigChange message from the specified reader or buffer. + * Decodes a Service message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConfigChange + * @returns Service * @throws {Error} If the payload is not 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.ConfigChange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Service; /** - * Decodes a ConfigChange message from the specified reader or buffer, length delimited. + * Decodes a Service message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConfigChange + * @returns Service * @throws {Error} If the payload 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.ConfigChange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Service; /** - * Verifies a ConfigChange message. + * Verifies a Service message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ConfigChange message from a plain object. Also converts values to their respective internal types. + * Creates a Service message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConfigChange + * @returns Service */ - public static fromObject(object: { [k: string]: any }): google.api.ConfigChange; + public static fromObject(object: { [k: string]: any }): google.api.Service; /** - * Creates a plain object from a ConfigChange message. Also converts values to other types if specified. - * @param message ConfigChange + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @param message Service * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ConfigChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConfigChange to JSON. + * Converts this Service to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Advice. */ - interface IAdvice { + /** Properties of an Authentication. */ + interface IAuthentication { - /** Advice description */ - description?: (string|null); + /** Authentication rules */ + rules?: (google.api.IAuthenticationRule[]|null); + + /** Authentication providers */ + providers?: (google.api.IAuthProvider[]|null); } - /** Represents an Advice. */ - class Advice implements IAdvice { + /** Represents an Authentication. */ + class Authentication implements IAuthentication { /** - * Constructs a new Advice. + * Constructs a new Authentication. * @param [properties] Properties to set */ - constructor(properties?: google.api.IAdvice); + constructor(properties?: google.api.IAuthentication); - /** Advice description. */ - public description: string; + /** Authentication rules. */ + public rules: google.api.IAuthenticationRule[]; + + /** Authentication providers. */ + public providers: google.api.IAuthProvider[]; /** - * Creates a new Advice instance using the specified properties. + * Creates a new Authentication instance using the specified properties. * @param [properties] Properties to set - * @returns Advice instance + * @returns Authentication instance */ - public static create(properties?: google.api.IAdvice): google.api.Advice; + public static create(properties?: google.api.IAuthentication): google.api.Authentication; /** - * Encodes the specified Advice message. Does not implicitly {@link google.api.Advice.verify|verify} messages. - * @param message Advice message or plain object to encode + * Encodes the specified Authentication message. Does not implicitly {@link google.api.Authentication.verify|verify} messages. + * @param message Authentication message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IAdvice, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Advice message, length delimited. Does not implicitly {@link google.api.Advice.verify|verify} messages. - * @param message Advice message or plain object to encode + * Encodes the specified Authentication message, length delimited. Does not implicitly {@link google.api.Authentication.verify|verify} messages. + * @param message Authentication message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IAdvice, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Advice message from the specified reader or buffer. + * Decodes an Authentication message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Advice + * @returns Authentication * @throws {Error} If the payload is not 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.Advice; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Authentication; /** - * Decodes an Advice message from the specified reader or buffer, length delimited. + * Decodes an Authentication message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Advice + * @returns Authentication * @throws {Error} If the payload 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.Advice; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Authentication; /** - * Verifies an Advice message. + * Verifies an Authentication message. * @param message Plain 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 Advice message from a plain object. Also converts values to their respective internal types. + * Creates an Authentication message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Advice + * @returns Authentication */ - public static fromObject(object: { [k: string]: any }): google.api.Advice; + public static fromObject(object: { [k: string]: any }): google.api.Authentication; /** - * Creates a plain object from an Advice message. Also converts values to other types if specified. - * @param message Advice + * Creates a plain object from an Authentication message. Also converts values to other types if specified. + * @param message Authentication * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Advice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Authentication, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Advice to JSON. + * Converts this Authentication to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** ChangeType enum. */ - enum ChangeType { - CHANGE_TYPE_UNSPECIFIED = 0, - ADDED = 1, - REMOVED = 2, - MODIFIED = 3 - } + /** Properties of an AuthenticationRule. */ + interface IAuthenticationRule { - /** 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 + /** AuthenticationRule selector */ + selector?: (string|null); + + /** AuthenticationRule oauth */ + oauth?: (google.api.IOAuthRequirements|null); + + /** AuthenticationRule allowWithoutCredential */ + allowWithoutCredential?: (boolean|null); + + /** AuthenticationRule requirements */ + requirements?: (google.api.IAuthRequirement[]|null); } - /** Properties of a MetricDescriptor. */ - interface IMetricDescriptor { + /** Represents an AuthenticationRule. */ + class AuthenticationRule implements IAuthenticationRule { - /** MetricDescriptor name */ - name?: (string|null); + /** + * Constructs a new AuthenticationRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IAuthenticationRule); - /** MetricDescriptor type */ - type?: (string|null); + /** AuthenticationRule selector. */ + public selector: string; - /** MetricDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); + /** AuthenticationRule oauth. */ + public oauth?: (google.api.IOAuthRequirements|null); - /** MetricDescriptor metricKind */ - metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + /** AuthenticationRule allowWithoutCredential. */ + public allowWithoutCredential: boolean; - /** MetricDescriptor valueType */ - valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + /** AuthenticationRule requirements. */ + public requirements: google.api.IAuthRequirement[]; - /** MetricDescriptor unit */ - unit?: (string|null); + /** + * Creates a new AuthenticationRule instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthenticationRule instance + */ + public static create(properties?: google.api.IAuthenticationRule): google.api.AuthenticationRule; - /** MetricDescriptor description */ - description?: (string|null); + /** + * Encodes the specified AuthenticationRule message. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. + * @param message AuthenticationRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IAuthenticationRule, writer?: $protobuf.Writer): $protobuf.Writer; - /** MetricDescriptor displayName */ - displayName?: (string|null); + /** + * Encodes the specified AuthenticationRule message, length delimited. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. + * @param message AuthenticationRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IAuthenticationRule, writer?: $protobuf.Writer): $protobuf.Writer; - /** MetricDescriptor metadata */ - metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + /** + * Decodes an AuthenticationRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthenticationRule + * @throws {Error} If the payload is not 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.AuthenticationRule; - /** MetricDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + /** + * Decodes an AuthenticationRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthenticationRule + * @throws {Error} If the payload 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.AuthenticationRule; - /** MetricDescriptor monitoredResourceTypes */ - monitoredResourceTypes?: (string[]|null); - } + /** + * Verifies an AuthenticationRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a MetricDescriptor. */ - class MetricDescriptor implements IMetricDescriptor { + /** + * Creates an AuthenticationRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthenticationRule + */ + public static fromObject(object: { [k: string]: any }): google.api.AuthenticationRule; /** - * Constructs a new MetricDescriptor. - * @param [properties] Properties to set + * Creates a plain object from an AuthenticationRule message. Also converts values to other types if specified. + * @param message AuthenticationRule + * @param [options] Conversion options + * @returns Plain object */ - constructor(properties?: google.api.IMetricDescriptor); + public static toObject(message: google.api.AuthenticationRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MetricDescriptor name. */ - public name: string; + /** + * Converts this AuthenticationRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** MetricDescriptor type. */ - public type: string; + /** Properties of a JwtLocation. */ + interface IJwtLocation { - /** MetricDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; + /** JwtLocation header */ + header?: (string|null); - /** MetricDescriptor metricKind. */ - public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + /** JwtLocation query */ + query?: (string|null); - /** MetricDescriptor valueType. */ - public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + /** JwtLocation valuePrefix */ + valuePrefix?: (string|null); + } - /** MetricDescriptor unit. */ - public unit: string; + /** Represents a JwtLocation. */ + class JwtLocation implements IJwtLocation { - /** MetricDescriptor description. */ - public description: string; + /** + * Constructs a new JwtLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJwtLocation); - /** MetricDescriptor displayName. */ - public displayName: string; + /** JwtLocation header. */ + public header?: (string|null); - /** MetricDescriptor metadata. */ - public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + /** JwtLocation query. */ + public query?: (string|null); - /** MetricDescriptor launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + /** JwtLocation valuePrefix. */ + public valuePrefix: string; - /** MetricDescriptor monitoredResourceTypes. */ - public monitoredResourceTypes: string[]; + /** JwtLocation in. */ + public in_?: ("header"|"query"); /** - * Creates a new MetricDescriptor instance using the specified properties. + * Creates a new JwtLocation instance using the specified properties. * @param [properties] Properties to set - * @returns MetricDescriptor instance + * @returns JwtLocation instance */ - public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; + public static create(properties?: google.api.IJwtLocation): google.api.JwtLocation; /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode + * Encodes the specified JwtLocation message. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. + * @param message JwtLocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IJwtLocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode + * Encodes the specified JwtLocation message, length delimited. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. + * @param message JwtLocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IJwtLocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetricDescriptor message from the specified reader or buffer. + * Decodes a JwtLocation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetricDescriptor + * @returns JwtLocation * @throws {Error} If the payload is not 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.MetricDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JwtLocation; /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * Decodes a JwtLocation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetricDescriptor + * @returns JwtLocation * @throws {Error} If the payload 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.MetricDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JwtLocation; /** - * Verifies a MetricDescriptor message. + * Verifies a JwtLocation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a JwtLocation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetricDescriptor + * @returns JwtLocation */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.JwtLocation; /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. - * @param message MetricDescriptor + * Creates a plain object from a JwtLocation message. Also converts values to other types if specified. + * @param message JwtLocation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.JwtLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetricDescriptor to JSON. + * Converts this JwtLocation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace MetricDescriptor { + /** Properties of an AuthProvider. */ + interface IAuthProvider { - /** Properties of a MetricDescriptorMetadata. */ - interface IMetricDescriptorMetadata { + /** AuthProvider id */ + id?: (string|null); - /** MetricDescriptorMetadata launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + /** AuthProvider issuer */ + issuer?: (string|null); - /** MetricDescriptorMetadata samplePeriod */ - samplePeriod?: (google.protobuf.IDuration|null); + /** AuthProvider jwksUri */ + jwksUri?: (string|null); - /** MetricDescriptorMetadata ingestDelay */ - ingestDelay?: (google.protobuf.IDuration|null); - } + /** AuthProvider audiences */ + audiences?: (string|null); - /** Represents a MetricDescriptorMetadata. */ - class MetricDescriptorMetadata implements IMetricDescriptorMetadata { - - /** - * Constructs a new MetricDescriptorMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); - - /** MetricDescriptorMetadata launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** MetricDescriptorMetadata samplePeriod. */ - public samplePeriod?: (google.protobuf.IDuration|null); - - /** MetricDescriptorMetadata ingestDelay. */ - public ingestDelay?: (google.protobuf.IDuration|null); - - /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricDescriptorMetadata instance - */ - public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricDescriptorMetadata - * @throws {Error} If the payload is not 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.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricDescriptorMetadata - * @throws {Error} If the payload 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.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Verifies a MetricDescriptorMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricDescriptorMetadata - */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @param message MetricDescriptorMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricDescriptorMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** MetricKind enum. */ - enum MetricKind { - METRIC_KIND_UNSPECIFIED = 0, - GAUGE = 1, - DELTA = 2, - CUMULATIVE = 3 - } - - /** ValueType enum. */ - enum ValueType { - VALUE_TYPE_UNSPECIFIED = 0, - BOOL = 1, - INT64 = 2, - DOUBLE = 3, - STRING = 4, - DISTRIBUTION = 5, - MONEY = 6 - } - } - - /** Properties of a Metric. */ - interface IMetric { - - /** Metric type */ - type?: (string|null); + /** AuthProvider authorizationUrl */ + authorizationUrl?: (string|null); - /** Metric labels */ - labels?: ({ [k: string]: string }|null); + /** AuthProvider jwtLocations */ + jwtLocations?: (google.api.IJwtLocation[]|null); } - /** Represents a Metric. */ - class Metric implements IMetric { + /** Represents an AuthProvider. */ + class AuthProvider implements IAuthProvider { /** - * Constructs a new Metric. + * Constructs a new AuthProvider. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMetric); + constructor(properties?: google.api.IAuthProvider); - /** Metric type. */ - public type: string; + /** AuthProvider id. */ + public id: string; - /** Metric labels. */ - public labels: { [k: string]: string }; + /** AuthProvider issuer. */ + public issuer: string; + + /** AuthProvider jwksUri. */ + public jwksUri: string; + + /** AuthProvider audiences. */ + public audiences: string; + + /** AuthProvider authorizationUrl. */ + public authorizationUrl: string; + + /** AuthProvider jwtLocations. */ + public jwtLocations: google.api.IJwtLocation[]; /** - * Creates a new Metric instance using the specified properties. + * Creates a new AuthProvider instance using the specified properties. * @param [properties] Properties to set - * @returns Metric instance + * @returns AuthProvider instance */ - public static create(properties?: google.api.IMetric): google.api.Metric; + public static create(properties?: google.api.IAuthProvider): google.api.AuthProvider; /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode + * Encodes the specified AuthProvider message. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. + * @param message AuthProvider message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IAuthProvider, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode + * Encodes the specified AuthProvider message, length delimited. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. + * @param message AuthProvider message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IAuthProvider, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Metric message from the specified reader or buffer. + * Decodes an AuthProvider message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Metric + * @returns AuthProvider * @throws {Error} If the payload is not 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.Metric; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.AuthProvider; /** - * Decodes a Metric message from the specified reader or buffer, length delimited. + * Decodes an AuthProvider message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Metric + * @returns AuthProvider * @throws {Error} If the payload 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.Metric; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.AuthProvider; /** - * Verifies a Metric message. + * Verifies an AuthProvider message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * Creates an AuthProvider message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Metric + * @returns AuthProvider */ - public static fromObject(object: { [k: string]: any }): google.api.Metric; + public static fromObject(object: { [k: string]: any }): google.api.AuthProvider; /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric + * Creates a plain object from an AuthProvider message. Also converts values to other types if specified. + * @param message AuthProvider * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.AuthProvider, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Metric to JSON. + * Converts this AuthProvider to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LabelDescriptor. */ - interface ILabelDescriptor { - - /** LabelDescriptor key */ - key?: (string|null); - - /** LabelDescriptor valueType */ - valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); + /** Properties of a OAuthRequirements. */ + interface IOAuthRequirements { - /** LabelDescriptor description */ - description?: (string|null); + /** OAuthRequirements canonicalScopes */ + canonicalScopes?: (string|null); } - /** Represents a LabelDescriptor. */ - class LabelDescriptor implements ILabelDescriptor { + /** Represents a OAuthRequirements. */ + class OAuthRequirements implements IOAuthRequirements { /** - * Constructs a new LabelDescriptor. + * Constructs a new OAuthRequirements. * @param [properties] Properties to set */ - constructor(properties?: google.api.ILabelDescriptor); - - /** LabelDescriptor key. */ - public key: string; - - /** LabelDescriptor valueType. */ - public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); + constructor(properties?: google.api.IOAuthRequirements); - /** LabelDescriptor description. */ - public description: string; + /** OAuthRequirements canonicalScopes. */ + public canonicalScopes: string; /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new OAuthRequirements instance using the specified properties. * @param [properties] Properties to set - * @returns LabelDescriptor instance + * @returns OAuthRequirements instance */ - public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + public static create(properties?: google.api.IOAuthRequirements): google.api.OAuthRequirements; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified OAuthRequirements message. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. + * @param message OAuthRequirements message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IOAuthRequirements, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified OAuthRequirements message, length delimited. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. + * @param message OAuthRequirements message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IOAuthRequirements, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a OAuthRequirements message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LabelDescriptor + * @returns OAuthRequirements * @throws {Error} If the payload is not 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.LabelDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.OAuthRequirements; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a OAuthRequirements message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LabelDescriptor + * @returns OAuthRequirements * @throws {Error} If the payload 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.LabelDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.OAuthRequirements; /** - * Verifies a LabelDescriptor message. + * Verifies a OAuthRequirements message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a OAuthRequirements message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LabelDescriptor + * @returns OAuthRequirements */ - public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.OAuthRequirements; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @param message LabelDescriptor + * Creates a plain object from a OAuthRequirements message. Also converts values to other types if specified. + * @param message OAuthRequirements * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.OAuthRequirements, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LabelDescriptor to JSON. + * Converts this OAuthRequirements to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace LabelDescriptor { - - /** ValueType enum. */ - enum ValueType { - STRING = 0, - BOOL = 1, - INT64 = 2 - } - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** Properties of a Quota. */ - interface IQuota { + /** Properties of an AuthRequirement. */ + interface IAuthRequirement { - /** Quota limits */ - limits?: (google.api.IQuotaLimit[]|null); + /** AuthRequirement providerId */ + providerId?: (string|null); - /** Quota metricRules */ - metricRules?: (google.api.IMetricRule[]|null); + /** AuthRequirement audiences */ + audiences?: (string|null); } - /** Represents a Quota. */ - class Quota implements IQuota { + /** Represents an AuthRequirement. */ + class AuthRequirement implements IAuthRequirement { /** - * Constructs a new Quota. + * Constructs a new AuthRequirement. * @param [properties] Properties to set */ - constructor(properties?: google.api.IQuota); + constructor(properties?: google.api.IAuthRequirement); - /** Quota limits. */ - public limits: google.api.IQuotaLimit[]; + /** AuthRequirement providerId. */ + public providerId: string; - /** Quota metricRules. */ - public metricRules: google.api.IMetricRule[]; + /** AuthRequirement audiences. */ + public audiences: string; /** - * Creates a new Quota instance using the specified properties. + * Creates a new AuthRequirement instance using the specified properties. * @param [properties] Properties to set - * @returns Quota instance + * @returns AuthRequirement instance */ - public static create(properties?: google.api.IQuota): google.api.Quota; + public static create(properties?: google.api.IAuthRequirement): google.api.AuthRequirement; /** - * Encodes the specified Quota message. Does not implicitly {@link google.api.Quota.verify|verify} messages. - * @param message Quota message or plain object to encode + * Encodes the specified AuthRequirement message. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. + * @param message AuthRequirement message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IQuota, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IAuthRequirement, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Quota message, length delimited. Does not implicitly {@link google.api.Quota.verify|verify} messages. - * @param message Quota message or plain object to encode + * Encodes the specified AuthRequirement message, length delimited. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. + * @param message AuthRequirement message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IQuota, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IAuthRequirement, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Quota message from the specified reader or buffer. + * Decodes an AuthRequirement message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Quota + * @returns AuthRequirement * @throws {Error} If the payload is not 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.Quota; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.AuthRequirement; /** - * Decodes a Quota message from the specified reader or buffer, length delimited. + * Decodes an AuthRequirement message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Quota + * @returns AuthRequirement * @throws {Error} If the payload 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.Quota; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.AuthRequirement; /** - * Verifies a Quota message. + * Verifies an AuthRequirement message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Quota message from a plain object. Also converts values to their respective internal types. + * Creates an AuthRequirement message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Quota + * @returns AuthRequirement */ - public static fromObject(object: { [k: string]: any }): google.api.Quota; + public static fromObject(object: { [k: string]: any }): google.api.AuthRequirement; /** - * Creates a plain object from a Quota message. Also converts values to other types if specified. - * @param message Quota + * Creates a plain object from an AuthRequirement message. Also converts values to other types if specified. + * @param message AuthRequirement * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Quota, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.AuthRequirement, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Quota to JSON. + * Converts this AuthRequirement to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MetricRule. */ - interface IMetricRule { - - /** MetricRule selector */ - selector?: (string|null); + /** Properties of a Backend. */ + interface IBackend { - /** MetricRule metricCosts */ - metricCosts?: ({ [k: string]: (number|Long|string) }|null); + /** Backend rules */ + rules?: (google.api.IBackendRule[]|null); } - /** Represents a MetricRule. */ - class MetricRule implements IMetricRule { + /** Represents a Backend. */ + class Backend implements IBackend { /** - * Constructs a new MetricRule. + * Constructs a new Backend. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMetricRule); - - /** MetricRule selector. */ - public selector: string; + constructor(properties?: google.api.IBackend); - /** MetricRule metricCosts. */ - public metricCosts: { [k: string]: (number|Long|string) }; + /** Backend rules. */ + public rules: google.api.IBackendRule[]; /** - * Creates a new MetricRule instance using the specified properties. + * Creates a new Backend instance using the specified properties. * @param [properties] Properties to set - * @returns MetricRule instance + * @returns Backend instance */ - public static create(properties?: google.api.IMetricRule): google.api.MetricRule; + public static create(properties?: google.api.IBackend): google.api.Backend; /** - * Encodes the specified MetricRule message. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. - * @param message MetricRule message or plain object to encode + * Encodes the specified Backend message. Does not implicitly {@link google.api.Backend.verify|verify} messages. + * @param message Backend message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMetricRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IBackend, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetricRule message, length delimited. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. - * @param message MetricRule message or plain object to encode + * Encodes the specified Backend message, length delimited. Does not implicitly {@link google.api.Backend.verify|verify} messages. + * @param message Backend message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMetricRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IBackend, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetricRule message from the specified reader or buffer. + * Decodes a Backend message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetricRule + * @returns Backend * @throws {Error} If the payload is not 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.MetricRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Backend; /** - * Decodes a MetricRule message from the specified reader or buffer, length delimited. + * Decodes a Backend message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetricRule + * @returns Backend * @throws {Error} If the payload 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.MetricRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Backend; /** - * Verifies a MetricRule message. + * Verifies a Backend message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetricRule message from a plain object. Also converts values to their respective internal types. + * Creates a Backend message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetricRule + * @returns Backend */ - public static fromObject(object: { [k: string]: any }): google.api.MetricRule; + public static fromObject(object: { [k: string]: any }): google.api.Backend; /** - * Creates a plain object from a MetricRule message. Also converts values to other types if specified. - * @param message MetricRule + * Creates a plain object from a Backend message. Also converts values to other types if specified. + * @param message Backend * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MetricRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Backend, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetricRule to JSON. + * Converts this Backend to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a QuotaLimit. */ - interface IQuotaLimit { - - /** QuotaLimit name */ - name?: (string|null); + /** Properties of a BackendRule. */ + interface IBackendRule { - /** QuotaLimit description */ - description?: (string|null); + /** BackendRule selector */ + selector?: (string|null); - /** QuotaLimit defaultLimit */ - defaultLimit?: (number|Long|string|null); + /** BackendRule address */ + address?: (string|null); - /** QuotaLimit maxLimit */ - maxLimit?: (number|Long|string|null); + /** BackendRule deadline */ + deadline?: (number|null); - /** QuotaLimit freeTier */ - freeTier?: (number|Long|string|null); + /** BackendRule minDeadline */ + minDeadline?: (number|null); - /** QuotaLimit duration */ - duration?: (string|null); + /** BackendRule operationDeadline */ + operationDeadline?: (number|null); - /** QuotaLimit metric */ - metric?: (string|null); + /** BackendRule pathTranslation */ + pathTranslation?: (google.api.BackendRule.PathTranslation|keyof typeof google.api.BackendRule.PathTranslation|null); - /** QuotaLimit unit */ - unit?: (string|null); + /** BackendRule jwtAudience */ + jwtAudience?: (string|null); - /** QuotaLimit values */ - values?: ({ [k: string]: (number|Long|string) }|null); + /** BackendRule disableAuth */ + disableAuth?: (boolean|null); - /** QuotaLimit displayName */ - displayName?: (string|null); + /** BackendRule protocol */ + protocol?: (string|null); } - /** Represents a QuotaLimit. */ - class QuotaLimit implements IQuotaLimit { + /** Represents a BackendRule. */ + class BackendRule implements IBackendRule { /** - * Constructs a new QuotaLimit. + * Constructs a new BackendRule. * @param [properties] Properties to set */ - constructor(properties?: google.api.IQuotaLimit); + constructor(properties?: google.api.IBackendRule); - /** QuotaLimit name. */ - public name: string; + /** BackendRule selector. */ + public selector: string; - /** QuotaLimit description. */ - public description: string; + /** BackendRule address. */ + public address: string; - /** QuotaLimit defaultLimit. */ - public defaultLimit: (number|Long|string); + /** BackendRule deadline. */ + public deadline: number; - /** QuotaLimit maxLimit. */ - public maxLimit: (number|Long|string); + /** BackendRule minDeadline. */ + public minDeadline: number; - /** QuotaLimit freeTier. */ - public freeTier: (number|Long|string); + /** BackendRule operationDeadline. */ + public operationDeadline: number; - /** QuotaLimit duration. */ - public duration: string; + /** BackendRule pathTranslation. */ + public pathTranslation: (google.api.BackendRule.PathTranslation|keyof typeof google.api.BackendRule.PathTranslation); - /** QuotaLimit metric. */ - public metric: string; + /** BackendRule jwtAudience. */ + public jwtAudience?: (string|null); - /** QuotaLimit unit. */ - public unit: string; + /** BackendRule disableAuth. */ + public disableAuth?: (boolean|null); - /** QuotaLimit values. */ - public values: { [k: string]: (number|Long|string) }; + /** BackendRule protocol. */ + public protocol: string; - /** QuotaLimit displayName. */ - public displayName: string; + /** BackendRule authentication. */ + public authentication?: ("jwtAudience"|"disableAuth"); /** - * Creates a new QuotaLimit instance using the specified properties. + * Creates a new BackendRule instance using the specified properties. * @param [properties] Properties to set - * @returns QuotaLimit instance + * @returns BackendRule instance */ - public static create(properties?: google.api.IQuotaLimit): google.api.QuotaLimit; + public static create(properties?: google.api.IBackendRule): google.api.BackendRule; /** - * Encodes the specified QuotaLimit message. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. - * @param message QuotaLimit message or plain object to encode + * Encodes the specified BackendRule message. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. + * @param message BackendRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IQuotaLimit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IBackendRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QuotaLimit message, length delimited. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. - * @param message QuotaLimit message or plain object to encode + * Encodes the specified BackendRule message, length delimited. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. + * @param message BackendRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IQuotaLimit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IBackendRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QuotaLimit message from the specified reader or buffer. + * Decodes a BackendRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QuotaLimit + * @returns BackendRule * @throws {Error} If the payload is not 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.QuotaLimit; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.BackendRule; /** - * Decodes a QuotaLimit message from the specified reader or buffer, length delimited. + * Decodes a BackendRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QuotaLimit + * @returns BackendRule * @throws {Error} If the payload 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.QuotaLimit; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.BackendRule; /** - * Verifies a QuotaLimit message. + * Verifies a BackendRule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a QuotaLimit message from a plain object. Also converts values to their respective internal types. + * Creates a BackendRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QuotaLimit + * @returns BackendRule */ - public static fromObject(object: { [k: string]: any }): google.api.QuotaLimit; + public static fromObject(object: { [k: string]: any }): google.api.BackendRule; /** - * Creates a plain object from a QuotaLimit message. Also converts values to other types if specified. - * @param message QuotaLimit + * Creates a plain object from a BackendRule message. Also converts values to other types if specified. + * @param message BackendRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.QuotaLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.BackendRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QuotaLimit to JSON. + * Converts this BackendRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Service. */ - interface IService { - - /** Service name */ - name?: (string|null); - - /** Service title */ - title?: (string|null); - - /** Service producerProjectId */ - producerProjectId?: (string|null); - - /** Service id */ - id?: (string|null); - - /** Service apis */ - apis?: (google.protobuf.IApi[]|null); - - /** Service types */ - types?: (google.protobuf.IType[]|null); - - /** Service enums */ - enums?: (google.protobuf.IEnum[]|null); - - /** Service documentation */ - documentation?: (google.api.IDocumentation|null); - - /** Service backend */ - backend?: (google.api.IBackend|null); - - /** Service http */ - http?: (google.api.IHttp|null); - - /** Service quota */ - quota?: (google.api.IQuota|null); - - /** Service authentication */ - authentication?: (google.api.IAuthentication|null); - - /** Service context */ - context?: (google.api.IContext|null); - - /** Service usage */ - usage?: (google.api.IUsage|null); - - /** Service endpoints */ - endpoints?: (google.api.IEndpoint[]|null); - - /** Service control */ - control?: (google.api.IControl|null); - - /** Service logs */ - logs?: (google.api.ILogDescriptor[]|null); - - /** Service metrics */ - metrics?: (google.api.IMetricDescriptor[]|null); - - /** Service monitoredResources */ - monitoredResources?: (google.api.IMonitoredResourceDescriptor[]|null); - - /** Service billing */ - billing?: (google.api.IBilling|null); - - /** Service logging */ - logging?: (google.api.ILogging|null); - - /** Service monitoring */ - monitoring?: (google.api.IMonitoring|null); + namespace BackendRule { - /** Service systemParameters */ - systemParameters?: (google.api.ISystemParameters|null); + /** PathTranslation enum. */ + enum PathTranslation { + PATH_TRANSLATION_UNSPECIFIED = 0, + CONSTANT_ADDRESS = 1, + APPEND_PATH_TO_ADDRESS = 2 + } + } - /** Service sourceInfo */ - sourceInfo?: (google.api.ISourceInfo|null); + /** Properties of a Billing. */ + interface IBilling { - /** Service configVersion */ - configVersion?: (google.protobuf.IUInt32Value|null); + /** Billing consumerDestinations */ + consumerDestinations?: (google.api.Billing.IBillingDestination[]|null); } - /** Represents a Service. */ - class Service implements IService { + /** Represents a Billing. */ + class Billing implements IBilling { /** - * Constructs a new Service. + * Constructs a new Billing. * @param [properties] Properties to set */ - constructor(properties?: google.api.IService); - - /** Service name. */ - public name: string; - - /** Service title. */ - public title: string; - - /** Service producerProjectId. */ - public producerProjectId: string; - - /** Service id. */ - public id: string; - - /** Service apis. */ - public apis: google.protobuf.IApi[]; - - /** Service types. */ - public types: google.protobuf.IType[]; - - /** Service enums. */ - public enums: google.protobuf.IEnum[]; - - /** Service documentation. */ - public documentation?: (google.api.IDocumentation|null); - - /** Service backend. */ - public backend?: (google.api.IBackend|null); - - /** Service http. */ - public http?: (google.api.IHttp|null); - - /** Service quota. */ - public quota?: (google.api.IQuota|null); - - /** Service authentication. */ - public authentication?: (google.api.IAuthentication|null); - - /** Service context. */ - public context?: (google.api.IContext|null); - - /** Service usage. */ - public usage?: (google.api.IUsage|null); - - /** Service endpoints. */ - public endpoints: google.api.IEndpoint[]; - - /** Service control. */ - public control?: (google.api.IControl|null); - - /** Service logs. */ - public logs: google.api.ILogDescriptor[]; - - /** Service metrics. */ - public metrics: google.api.IMetricDescriptor[]; - - /** Service monitoredResources. */ - public monitoredResources: google.api.IMonitoredResourceDescriptor[]; - - /** Service billing. */ - public billing?: (google.api.IBilling|null); - - /** Service logging. */ - public logging?: (google.api.ILogging|null); - - /** Service monitoring. */ - public monitoring?: (google.api.IMonitoring|null); - - /** Service systemParameters. */ - public systemParameters?: (google.api.ISystemParameters|null); - - /** Service sourceInfo. */ - public sourceInfo?: (google.api.ISourceInfo|null); + constructor(properties?: google.api.IBilling); - /** Service configVersion. */ - public configVersion?: (google.protobuf.IUInt32Value|null); + /** Billing consumerDestinations. */ + public consumerDestinations: google.api.Billing.IBillingDestination[]; /** - * Creates a new Service instance using the specified properties. + * Creates a new Billing instance using the specified properties. * @param [properties] Properties to set - * @returns Service instance + * @returns Billing instance */ - public static create(properties?: google.api.IService): google.api.Service; + public static create(properties?: google.api.IBilling): google.api.Billing; /** - * Encodes the specified Service message. Does not implicitly {@link google.api.Service.verify|verify} messages. - * @param message Service message or plain object to encode + * Encodes the specified Billing message. Does not implicitly {@link google.api.Billing.verify|verify} messages. + * @param message Billing message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IService, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IBilling, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.api.Service.verify|verify} messages. - * @param message Service message or plain object to encode + * Encodes the specified Billing message, length delimited. Does not implicitly {@link google.api.Billing.verify|verify} messages. + * @param message Billing message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IService, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IBilling, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Service message from the specified reader or buffer. + * Decodes a Billing message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Service + * @returns Billing * @throws {Error} If the payload is not 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.Service; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Billing; /** - * Decodes a Service message from the specified reader or buffer, length delimited. + * Decodes a Billing message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Service + * @returns Billing * @throws {Error} If the payload 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.Service; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Billing; /** - * Verifies a Service message. + * Verifies a Billing message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. + * Creates a Billing message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Service + * @returns Billing */ - public static fromObject(object: { [k: string]: any }): google.api.Service; + public static fromObject(object: { [k: string]: any }): google.api.Billing; /** - * Creates a plain object from a Service message. Also converts values to other types if specified. - * @param message Service + * Creates a plain object from a Billing message. Also converts values to other types if specified. + * @param message Billing * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Billing, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Service to JSON. + * Converts this Billing to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Authentication. */ - interface IAuthentication { + namespace Billing { - /** Authentication rules */ - rules?: (google.api.IAuthenticationRule[]|null); + /** Properties of a BillingDestination. */ + interface IBillingDestination { - /** Authentication providers */ - providers?: (google.api.IAuthProvider[]|null); + /** BillingDestination monitoredResource */ + monitoredResource?: (string|null); + + /** BillingDestination metrics */ + metrics?: (string[]|null); + } + + /** Represents a BillingDestination. */ + class BillingDestination implements IBillingDestination { + + /** + * Constructs a new BillingDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Billing.IBillingDestination); + + /** BillingDestination monitoredResource. */ + public monitoredResource: string; + + /** BillingDestination metrics. */ + public metrics: string[]; + + /** + * Creates a new BillingDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns BillingDestination instance + */ + public static create(properties?: google.api.Billing.IBillingDestination): google.api.Billing.BillingDestination; + + /** + * Encodes the specified BillingDestination message. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. + * @param message BillingDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Billing.IBillingDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BillingDestination message, length delimited. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. + * @param message BillingDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Billing.IBillingDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BillingDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BillingDestination + * @throws {Error} If the payload is not 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.Billing.BillingDestination; + + /** + * Decodes a BillingDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BillingDestination + * @throws {Error} If the payload 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.Billing.BillingDestination; + + /** + * Verifies a BillingDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BillingDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BillingDestination + */ + public static fromObject(object: { [k: string]: any }): google.api.Billing.BillingDestination; + + /** + * Creates a plain object from a BillingDestination message. Also converts values to other types if specified. + * @param message BillingDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Billing.BillingDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BillingDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents an Authentication. */ - class Authentication implements IAuthentication { + /** Properties of a MetricDescriptor. */ + interface IMetricDescriptor { + + /** MetricDescriptor name */ + name?: (string|null); + + /** MetricDescriptor type */ + type?: (string|null); + + /** MetricDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** MetricDescriptor metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + + /** MetricDescriptor valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + + /** MetricDescriptor unit */ + unit?: (string|null); + + /** MetricDescriptor description */ + description?: (string|null); + + /** MetricDescriptor displayName */ + displayName?: (string|null); + + /** MetricDescriptor metadata */ + metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + + /** MetricDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** MetricDescriptor monitoredResourceTypes */ + monitoredResourceTypes?: (string[]|null); + } + + /** Represents a MetricDescriptor. */ + class MetricDescriptor implements IMetricDescriptor { /** - * Constructs a new Authentication. + * Constructs a new MetricDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IAuthentication); + constructor(properties?: google.api.IMetricDescriptor); - /** Authentication rules. */ - public rules: google.api.IAuthenticationRule[]; + /** MetricDescriptor name. */ + public name: string; - /** Authentication providers. */ - public providers: google.api.IAuthProvider[]; + /** MetricDescriptor type. */ + public type: string; + + /** MetricDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** MetricDescriptor metricKind. */ + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + + /** MetricDescriptor valueType. */ + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + + /** MetricDescriptor unit. */ + public unit: string; + + /** MetricDescriptor description. */ + public description: string; + + /** MetricDescriptor displayName. */ + public displayName: string; + + /** MetricDescriptor metadata. */ + public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + + /** MetricDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** MetricDescriptor monitoredResourceTypes. */ + public monitoredResourceTypes: string[]; /** - * Creates a new Authentication instance using the specified properties. + * Creates a new MetricDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns Authentication instance + * @returns MetricDescriptor instance */ - public static create(properties?: google.api.IAuthentication): google.api.Authentication; + public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; /** - * Encodes the specified Authentication message. Does not implicitly {@link google.api.Authentication.verify|verify} messages. - * @param message Authentication message or plain object to encode + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Authentication message, length delimited. Does not implicitly {@link google.api.Authentication.verify|verify} messages. - * @param message Authentication message or plain object to encode + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Authentication message from the specified reader or buffer. + * Decodes a MetricDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Authentication + * @returns MetricDescriptor * @throws {Error} If the payload is not 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.Authentication; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor; /** - * Decodes an Authentication message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Authentication + * @returns MetricDescriptor * @throws {Error} If the payload 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.Authentication; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor; /** - * Verifies an Authentication message. + * Verifies a MetricDescriptor message. * @param message Plain 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 Authentication message from a plain object. Also converts values to their respective internal types. + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Authentication + * @returns MetricDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.Authentication; + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; /** - * Creates a plain object from an Authentication message. Also converts values to other types if specified. - * @param message Authentication + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @param message MetricDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Authentication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Authentication to JSON. + * Converts this MetricDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AuthenticationRule. */ - interface IAuthenticationRule { + namespace MetricDescriptor { - /** AuthenticationRule selector */ - selector?: (string|null); - - /** AuthenticationRule oauth */ - oauth?: (google.api.IOAuthRequirements|null); - - /** AuthenticationRule allowWithoutCredential */ - allowWithoutCredential?: (boolean|null); - - /** AuthenticationRule requirements */ - requirements?: (google.api.IAuthRequirement[]|null); - } - - /** Represents an AuthenticationRule. */ - class AuthenticationRule implements IAuthenticationRule { - - /** - * Constructs a new AuthenticationRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IAuthenticationRule); - - /** AuthenticationRule selector. */ - public selector: string; - - /** AuthenticationRule oauth. */ - public oauth?: (google.api.IOAuthRequirements|null); - - /** AuthenticationRule allowWithoutCredential. */ - public allowWithoutCredential: boolean; - - /** AuthenticationRule requirements. */ - public requirements: google.api.IAuthRequirement[]; - - /** - * Creates a new AuthenticationRule instance using the specified properties. - * @param [properties] Properties to set - * @returns AuthenticationRule instance - */ - public static create(properties?: google.api.IAuthenticationRule): google.api.AuthenticationRule; - - /** - * Encodes the specified AuthenticationRule message. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. - * @param message AuthenticationRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IAuthenticationRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuthenticationRule message, length delimited. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. - * @param message AuthenticationRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IAuthenticationRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuthenticationRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuthenticationRule - * @throws {Error} If the payload is not 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.AuthenticationRule; - - /** - * Decodes an AuthenticationRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuthenticationRule - * @throws {Error} If the payload 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.AuthenticationRule; - - /** - * Verifies an AuthenticationRule message. - * @param message Plain 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 AuthenticationRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuthenticationRule - */ - public static fromObject(object: { [k: string]: any }): google.api.AuthenticationRule; - - /** - * Creates a plain object from an AuthenticationRule message. Also converts values to other types if specified. - * @param message AuthenticationRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.AuthenticationRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuthenticationRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a JwtLocation. */ - interface IJwtLocation { - - /** JwtLocation header */ - header?: (string|null); - - /** JwtLocation query */ - query?: (string|null); - - /** JwtLocation valuePrefix */ - valuePrefix?: (string|null); - } - - /** Represents a JwtLocation. */ - class JwtLocation implements IJwtLocation { - - /** - * Constructs a new JwtLocation. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJwtLocation); - - /** JwtLocation header. */ - public header?: (string|null); - - /** JwtLocation query. */ - public query?: (string|null); - - /** JwtLocation valuePrefix. */ - public valuePrefix: string; - - /** JwtLocation in. */ - public in_?: ("header"|"query"); - - /** - * Creates a new JwtLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns JwtLocation instance - */ - public static create(properties?: google.api.IJwtLocation): google.api.JwtLocation; - - /** - * Encodes the specified JwtLocation message. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. - * @param message JwtLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJwtLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JwtLocation message, length delimited. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. - * @param message JwtLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJwtLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JwtLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JwtLocation - * @throws {Error} If the payload is not 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.JwtLocation; - - /** - * Decodes a JwtLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JwtLocation - * @throws {Error} If the payload 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.JwtLocation; - - /** - * Verifies a JwtLocation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JwtLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JwtLocation - */ - public static fromObject(object: { [k: string]: any }): google.api.JwtLocation; - - /** - * Creates a plain object from a JwtLocation message. Also converts values to other types if specified. - * @param message JwtLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JwtLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JwtLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AuthProvider. */ - interface IAuthProvider { - - /** AuthProvider id */ - id?: (string|null); - - /** AuthProvider issuer */ - issuer?: (string|null); - - /** AuthProvider jwksUri */ - jwksUri?: (string|null); - - /** AuthProvider audiences */ - audiences?: (string|null); - - /** AuthProvider authorizationUrl */ - authorizationUrl?: (string|null); - - /** AuthProvider jwtLocations */ - jwtLocations?: (google.api.IJwtLocation[]|null); - } - - /** Represents an AuthProvider. */ - class AuthProvider implements IAuthProvider { - - /** - * Constructs a new AuthProvider. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IAuthProvider); - - /** AuthProvider id. */ - public id: string; - - /** AuthProvider issuer. */ - public issuer: string; - - /** AuthProvider jwksUri. */ - public jwksUri: string; - - /** AuthProvider audiences. */ - public audiences: string; - - /** AuthProvider authorizationUrl. */ - public authorizationUrl: string; - - /** AuthProvider jwtLocations. */ - public jwtLocations: google.api.IJwtLocation[]; - - /** - * Creates a new AuthProvider instance using the specified properties. - * @param [properties] Properties to set - * @returns AuthProvider instance - */ - public static create(properties?: google.api.IAuthProvider): google.api.AuthProvider; - - /** - * Encodes the specified AuthProvider message. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. - * @param message AuthProvider message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IAuthProvider, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuthProvider message, length delimited. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. - * @param message AuthProvider message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IAuthProvider, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuthProvider message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuthProvider - * @throws {Error} If the payload is not 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.AuthProvider; - - /** - * Decodes an AuthProvider message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuthProvider - * @throws {Error} If the payload 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.AuthProvider; - - /** - * Verifies an AuthProvider message. - * @param message Plain 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 AuthProvider message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuthProvider - */ - public static fromObject(object: { [k: string]: any }): google.api.AuthProvider; - - /** - * Creates a plain object from an AuthProvider message. Also converts values to other types if specified. - * @param message AuthProvider - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.AuthProvider, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuthProvider to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a OAuthRequirements. */ - interface IOAuthRequirements { - - /** OAuthRequirements canonicalScopes */ - canonicalScopes?: (string|null); - } - - /** Represents a OAuthRequirements. */ - class OAuthRequirements implements IOAuthRequirements { - - /** - * Constructs a new OAuthRequirements. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IOAuthRequirements); - - /** OAuthRequirements canonicalScopes. */ - public canonicalScopes: string; - - /** - * Creates a new OAuthRequirements instance using the specified properties. - * @param [properties] Properties to set - * @returns OAuthRequirements instance - */ - public static create(properties?: google.api.IOAuthRequirements): google.api.OAuthRequirements; - - /** - * Encodes the specified OAuthRequirements message. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. - * @param message OAuthRequirements message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IOAuthRequirements, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OAuthRequirements message, length delimited. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. - * @param message OAuthRequirements message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IOAuthRequirements, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a OAuthRequirements message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OAuthRequirements - * @throws {Error} If the payload is not 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.OAuthRequirements; - - /** - * Decodes a OAuthRequirements message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OAuthRequirements - * @throws {Error} If the payload 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.OAuthRequirements; - - /** - * Verifies a OAuthRequirements message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a OAuthRequirements message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OAuthRequirements - */ - public static fromObject(object: { [k: string]: any }): google.api.OAuthRequirements; - - /** - * Creates a plain object from a OAuthRequirements message. Also converts values to other types if specified. - * @param message OAuthRequirements - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.OAuthRequirements, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OAuthRequirements to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AuthRequirement. */ - interface IAuthRequirement { - - /** AuthRequirement providerId */ - providerId?: (string|null); - - /** AuthRequirement audiences */ - audiences?: (string|null); - } - - /** Represents an AuthRequirement. */ - class AuthRequirement implements IAuthRequirement { - - /** - * Constructs a new AuthRequirement. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IAuthRequirement); - - /** AuthRequirement providerId. */ - public providerId: string; - - /** AuthRequirement audiences. */ - public audiences: string; - - /** - * Creates a new AuthRequirement instance using the specified properties. - * @param [properties] Properties to set - * @returns AuthRequirement instance - */ - public static create(properties?: google.api.IAuthRequirement): google.api.AuthRequirement; - - /** - * Encodes the specified AuthRequirement message. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. - * @param message AuthRequirement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IAuthRequirement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuthRequirement message, length delimited. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. - * @param message AuthRequirement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IAuthRequirement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuthRequirement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuthRequirement - * @throws {Error} If the payload is not 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.AuthRequirement; + /** Properties of a MetricDescriptorMetadata. */ + interface IMetricDescriptorMetadata { - /** - * Decodes an AuthRequirement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuthRequirement - * @throws {Error} If the payload 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.AuthRequirement; + /** MetricDescriptorMetadata launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - /** - * Verifies an AuthRequirement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MetricDescriptorMetadata samplePeriod */ + samplePeriod?: (google.protobuf.IDuration|null); - /** - * Creates an AuthRequirement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuthRequirement - */ - public static fromObject(object: { [k: string]: any }): google.api.AuthRequirement; + /** MetricDescriptorMetadata ingestDelay */ + ingestDelay?: (google.protobuf.IDuration|null); + } - /** - * Creates a plain object from an AuthRequirement message. Also converts values to other types if specified. - * @param message AuthRequirement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.AuthRequirement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a MetricDescriptorMetadata. */ + class MetricDescriptorMetadata implements IMetricDescriptorMetadata { - /** - * Converts this AuthRequirement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new MetricDescriptorMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); - /** Properties of a Backend. */ - interface IBackend { + /** MetricDescriptorMetadata launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - /** Backend rules */ - rules?: (google.api.IBackendRule[]|null); - } + /** MetricDescriptorMetadata samplePeriod. */ + public samplePeriod?: (google.protobuf.IDuration|null); - /** Represents a Backend. */ - class Backend implements IBackend { + /** MetricDescriptorMetadata ingestDelay. */ + public ingestDelay?: (google.protobuf.IDuration|null); - /** - * Constructs a new Backend. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IBackend); + /** + * Creates a new MetricDescriptorMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricDescriptorMetadata instance + */ + public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; - /** Backend rules. */ - public rules: google.api.IBackendRule[]; + /** + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new Backend instance using the specified properties. - * @param [properties] Properties to set - * @returns Backend instance - */ - public static create(properties?: google.api.IBackend): google.api.Backend; + /** + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Backend message. Does not implicitly {@link google.api.Backend.verify|verify} messages. - * @param message Backend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IBackend, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricDescriptorMetadata + * @throws {Error} If the payload is not 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.MetricDescriptor.MetricDescriptorMetadata; - /** - * Encodes the specified Backend message, length delimited. Does not implicitly {@link google.api.Backend.verify|verify} messages. - * @param message Backend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IBackend, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricDescriptorMetadata + * @throws {Error} If the payload 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.MetricDescriptor.MetricDescriptorMetadata; - /** - * Decodes a Backend message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Backend - * @throws {Error} If the payload is not 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.Backend; + /** + * Verifies a MetricDescriptorMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a Backend message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Backend - * @throws {Error} If the payload 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.Backend; + /** + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricDescriptorMetadata + */ + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; - /** - * Verifies a Backend message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @param message MetricDescriptorMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a Backend message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Backend - */ - public static fromObject(object: { [k: string]: any }): google.api.Backend; + /** + * Converts this MetricDescriptorMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a Backend message. Also converts values to other types if specified. - * @param message Backend - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Backend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MetricKind enum. */ + enum MetricKind { + METRIC_KIND_UNSPECIFIED = 0, + GAUGE = 1, + DELTA = 2, + CUMULATIVE = 3 + } - /** - * Converts this Backend to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ValueType enum. */ + enum ValueType { + VALUE_TYPE_UNSPECIFIED = 0, + BOOL = 1, + INT64 = 2, + DOUBLE = 3, + STRING = 4, + DISTRIBUTION = 5, + MONEY = 6 + } } - /** Properties of a BackendRule. */ - interface IBackendRule { - - /** BackendRule selector */ - selector?: (string|null); - - /** BackendRule address */ - address?: (string|null); - - /** BackendRule deadline */ - deadline?: (number|null); - - /** BackendRule minDeadline */ - minDeadline?: (number|null); - - /** BackendRule operationDeadline */ - operationDeadline?: (number|null); - - /** BackendRule pathTranslation */ - pathTranslation?: (google.api.BackendRule.PathTranslation|keyof typeof google.api.BackendRule.PathTranslation|null); - - /** BackendRule jwtAudience */ - jwtAudience?: (string|null); - - /** BackendRule disableAuth */ - disableAuth?: (boolean|null); + /** Properties of a Metric. */ + interface IMetric { - /** BackendRule protocol */ - protocol?: (string|null); + /** Metric type */ + type?: (string|null); + + /** Metric labels */ + labels?: ({ [k: string]: string }|null); } - /** Represents a BackendRule. */ - class BackendRule implements IBackendRule { + /** Represents a Metric. */ + class Metric implements IMetric { /** - * Constructs a new BackendRule. + * Constructs a new Metric. * @param [properties] Properties to set */ - constructor(properties?: google.api.IBackendRule); - - /** BackendRule selector. */ - public selector: string; - - /** BackendRule address. */ - public address: string; - - /** BackendRule deadline. */ - public deadline: number; - - /** BackendRule minDeadline. */ - public minDeadline: number; - - /** BackendRule operationDeadline. */ - public operationDeadline: number; - - /** BackendRule pathTranslation. */ - public pathTranslation: (google.api.BackendRule.PathTranslation|keyof typeof google.api.BackendRule.PathTranslation); - - /** BackendRule jwtAudience. */ - public jwtAudience?: (string|null); - - /** BackendRule disableAuth. */ - public disableAuth?: (boolean|null); + constructor(properties?: google.api.IMetric); - /** BackendRule protocol. */ - public protocol: string; + /** Metric type. */ + public type: string; - /** BackendRule authentication. */ - public authentication?: ("jwtAudience"|"disableAuth"); + /** Metric labels. */ + public labels: { [k: string]: string }; /** - * Creates a new BackendRule instance using the specified properties. + * Creates a new Metric instance using the specified properties. * @param [properties] Properties to set - * @returns BackendRule instance + * @returns Metric instance */ - public static create(properties?: google.api.IBackendRule): google.api.BackendRule; + public static create(properties?: google.api.IMetric): google.api.Metric; /** - * Encodes the specified BackendRule message. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. - * @param message BackendRule message or plain object to encode + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IBackendRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BackendRule message, length delimited. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. - * @param message BackendRule message or plain object to encode + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IBackendRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BackendRule message from the specified reader or buffer. + * Decodes a Metric message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BackendRule + * @returns Metric * @throws {Error} If the payload is not 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.BackendRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Metric; /** - * Decodes a BackendRule message from the specified reader or buffer, length delimited. + * Decodes a Metric message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BackendRule + * @returns Metric * @throws {Error} If the payload 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.BackendRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Metric; /** - * Verifies a BackendRule message. + * Verifies a Metric message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BackendRule message from a plain object. Also converts values to their respective internal types. + * Creates a Metric message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BackendRule + * @returns Metric */ - public static fromObject(object: { [k: string]: any }): google.api.BackendRule; + public static fromObject(object: { [k: string]: any }): google.api.Metric; /** - * Creates a plain object from a BackendRule message. Also converts values to other types if specified. - * @param message BackendRule + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.BackendRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BackendRule to JSON. + * Converts this Metric to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace BackendRule { + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { - /** PathTranslation enum. */ - enum PathTranslation { - PATH_TRANSLATION_UNSPECIFIED = 0, - CONSTANT_ADDRESS = 1, - APPEND_PATH_TO_ADDRESS = 2 - } - } + /** LabelDescriptor key */ + key?: (string|null); - /** Properties of a Billing. */ - interface IBilling { + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); - /** Billing consumerDestinations */ - consumerDestinations?: (google.api.Billing.IBillingDestination[]|null); + /** LabelDescriptor description */ + description?: (string|null); } - /** Represents a Billing. */ - class Billing implements IBilling { + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { /** - * Constructs a new Billing. + * Constructs a new LabelDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IBilling); + constructor(properties?: google.api.ILabelDescriptor); - /** Billing consumerDestinations. */ - public consumerDestinations: google.api.Billing.IBillingDestination[]; + /** LabelDescriptor key. */ + public key: string; + + /** LabelDescriptor valueType. */ + public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); + + /** LabelDescriptor description. */ + public description: string; /** - * Creates a new Billing instance using the specified properties. + * Creates a new LabelDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns Billing instance + * @returns LabelDescriptor instance */ - public static create(properties?: google.api.IBilling): google.api.Billing; + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; /** - * Encodes the specified Billing message. Does not implicitly {@link google.api.Billing.verify|verify} messages. - * @param message Billing message or plain object to encode + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IBilling, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Billing message, length delimited. Does not implicitly {@link google.api.Billing.verify|verify} messages. - * @param message Billing message or plain object to encode + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IBilling, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Billing message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Billing + * @returns LabelDescriptor * @throws {Error} If the payload is not 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.Billing; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; /** - * Decodes a Billing message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Billing + * @returns LabelDescriptor * @throws {Error} If the payload 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.Billing; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; /** - * Verifies a Billing message. + * Verifies a LabelDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Billing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Billing - */ - public static fromObject(object: { [k: string]: any }): google.api.Billing; - - /** - * Creates a plain object from a Billing message. Also converts values to other types if specified. - * @param message Billing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Billing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Billing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Billing { - - /** Properties of a BillingDestination. */ - interface IBillingDestination { - - /** BillingDestination monitoredResource */ - monitoredResource?: (string|null); - - /** BillingDestination metrics */ - metrics?: (string[]|null); - } - - /** Represents a BillingDestination. */ - class BillingDestination implements IBillingDestination { - - /** - * Constructs a new BillingDestination. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Billing.IBillingDestination); - - /** BillingDestination monitoredResource. */ - public monitoredResource: string; - - /** BillingDestination metrics. */ - public metrics: string[]; - - /** - * Creates a new BillingDestination instance using the specified properties. - * @param [properties] Properties to set - * @returns BillingDestination instance - */ - public static create(properties?: google.api.Billing.IBillingDestination): google.api.Billing.BillingDestination; - - /** - * Encodes the specified BillingDestination message. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. - * @param message BillingDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Billing.IBillingDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BillingDestination message, length delimited. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. - * @param message BillingDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Billing.IBillingDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BillingDestination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BillingDestination - * @throws {Error} If the payload is not 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.Billing.BillingDestination; - - /** - * Decodes a BillingDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BillingDestination - * @throws {Error} If the payload 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.Billing.BillingDestination; + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a BillingDestination message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; - /** - * Creates a BillingDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BillingDestination - */ - public static fromObject(object: { [k: string]: any }): google.api.Billing.BillingDestination; + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a BillingDestination message. Also converts values to other types if specified. - * @param message BillingDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Billing.BillingDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this LabelDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this BillingDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + namespace LabelDescriptor { + + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 } } + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + /** Properties of a Context. */ interface IContext { @@ -7461,461 +7125,797 @@ export namespace google { public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResourceDescriptor instance + */ + public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; + + /** + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * @param message MonitoredResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResourceDescriptor + * @throws {Error} If the payload is not 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.MonitoredResourceDescriptor; + + /** + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResourceDescriptor + * @throws {Error} If the payload 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.MonitoredResourceDescriptor; + + /** + * Verifies a MonitoredResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; + + /** + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * @param message MonitoredResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoredResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonitoredResource. */ + interface IMonitoredResource { + + /** MonitoredResource type */ + type?: (string|null); + + /** MonitoredResource labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a MonitoredResource. */ + class MonitoredResource implements IMonitoredResource { + + /** + * Constructs a new MonitoredResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResource); + + /** MonitoredResource type. */ + public type: string; + + /** MonitoredResource labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new MonitoredResource instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoredResource instance + */ + public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; + + /** + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * @param message MonitoredResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoredResource + * @throws {Error} If the payload is not 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.MonitoredResource; + + /** + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoredResource + * @throws {Error} If the payload 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.MonitoredResource; + + /** + * Verifies a MonitoredResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoredResource + */ + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; + + /** + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * @param message MonitoredResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoredResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonitoredResourceMetadata. */ + interface IMonitoredResourceMetadata { + + /** MonitoredResourceMetadata systemLabels */ + systemLabels?: (google.protobuf.IStruct|null); + + /** MonitoredResourceMetadata userLabels */ + userLabels?: ({ [k: string]: string }|null); + } + + /** Represents a MonitoredResourceMetadata. */ + class MonitoredResourceMetadata implements IMonitoredResourceMetadata { + + /** + * Constructs a new MonitoredResourceMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMonitoredResourceMetadata); + + /** MonitoredResourceMetadata systemLabels. */ + public systemLabels?: (google.protobuf.IStruct|null); + + /** MonitoredResourceMetadata userLabels. */ + public userLabels: { [k: string]: string }; + + /** + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceDescriptor instance + * @returns MonitoredResourceMetadata instance */ - public static create(properties?: google.api.IMonitoredResourceDescriptor): google.api.MonitoredResourceDescriptor; + public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. - * @param message MonitoredResourceDescriptor message or plain object to encode + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * @param message MonitoredResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceDescriptor + * @returns MonitoredResourceMetadata * @throws {Error} If the payload is not 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.MonitoredResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MonitoredResourceMetadata; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceDescriptor + * @returns MonitoredResourceMetadata * @throws {Error} If the payload 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.MonitoredResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MonitoredResourceMetadata; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies a MonitoredResourceMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceDescriptor + * @returns MonitoredResourceMetadata */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. - * @param message MonitoredResourceDescriptor + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * @param message MonitoredResourceMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceDescriptor to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResource. */ - interface IMonitoredResource { + /** Properties of a Monitoring. */ + interface IMonitoring { - /** MonitoredResource type */ - type?: (string|null); + /** Monitoring producerDestinations */ + producerDestinations?: (google.api.Monitoring.IMonitoringDestination[]|null); - /** MonitoredResource labels */ - labels?: ({ [k: string]: string }|null); + /** Monitoring consumerDestinations */ + consumerDestinations?: (google.api.Monitoring.IMonitoringDestination[]|null); } - /** Represents a MonitoredResource. */ - class MonitoredResource implements IMonitoredResource { + /** Represents a Monitoring. */ + class Monitoring implements IMonitoring { /** - * Constructs a new MonitoredResource. + * Constructs a new Monitoring. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResource); + constructor(properties?: google.api.IMonitoring); - /** MonitoredResource type. */ - public type: string; + /** Monitoring producerDestinations. */ + public producerDestinations: google.api.Monitoring.IMonitoringDestination[]; - /** MonitoredResource labels. */ - public labels: { [k: string]: string }; + /** Monitoring consumerDestinations. */ + public consumerDestinations: google.api.Monitoring.IMonitoringDestination[]; /** - * Creates a new MonitoredResource instance using the specified properties. + * Creates a new Monitoring instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResource instance + * @returns Monitoring instance */ - public static create(properties?: google.api.IMonitoredResource): google.api.MonitoredResource; + public static create(properties?: google.api.IMonitoring): google.api.Monitoring; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified Monitoring message. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. + * @param message Monitoring message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMonitoring, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. - * @param message MonitoredResource message or plain object to encode + * Encodes the specified Monitoring message, length delimited. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. + * @param message Monitoring message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMonitoring, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a Monitoring message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResource + * @returns Monitoring * @throws {Error} If the payload is not 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.MonitoredResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Monitoring; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a Monitoring message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResource + * @returns Monitoring * @throws {Error} If the payload 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.MonitoredResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Monitoring; /** - * Verifies a MonitoredResource message. + * Verifies a Monitoring message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a Monitoring message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResource + * @returns Monitoring */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResource; + public static fromObject(object: { [k: string]: any }): google.api.Monitoring; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. - * @param message MonitoredResource + * Creates a plain object from a Monitoring message. Also converts values to other types if specified. + * @param message Monitoring * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Monitoring, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResource to JSON. + * Converts this Monitoring to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonitoredResourceMetadata. */ - interface IMonitoredResourceMetadata { + namespace Monitoring { - /** MonitoredResourceMetadata systemLabels */ - systemLabels?: (google.protobuf.IStruct|null); + /** Properties of a MonitoringDestination. */ + interface IMonitoringDestination { - /** MonitoredResourceMetadata userLabels */ - userLabels?: ({ [k: string]: string }|null); + /** MonitoringDestination monitoredResource */ + monitoredResource?: (string|null); + + /** MonitoringDestination metrics */ + metrics?: (string[]|null); + } + + /** Represents a MonitoringDestination. */ + class MonitoringDestination implements IMonitoringDestination { + + /** + * Constructs a new MonitoringDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Monitoring.IMonitoringDestination); + + /** MonitoringDestination monitoredResource. */ + public monitoredResource: string; + + /** MonitoringDestination metrics. */ + public metrics: string[]; + + /** + * Creates a new MonitoringDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoringDestination instance + */ + public static create(properties?: google.api.Monitoring.IMonitoringDestination): google.api.Monitoring.MonitoringDestination; + + /** + * Encodes the specified MonitoringDestination message. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. + * @param message MonitoringDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Monitoring.IMonitoringDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoringDestination message, length delimited. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. + * @param message MonitoringDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Monitoring.IMonitoringDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoringDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoringDestination + * @throws {Error} If the payload is not 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.Monitoring.MonitoringDestination; + + /** + * Decodes a MonitoringDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoringDestination + * @throws {Error} If the payload 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.Monitoring.MonitoringDestination; + + /** + * Verifies a MonitoringDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoringDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoringDestination + */ + public static fromObject(object: { [k: string]: any }): google.api.Monitoring.MonitoringDestination; + + /** + * Creates a plain object from a MonitoringDestination message. Also converts values to other types if specified. + * @param message MonitoringDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Monitoring.MonitoringDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoringDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a MonitoredResourceMetadata. */ - class MonitoredResourceMetadata implements IMonitoredResourceMetadata { + /** Properties of a Quota. */ + interface IQuota { + + /** Quota limits */ + limits?: (google.api.IQuotaLimit[]|null); + + /** Quota metricRules */ + metricRules?: (google.api.IMetricRule[]|null); + } + + /** Represents a Quota. */ + class Quota implements IQuota { /** - * Constructs a new MonitoredResourceMetadata. + * Constructs a new Quota. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoredResourceMetadata); + constructor(properties?: google.api.IQuota); - /** MonitoredResourceMetadata systemLabels. */ - public systemLabels?: (google.protobuf.IStruct|null); + /** Quota limits. */ + public limits: google.api.IQuotaLimit[]; - /** MonitoredResourceMetadata userLabels. */ - public userLabels: { [k: string]: string }; + /** Quota metricRules. */ + public metricRules: google.api.IMetricRule[]; /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * Creates a new Quota instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoredResourceMetadata instance + * @returns Quota instance */ - public static create(properties?: google.api.IMonitoredResourceMetadata): google.api.MonitoredResourceMetadata; + public static create(properties?: google.api.IQuota): google.api.Quota; - /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + /** + * Encodes the specified Quota message. Does not implicitly {@link google.api.Quota.verify|verify} messages. + * @param message Quota message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IQuota, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @param message MonitoredResourceMetadata message or plain object to encode + * Encodes the specified Quota message, length delimited. Does not implicitly {@link google.api.Quota.verify|verify} messages. + * @param message Quota message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoredResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IQuota, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. + * Decodes a Quota message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoredResourceMetadata + * @returns Quota * @throws {Error} If the payload is not 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.MonitoredResourceMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Quota; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a Quota message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoredResourceMetadata + * @returns Quota * @throws {Error} If the payload 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.MonitoredResourceMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Quota; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a Quota message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a Quota message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoredResourceMetadata + * @returns Quota */ - public static fromObject(object: { [k: string]: any }): google.api.MonitoredResourceMetadata; + public static fromObject(object: { [k: string]: any }): google.api.Quota; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. - * @param message MonitoredResourceMetadata + * Creates a plain object from a Quota message. Also converts values to other types if specified. + * @param message Quota * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MonitoredResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Quota, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoredResourceMetadata to JSON. + * Converts this Quota to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Monitoring. */ - interface IMonitoring { + /** Properties of a MetricRule. */ + interface IMetricRule { - /** Monitoring producerDestinations */ - producerDestinations?: (google.api.Monitoring.IMonitoringDestination[]|null); + /** MetricRule selector */ + selector?: (string|null); - /** Monitoring consumerDestinations */ - consumerDestinations?: (google.api.Monitoring.IMonitoringDestination[]|null); + /** MetricRule metricCosts */ + metricCosts?: ({ [k: string]: (number|Long|string) }|null); } - /** Represents a Monitoring. */ - class Monitoring implements IMonitoring { + /** Represents a MetricRule. */ + class MetricRule implements IMetricRule { /** - * Constructs a new Monitoring. + * Constructs a new MetricRule. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMonitoring); + constructor(properties?: google.api.IMetricRule); - /** Monitoring producerDestinations. */ - public producerDestinations: google.api.Monitoring.IMonitoringDestination[]; + /** MetricRule selector. */ + public selector: string; - /** Monitoring consumerDestinations. */ - public consumerDestinations: google.api.Monitoring.IMonitoringDestination[]; + /** MetricRule metricCosts. */ + public metricCosts: { [k: string]: (number|Long|string) }; /** - * Creates a new Monitoring instance using the specified properties. + * Creates a new MetricRule instance using the specified properties. * @param [properties] Properties to set - * @returns Monitoring instance + * @returns MetricRule instance */ - public static create(properties?: google.api.IMonitoring): google.api.Monitoring; + public static create(properties?: google.api.IMetricRule): google.api.MetricRule; /** - * Encodes the specified Monitoring message. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. - * @param message Monitoring message or plain object to encode + * Encodes the specified MetricRule message. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. + * @param message MetricRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMonitoring, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMetricRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Monitoring message, length delimited. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. - * @param message Monitoring message or plain object to encode + * Encodes the specified MetricRule message, length delimited. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. + * @param message MetricRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMonitoring, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMetricRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Monitoring message from the specified reader or buffer. + * Decodes a MetricRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Monitoring + * @returns MetricRule * @throws {Error} If the payload is not 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.Monitoring; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricRule; /** - * Decodes a Monitoring message from the specified reader or buffer, length delimited. + * Decodes a MetricRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Monitoring + * @returns MetricRule * @throws {Error} If the payload 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.Monitoring; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricRule; /** - * Verifies a Monitoring message. + * Verifies a MetricRule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Monitoring message from a plain object. Also converts values to their respective internal types. + * Creates a MetricRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Monitoring + * @returns MetricRule */ - public static fromObject(object: { [k: string]: any }): google.api.Monitoring; + public static fromObject(object: { [k: string]: any }): google.api.MetricRule; /** - * Creates a plain object from a Monitoring message. Also converts values to other types if specified. - * @param message Monitoring + * Creates a plain object from a MetricRule message. Also converts values to other types if specified. + * @param message MetricRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Monitoring, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MetricRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Monitoring to JSON. + * Converts this MetricRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Monitoring { + /** Properties of a QuotaLimit. */ + interface IQuotaLimit { - /** Properties of a MonitoringDestination. */ - interface IMonitoringDestination { + /** QuotaLimit name */ + name?: (string|null); - /** MonitoringDestination monitoredResource */ - monitoredResource?: (string|null); + /** QuotaLimit description */ + description?: (string|null); - /** MonitoringDestination metrics */ - metrics?: (string[]|null); - } + /** QuotaLimit defaultLimit */ + defaultLimit?: (number|Long|string|null); - /** Represents a MonitoringDestination. */ - class MonitoringDestination implements IMonitoringDestination { + /** QuotaLimit maxLimit */ + maxLimit?: (number|Long|string|null); - /** - * Constructs a new MonitoringDestination. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Monitoring.IMonitoringDestination); + /** QuotaLimit freeTier */ + freeTier?: (number|Long|string|null); - /** MonitoringDestination monitoredResource. */ - public monitoredResource: string; + /** QuotaLimit duration */ + duration?: (string|null); - /** MonitoringDestination metrics. */ - public metrics: string[]; + /** QuotaLimit metric */ + metric?: (string|null); - /** - * Creates a new MonitoringDestination instance using the specified properties. - * @param [properties] Properties to set - * @returns MonitoringDestination instance - */ - public static create(properties?: google.api.Monitoring.IMonitoringDestination): google.api.Monitoring.MonitoringDestination; + /** QuotaLimit unit */ + unit?: (string|null); - /** - * Encodes the specified MonitoringDestination message. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. - * @param message MonitoringDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Monitoring.IMonitoringDestination, writer?: $protobuf.Writer): $protobuf.Writer; + /** QuotaLimit values */ + values?: ({ [k: string]: (number|Long|string) }|null); - /** - * Encodes the specified MonitoringDestination message, length delimited. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. - * @param message MonitoringDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Monitoring.IMonitoringDestination, writer?: $protobuf.Writer): $protobuf.Writer; + /** QuotaLimit displayName */ + displayName?: (string|null); + } - /** - * Decodes a MonitoringDestination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonitoringDestination - * @throws {Error} If the payload is not 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.Monitoring.MonitoringDestination; + /** Represents a QuotaLimit. */ + class QuotaLimit implements IQuotaLimit { - /** - * Decodes a MonitoringDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonitoringDestination - * @throws {Error} If the payload 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.Monitoring.MonitoringDestination; + /** + * Constructs a new QuotaLimit. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IQuotaLimit); + + /** QuotaLimit name. */ + public name: string; + + /** QuotaLimit description. */ + public description: string; + + /** QuotaLimit defaultLimit. */ + public defaultLimit: (number|Long|string); + + /** QuotaLimit maxLimit. */ + public maxLimit: (number|Long|string); + + /** QuotaLimit freeTier. */ + public freeTier: (number|Long|string); + + /** QuotaLimit duration. */ + public duration: string; + + /** QuotaLimit metric. */ + public metric: string; + + /** QuotaLimit unit. */ + public unit: string; + + /** QuotaLimit values. */ + public values: { [k: string]: (number|Long|string) }; + + /** QuotaLimit displayName. */ + public displayName: string; + + /** + * Creates a new QuotaLimit instance using the specified properties. + * @param [properties] Properties to set + * @returns QuotaLimit instance + */ + public static create(properties?: google.api.IQuotaLimit): google.api.QuotaLimit; + + /** + * Encodes the specified QuotaLimit message. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. + * @param message QuotaLimit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IQuotaLimit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuotaLimit message, length delimited. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. + * @param message QuotaLimit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IQuotaLimit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuotaLimit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuotaLimit + * @throws {Error} If the payload is not 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.QuotaLimit; - /** - * Verifies a MonitoringDestination message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a QuotaLimit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuotaLimit + * @throws {Error} If the payload 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.QuotaLimit; - /** - * Creates a MonitoringDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonitoringDestination - */ - public static fromObject(object: { [k: string]: any }): google.api.Monitoring.MonitoringDestination; + /** + * Verifies a QuotaLimit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a MonitoringDestination message. Also converts values to other types if specified. - * @param message MonitoringDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Monitoring.MonitoringDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a QuotaLimit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuotaLimit + */ + public static fromObject(object: { [k: string]: any }): google.api.QuotaLimit; - /** - * Converts this MonitoringDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a QuotaLimit message. Also converts values to other types if specified. + * @param message QuotaLimit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.QuotaLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuotaLimit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } /** Properties of a ResourceDescriptor. */ @@ -11871,6 +11871,102 @@ export namespace google { } } + /** 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 Duration. */ interface IDuration { @@ -14408,102 +14504,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } } /** Namespace longrunning. */ diff --git a/packages/google-api-servicemanagement/protos/protos.js b/packages/google-api-servicemanagement/protos/protos.js index ccc72be6c0f..f2f8b42d168 100644 --- a/packages/google-api-servicemanagement/protos/protos.js +++ b/packages/google-api-servicemanagement/protos/protos.js @@ -8326,26 +8326,29 @@ return servicemanagement; })(); - api.Http = (function() { + api.ConfigChange = (function() { /** - * Properties of a Http. + * Properties of a ConfigChange. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IConfigChange + * @property {string|null} [element] ConfigChange element + * @property {string|null} [oldValue] ConfigChange oldValue + * @property {string|null} [newValue] ConfigChange newValue + * @property {google.api.ChangeType|null} [changeType] ConfigChange changeType + * @property {Array.|null} [advices] ConfigChange advices */ /** - * Constructs a new Http. + * Constructs a new ConfigChange. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a ConfigChange. + * @implements IConfigChange * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IConfigChange=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function ConfigChange(properties) { + this.advices = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8353,91 +8356,130 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * ConfigChange element. + * @member {string} element + * @memberof google.api.ConfigChange * @instance */ - Http.prototype.rules = $util.emptyArray; + ConfigChange.prototype.element = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * ConfigChange oldValue. + * @member {string} oldValue + * @memberof google.api.ConfigChange * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + ConfigChange.prototype.oldValue = ""; /** - * Creates a new Http instance using the specified properties. + * ConfigChange newValue. + * @member {string} newValue + * @memberof google.api.ConfigChange + * @instance + */ + ConfigChange.prototype.newValue = ""; + + /** + * ConfigChange changeType. + * @member {google.api.ChangeType} changeType + * @memberof google.api.ConfigChange + * @instance + */ + ConfigChange.prototype.changeType = 0; + + /** + * ConfigChange advices. + * @member {Array.} advices + * @memberof google.api.ConfigChange + * @instance + */ + ConfigChange.prototype.advices = $util.emptyArray; + + /** + * Creates a new ConfigChange instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.ConfigChange * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IConfigChange=} [properties] Properties to set + * @returns {google.api.ConfigChange} ConfigChange instance */ - Http.create = function create(properties) { - return new Http(properties); + ConfigChange.create = function create(properties) { + return new ConfigChange(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ConfigChange message. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.ConfigChange * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IConfigChange} message ConfigChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + ConfigChange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.element != null && Object.hasOwnProperty.call(message, "element")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.element); + if (message.oldValue != null && Object.hasOwnProperty.call(message, "oldValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldValue); + if (message.newValue != null && Object.hasOwnProperty.call(message, "newValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newValue); + if (message.changeType != null && Object.hasOwnProperty.call(message, "changeType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.changeType); + if (message.advices != null && message.advices.length) + for (var i = 0; i < message.advices.length; ++i) + $root.google.api.Advice.encode(message.advices[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ConfigChange message, length delimited. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.ConfigChange * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IConfigChange} message ConfigChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + ConfigChange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a ConfigChange message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.api.ConfigChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.api.ConfigChange} ConfigChange * @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) { + ConfigChange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ConfigChange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.element = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + message.oldValue = reader.string(); + break; + case 3: + message.newValue = reader.string(); + break; + case 4: + message.changeType = reader.int32(); + break; + case 5: + if (!(message.advices && message.advices.length)) + message.advices = []; + message.advices.push($root.google.api.Advice.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -8448,143 +8490,181 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a ConfigChange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.ConfigChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.api.ConfigChange} ConfigChange * @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) { + ConfigChange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a ConfigChange message. * @function verify - * @memberof google.api.Http + * @memberof google.api.ConfigChange * @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) { + ConfigChange.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 (message.element != null && message.hasOwnProperty("element")) + if (!$util.isString(message.element)) + return "element: string expected"; + if (message.oldValue != null && message.hasOwnProperty("oldValue")) + if (!$util.isString(message.oldValue)) + return "oldValue: string expected"; + if (message.newValue != null && message.hasOwnProperty("newValue")) + if (!$util.isString(message.newValue)) + return "newValue: string expected"; + if (message.changeType != null && message.hasOwnProperty("changeType")) + switch (message.changeType) { + default: + return "changeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.advices != null && message.hasOwnProperty("advices")) { + if (!Array.isArray(message.advices)) + return "advices: array expected"; + for (var i = 0; i < message.advices.length; ++i) { + var error = $root.google.api.Advice.verify(message.advices[i]); if (error) - return "rules." + error; + return "advices." + 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. + * Creates a ConfigChange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.ConfigChange * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.ConfigChange} ConfigChange */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + ConfigChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ConfigChange) 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]); + var message = new $root.google.api.ConfigChange(); + if (object.element != null) + message.element = String(object.element); + if (object.oldValue != null) + message.oldValue = String(object.oldValue); + if (object.newValue != null) + message.newValue = String(object.newValue); + switch (object.changeType) { + case "CHANGE_TYPE_UNSPECIFIED": + case 0: + message.changeType = 0; + break; + case "ADDED": + case 1: + message.changeType = 1; + break; + case "REMOVED": + case 2: + message.changeType = 2; + break; + case "MODIFIED": + case 3: + message.changeType = 3; + break; + } + if (object.advices) { + if (!Array.isArray(object.advices)) + throw TypeError(".google.api.ConfigChange.advices: array expected"); + message.advices = []; + for (var i = 0; i < object.advices.length; ++i) { + if (typeof object.advices[i] !== "object") + throw TypeError(".google.api.ConfigChange.advices: object expected"); + message.advices[i] = $root.google.api.Advice.fromObject(object.advices[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. + * Creates a plain object from a ConfigChange message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.ConfigChange * @static - * @param {google.api.Http} message Http + * @param {google.api.ConfigChange} message ConfigChange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + ConfigChange.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; + object.advices = []; + if (options.defaults) { + object.element = ""; + object.oldValue = ""; + object.newValue = ""; + object.changeType = options.enums === String ? "CHANGE_TYPE_UNSPECIFIED" : 0; + } + if (message.element != null && message.hasOwnProperty("element")) + object.element = message.element; + if (message.oldValue != null && message.hasOwnProperty("oldValue")) + object.oldValue = message.oldValue; + if (message.newValue != null && message.hasOwnProperty("newValue")) + object.newValue = message.newValue; + if (message.changeType != null && message.hasOwnProperty("changeType")) + object.changeType = options.enums === String ? $root.google.api.ChangeType[message.changeType] : message.changeType; + if (message.advices && message.advices.length) { + object.advices = []; + for (var j = 0; j < message.advices.length; ++j) + object.advices[j] = $root.google.api.Advice.toObject(message.advices[j], options); + } return object; }; /** - * Converts this Http to JSON. + * Converts this ConfigChange to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.ConfigChange * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + ConfigChange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + return ConfigChange; })(); - api.HttpRule = (function() { + api.Advice = (function() { /** - * Properties of a HttpRule. + * Properties of an Advice. * @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 + * @interface IAdvice + * @property {string|null} [description] Advice description */ /** - * Constructs a new HttpRule. + * Constructs a new Advice. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents an Advice. + * @implements IAdvice * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IAdvice=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function Advice(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8592,209 +8672,75 @@ } /** - * 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 + * Advice description. + * @member {string} description + * @memberof google.api.Advice * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + Advice.prototype.description = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new Advice instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.Advice * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IAdvice=} [properties] Properties to set + * @returns {google.api.Advice} Advice instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + Advice.create = function create(properties) { + return new Advice(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified Advice message. Does not implicitly {@link google.api.Advice.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.Advice * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IAdvice} message Advice message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + Advice.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified Advice message, length delimited. Does not implicitly {@link google.api.Advice.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.Advice * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IAdvice} message Advice message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + Advice.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes an Advice message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.api.Advice * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.Advice} Advice * @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) { + Advice.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Advice(); 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())); + message.description = reader.string(); break; default: reader.skipType(tag & 7); @@ -8805,240 +8751,153 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes an Advice message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.Advice * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.Advice} Advice * @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) { + Advice.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies an Advice message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.api.Advice * @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) { + Advice.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; - } - } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates an Advice message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.Advice * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.Advice} Advice */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + Advice.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Advice) 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]); - } - } + var message = new $root.google.api.Advice(); + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from an Advice message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.Advice * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.Advice} message Advice * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + Advice.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; + if (options.defaults) + object.description = ""; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this Advice to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.Advice * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + Advice.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return Advice; })(); - api.CustomHttpPattern = (function() { + /** + * ChangeType enum. + * @name google.api.ChangeType + * @enum {number} + * @property {number} CHANGE_TYPE_UNSPECIFIED=0 CHANGE_TYPE_UNSPECIFIED value + * @property {number} ADDED=1 ADDED value + * @property {number} REMOVED=2 REMOVED value + * @property {number} MODIFIED=3 MODIFIED value + */ + api.ChangeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHANGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADDED"] = 1; + values[valuesById[2] = "REMOVED"] = 2; + values[valuesById[3] = "MODIFIED"] = 3; + return values; + })(); + + /** + * 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.Http = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a Http. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9046,88 +8905,91 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.kind = ""; + Http.prototype.rules = $util.emptyArray; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - message.path = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -9138,121 +9000,143 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a Http message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; + return Http; })(); - api.ConfigChange = (function() { + api.HttpRule = (function() { /** - * Properties of a ConfigChange. + * Properties of a HttpRule. * @memberof google.api - * @interface IConfigChange - * @property {string|null} [element] ConfigChange element - * @property {string|null} [oldValue] ConfigChange oldValue - * @property {string|null} [newValue] ConfigChange newValue - * @property {google.api.ChangeType|null} [changeType] ConfigChange changeType - * @property {Array.|null} [advices] ConfigChange advices + * @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 ConfigChange. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ConfigChange. - * @implements IConfigChange + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IConfigChange=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ConfigChange(properties) { - this.advices = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9260,130 +9144,209 @@ } /** - * ConfigChange element. - * @member {string} element - * @memberof google.api.ConfigChange + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ConfigChange.prototype.element = ""; + HttpRule.prototype.selector = ""; /** - * ConfigChange oldValue. - * @member {string} oldValue - * @memberof google.api.ConfigChange + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule * @instance */ - ConfigChange.prototype.oldValue = ""; + HttpRule.prototype.get = null; /** - * ConfigChange newValue. - * @member {string} newValue - * @memberof google.api.ConfigChange + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule * @instance */ - ConfigChange.prototype.newValue = ""; + HttpRule.prototype.put = null; /** - * ConfigChange changeType. - * @member {google.api.ChangeType} changeType - * @memberof google.api.ConfigChange + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule * @instance */ - ConfigChange.prototype.changeType = 0; + HttpRule.prototype.post = null; /** - * ConfigChange advices. - * @member {Array.} advices - * @memberof google.api.ConfigChange + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule * @instance */ - ConfigChange.prototype.advices = $util.emptyArray; + HttpRule.prototype["delete"] = null; /** - * Creates a new ConfigChange instance using the specified properties. - * @function create - * @memberof google.api.ConfigChange - * @static - * @param {google.api.IConfigChange=} [properties] Properties to set - * @returns {google.api.ConfigChange} ConfigChange instance + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance */ - ConfigChange.create = function create(properties) { - return new ConfigChange(properties); - }; + HttpRule.prototype.patch = null; /** - * Encodes the specified ConfigChange message. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. - * @function encode - * @memberof google.api.ConfigChange - * @static - * @param {google.api.IConfigChange} message ConfigChange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance */ - ConfigChange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.element != null && Object.hasOwnProperty.call(message, "element")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.element); - if (message.oldValue != null && Object.hasOwnProperty.call(message, "oldValue")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldValue); - if (message.newValue != null && Object.hasOwnProperty.call(message, "newValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.newValue); - if (message.changeType != null && Object.hasOwnProperty.call(message, "changeType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.changeType); - if (message.advices != null && message.advices.length) - for (var i = 0; i < message.advices.length; ++i) - $root.google.api.Advice.encode(message.advices[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + 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 ConfigChange message, length delimited. Does not implicitly {@link google.api.ConfigChange.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ConfigChange + * @memberof google.api.HttpRule * @static - * @param {google.api.IConfigChange} message ConfigChange message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConfigChange.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConfigChange message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ConfigChange + * @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.ConfigChange} ConfigChange + * @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 */ - ConfigChange.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ConfigChange(); + 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.element = reader.string(); + message.selector = reader.string(); break; case 2: - message.oldValue = reader.string(); + message.get = reader.string(); break; case 3: - message.newValue = reader.string(); + message.put = reader.string(); break; case 4: - message.changeType = reader.int32(); + message.post = reader.string(); break; case 5: - if (!(message.advices && message.advices.length)) - message.advices = []; - message.advices.push($root.google.api.Advice.decode(reader, reader.uint32())); + 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); @@ -9394,181 +9357,240 @@ }; /** - * Decodes a ConfigChange message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ConfigChange + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ConfigChange} ConfigChange + * @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 */ - ConfigChange.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConfigChange message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ConfigChange + * @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 */ - ConfigChange.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.element != null && message.hasOwnProperty("element")) - if (!$util.isString(message.element)) - return "element: string expected"; - if (message.oldValue != null && message.hasOwnProperty("oldValue")) - if (!$util.isString(message.oldValue)) - return "oldValue: string expected"; - if (message.newValue != null && message.hasOwnProperty("newValue")) - if (!$util.isString(message.newValue)) - return "newValue: string expected"; - if (message.changeType != null && message.hasOwnProperty("changeType")) - switch (message.changeType) { - default: - return "changeType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + 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.advices != null && message.hasOwnProperty("advices")) { - if (!Array.isArray(message.advices)) - return "advices: array expected"; - for (var i = 0; i < message.advices.length; ++i) { - var error = $root.google.api.Advice.verify(message.advices[i]); + } + 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 "advices." + error; + return "additionalBindings." + error; } } return null; }; /** - * Creates a ConfigChange message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ConfigChange + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ConfigChange} ConfigChange + * @returns {google.api.HttpRule} HttpRule */ - ConfigChange.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ConfigChange) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ConfigChange(); - if (object.element != null) - message.element = String(object.element); - if (object.oldValue != null) - message.oldValue = String(object.oldValue); - if (object.newValue != null) - message.newValue = String(object.newValue); - switch (object.changeType) { - case "CHANGE_TYPE_UNSPECIFIED": - case 0: - message.changeType = 0; - break; - case "ADDED": - case 1: - message.changeType = 1; - break; - case "REMOVED": - case 2: - message.changeType = 2; - break; - case "MODIFIED": - case 3: - message.changeType = 3; - break; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.advices) { - if (!Array.isArray(object.advices)) - throw TypeError(".google.api.ConfigChange.advices: array expected"); - message.advices = []; - for (var i = 0; i < object.advices.length; ++i) { - if (typeof object.advices[i] !== "object") - throw TypeError(".google.api.ConfigChange.advices: object expected"); - message.advices[i] = $root.google.api.Advice.fromObject(object.advices[i]); + 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 ConfigChange message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ConfigChange + * @memberof google.api.HttpRule * @static - * @param {google.api.ConfigChange} message ConfigChange + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConfigChange.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.advices = []; + object.additionalBindings = []; if (options.defaults) { - object.element = ""; - object.oldValue = ""; - object.newValue = ""; - object.changeType = options.enums === String ? "CHANGE_TYPE_UNSPECIFIED" : 0; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.element != null && message.hasOwnProperty("element")) - object.element = message.element; - if (message.oldValue != null && message.hasOwnProperty("oldValue")) - object.oldValue = message.oldValue; - if (message.newValue != null && message.hasOwnProperty("newValue")) - object.newValue = message.newValue; - if (message.changeType != null && message.hasOwnProperty("changeType")) - object.changeType = options.enums === String ? $root.google.api.ChangeType[message.changeType] : message.changeType; - if (message.advices && message.advices.length) { - object.advices = []; - for (var j = 0; j < message.advices.length; ++j) - object.advices[j] = $root.google.api.Advice.toObject(message.advices[j], options); + 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 ConfigChange to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ConfigChange + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ConfigChange.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ConfigChange; + return HttpRule; })(); - api.Advice = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of an Advice. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IAdvice - * @property {string|null} [description] Advice description + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new Advice. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents an Advice. - * @implements IAdvice + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IAdvice=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function Advice(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9576,75 +9598,88 @@ } /** - * Advice description. - * @member {string} description - * @memberof google.api.Advice + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - Advice.prototype.description = ""; + CustomHttpPattern.prototype.kind = ""; /** - * Creates a new Advice instance using the specified properties. + * 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.Advice + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IAdvice=} [properties] Properties to set - * @returns {google.api.Advice} Advice instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - Advice.create = function create(properties) { - return new Advice(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified Advice message. Does not implicitly {@link google.api.Advice.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.Advice + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IAdvice} message Advice message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Advice.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + 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 Advice message, length delimited. Does not implicitly {@link google.api.Advice.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Advice + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IAdvice} message Advice message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Advice.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Advice message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.Advice + * @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.Advice} Advice + * @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 */ - Advice.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Advice(); + 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.description = reader.string(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -9655,163 +9690,147 @@ }; /** - * Decodes an Advice message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Advice + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Advice} Advice + * @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 */ - Advice.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Advice message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.Advice + * @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 */ - Advice.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates an Advice message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Advice + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.Advice} Advice + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - Advice.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Advice) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.Advice(); - if (object.description != null) - message.description = String(object.description); + 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 an Advice message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Advice + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.Advice} message Advice + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Advice.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.description = ""; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + 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 Advice to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.Advice + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - Advice.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Advice; - })(); - - /** - * ChangeType enum. - * @name google.api.ChangeType - * @enum {number} - * @property {number} CHANGE_TYPE_UNSPECIFIED=0 CHANGE_TYPE_UNSPECIFIED value - * @property {number} ADDED=1 ADDED value - * @property {number} REMOVED=2 REMOVED value - * @property {number} MODIFIED=3 MODIFIED value - */ - api.ChangeType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CHANGE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADDED"] = 1; - values[valuesById[2] = "REMOVED"] = 2; - values[valuesById[3] = "MODIFIED"] = 3; - return values; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; + return CustomHttpPattern; })(); - api.MetricDescriptor = (function() { + api.Service = (function() { /** - * Properties of a MetricDescriptor. + * Properties of a Service. * @memberof google.api - * @interface IMetricDescriptor - * @property {string|null} [name] MetricDescriptor name - * @property {string|null} [type] MetricDescriptor type - * @property {Array.|null} [labels] MetricDescriptor labels - * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind - * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType - * @property {string|null} [unit] MetricDescriptor unit - * @property {string|null} [description] MetricDescriptor description - * @property {string|null} [displayName] MetricDescriptor displayName - * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage - * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes + * @interface IService + * @property {string|null} [name] Service name + * @property {string|null} [title] Service title + * @property {string|null} [producerProjectId] Service producerProjectId + * @property {string|null} [id] Service id + * @property {Array.|null} [apis] Service apis + * @property {Array.|null} [types] Service types + * @property {Array.|null} [enums] Service enums + * @property {google.api.IDocumentation|null} [documentation] Service documentation + * @property {google.api.IBackend|null} [backend] Service backend + * @property {google.api.IHttp|null} [http] Service http + * @property {google.api.IQuota|null} [quota] Service quota + * @property {google.api.IAuthentication|null} [authentication] Service authentication + * @property {google.api.IContext|null} [context] Service context + * @property {google.api.IUsage|null} [usage] Service usage + * @property {Array.|null} [endpoints] Service endpoints + * @property {google.api.IControl|null} [control] Service control + * @property {Array.|null} [logs] Service logs + * @property {Array.|null} [metrics] Service metrics + * @property {Array.|null} [monitoredResources] Service monitoredResources + * @property {google.api.IBilling|null} [billing] Service billing + * @property {google.api.ILogging|null} [logging] Service logging + * @property {google.api.IMonitoring|null} [monitoring] Service monitoring + * @property {google.api.ISystemParameters|null} [systemParameters] Service systemParameters + * @property {google.api.ISourceInfo|null} [sourceInfo] Service sourceInfo + * @property {google.protobuf.IUInt32Value|null} [configVersion] Service configVersion */ /** - * Constructs a new MetricDescriptor. + * Constructs a new Service. * @memberof google.api - * @classdesc Represents a MetricDescriptor. - * @implements IMetricDescriptor + * @classdesc Represents a Service. + * @implements IService * @constructor - * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @param {google.api.IService=} [properties] Properties to set */ - function MetricDescriptor(properties) { - this.labels = []; - this.monitoredResourceTypes = []; + function Service(properties) { + this.apis = []; + this.types = []; + this.enums = []; + this.endpoints = []; + this.logs = []; + this.metrics = []; + this.monitoredResources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9819,211 +9838,408 @@ } /** - * MetricDescriptor name. + * Service name. * @member {string} name - * @memberof google.api.MetricDescriptor + * @memberof google.api.Service * @instance */ - MetricDescriptor.prototype.name = ""; + Service.prototype.name = ""; /** - * MetricDescriptor type. - * @member {string} type - * @memberof google.api.MetricDescriptor + * Service title. + * @member {string} title + * @memberof google.api.Service * @instance */ - MetricDescriptor.prototype.type = ""; + Service.prototype.title = ""; /** - * MetricDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MetricDescriptor + * Service producerProjectId. + * @member {string} producerProjectId + * @memberof google.api.Service * @instance */ - MetricDescriptor.prototype.labels = $util.emptyArray; + Service.prototype.producerProjectId = ""; /** - * MetricDescriptor metricKind. - * @member {google.api.MetricDescriptor.MetricKind} metricKind - * @memberof google.api.MetricDescriptor + * Service id. + * @member {string} id + * @memberof google.api.Service * @instance */ - MetricDescriptor.prototype.metricKind = 0; + Service.prototype.id = ""; /** - * MetricDescriptor valueType. - * @member {google.api.MetricDescriptor.ValueType} valueType - * @memberof google.api.MetricDescriptor + * Service apis. + * @member {Array.} apis + * @memberof google.api.Service * @instance */ - MetricDescriptor.prototype.valueType = 0; + Service.prototype.apis = $util.emptyArray; /** - * MetricDescriptor unit. - * @member {string} unit - * @memberof google.api.MetricDescriptor + * Service types. + * @member {Array.} types + * @memberof google.api.Service * @instance */ - MetricDescriptor.prototype.unit = ""; + Service.prototype.types = $util.emptyArray; /** - * MetricDescriptor description. - * @member {string} description - * @memberof google.api.MetricDescriptor + * Service enums. + * @member {Array.} enums + * @memberof google.api.Service * @instance */ - MetricDescriptor.prototype.description = ""; + Service.prototype.enums = $util.emptyArray; /** - * MetricDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MetricDescriptor + * Service documentation. + * @member {google.api.IDocumentation|null|undefined} documentation + * @memberof google.api.Service * @instance */ - MetricDescriptor.prototype.displayName = ""; + Service.prototype.documentation = null; /** - * MetricDescriptor metadata. - * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata - * @memberof google.api.MetricDescriptor + * Service backend. + * @member {google.api.IBackend|null|undefined} backend + * @memberof google.api.Service * @instance */ - MetricDescriptor.prototype.metadata = null; + Service.prototype.backend = null; /** - * MetricDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor + * Service http. + * @member {google.api.IHttp|null|undefined} http + * @memberof google.api.Service * @instance */ - MetricDescriptor.prototype.launchStage = 0; + Service.prototype.http = null; /** - * MetricDescriptor monitoredResourceTypes. - * @member {Array.} monitoredResourceTypes - * @memberof google.api.MetricDescriptor + * Service quota. + * @member {google.api.IQuota|null|undefined} quota + * @memberof google.api.Service * @instance */ - MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; + Service.prototype.quota = null; /** - * Creates a new MetricDescriptor instance using the specified properties. - * @function create - * @memberof google.api.MetricDescriptor - * @static - * @param {google.api.IMetricDescriptor=} [properties] Properties to set - * @returns {google.api.MetricDescriptor} MetricDescriptor instance + * Service authentication. + * @member {google.api.IAuthentication|null|undefined} authentication + * @memberof google.api.Service + * @instance */ - MetricDescriptor.create = function create(properties) { - return new MetricDescriptor(properties); - }; + Service.prototype.authentication = null; /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.MetricDescriptor - * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Service context. + * @member {google.api.IContext|null|undefined} context + * @memberof google.api.Service + * @instance */ - MetricDescriptor.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.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); - if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); - if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) - for (var i = 0; i < message.monitoredResourceTypes.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); + Service.prototype.context = null; + + /** + * Service usage. + * @member {google.api.IUsage|null|undefined} usage + * @memberof google.api.Service + * @instance + */ + Service.prototype.usage = null; + + /** + * Service endpoints. + * @member {Array.} endpoints + * @memberof google.api.Service + * @instance + */ + Service.prototype.endpoints = $util.emptyArray; + + /** + * Service control. + * @member {google.api.IControl|null|undefined} control + * @memberof google.api.Service + * @instance + */ + Service.prototype.control = null; + + /** + * Service logs. + * @member {Array.} logs + * @memberof google.api.Service + * @instance + */ + Service.prototype.logs = $util.emptyArray; + + /** + * Service metrics. + * @member {Array.} metrics + * @memberof google.api.Service + * @instance + */ + Service.prototype.metrics = $util.emptyArray; + + /** + * Service monitoredResources. + * @member {Array.} monitoredResources + * @memberof google.api.Service + * @instance + */ + Service.prototype.monitoredResources = $util.emptyArray; + + /** + * Service billing. + * @member {google.api.IBilling|null|undefined} billing + * @memberof google.api.Service + * @instance + */ + Service.prototype.billing = null; + + /** + * Service logging. + * @member {google.api.ILogging|null|undefined} logging + * @memberof google.api.Service + * @instance + */ + Service.prototype.logging = null; + + /** + * Service monitoring. + * @member {google.api.IMonitoring|null|undefined} monitoring + * @memberof google.api.Service + * @instance + */ + Service.prototype.monitoring = null; + + /** + * Service systemParameters. + * @member {google.api.ISystemParameters|null|undefined} systemParameters + * @memberof google.api.Service + * @instance + */ + Service.prototype.systemParameters = null; + + /** + * Service sourceInfo. + * @member {google.api.ISourceInfo|null|undefined} sourceInfo + * @memberof google.api.Service + * @instance + */ + Service.prototype.sourceInfo = null; + + /** + * Service configVersion. + * @member {google.protobuf.IUInt32Value|null|undefined} configVersion + * @memberof google.api.Service + * @instance + */ + Service.prototype.configVersion = null; + + /** + * Creates a new Service instance using the specified properties. + * @function create + * @memberof google.api.Service + * @static + * @param {google.api.IService=} [properties] Properties to set + * @returns {google.api.Service} Service instance + */ + Service.create = function create(properties) { + return new Service(properties); + }; + + /** + * Encodes the specified Service message. Does not implicitly {@link google.api.Service.verify|verify} messages. + * @function encode + * @memberof google.api.Service + * @static + * @param {google.api.IService} message Service message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Service.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.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.apis != null && message.apis.length) + for (var i = 0; i < message.apis.length; ++i) + $root.google.protobuf.Api.encode(message.apis[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.types != null && message.types.length) + for (var i = 0; i < message.types.length; ++i) + $root.google.protobuf.Type.encode(message.types[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enums != null && message.enums.length) + for (var i = 0; i < message.enums.length; ++i) + $root.google.protobuf.Enum.encode(message.enums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.documentation != null && Object.hasOwnProperty.call(message, "documentation")) + $root.google.api.Documentation.encode(message.documentation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.backend != null && Object.hasOwnProperty.call(message, "backend")) + $root.google.api.Backend.encode(message.backend, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.http != null && Object.hasOwnProperty.call(message, "http")) + $root.google.api.Http.encode(message.http, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.quota != null && Object.hasOwnProperty.call(message, "quota")) + $root.google.api.Quota.encode(message.quota, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.authentication != null && Object.hasOwnProperty.call(message, "authentication")) + $root.google.api.Authentication.encode(message.authentication, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + $root.google.api.Context.encode(message.context, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.usage != null && Object.hasOwnProperty.call(message, "usage")) + $root.google.api.Usage.encode(message.usage, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.endpoints != null && message.endpoints.length) + for (var i = 0; i < message.endpoints.length; ++i) + $root.google.api.Endpoint.encode(message.endpoints[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.configVersion != null && Object.hasOwnProperty.call(message, "configVersion")) + $root.google.protobuf.UInt32Value.encode(message.configVersion, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.control != null && Object.hasOwnProperty.call(message, "control")) + $root.google.api.Control.encode(message.control, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.producerProjectId != null && Object.hasOwnProperty.call(message, "producerProjectId")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.producerProjectId); + if (message.logs != null && message.logs.length) + for (var i = 0; i < message.logs.length; ++i) + $root.google.api.LogDescriptor.encode(message.logs[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.api.MetricDescriptor.encode(message.metrics[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.monitoredResources != null && message.monitoredResources.length) + for (var i = 0; i < message.monitoredResources.length; ++i) + $root.google.api.MonitoredResourceDescriptor.encode(message.monitoredResources[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.billing != null && Object.hasOwnProperty.call(message, "billing")) + $root.google.api.Billing.encode(message.billing, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.logging != null && Object.hasOwnProperty.call(message, "logging")) + $root.google.api.Logging.encode(message.logging, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.monitoring != null && Object.hasOwnProperty.call(message, "monitoring")) + $root.google.api.Monitoring.encode(message.monitoring, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.systemParameters != null && Object.hasOwnProperty.call(message, "systemParameters")) + $root.google.api.SystemParameters.encode(message.systemParameters, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 33, wireType 2 =*/266).string(message.id); + if (message.sourceInfo != null && Object.hasOwnProperty.call(message, "sourceInfo")) + $root.google.api.SourceInfo.encode(message.sourceInfo, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); return writer; }; /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.api.Service.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MetricDescriptor + * @memberof google.api.Service * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {google.api.IService} message Service message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + Service.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetricDescriptor message from the specified reader or buffer. + * Decodes a Service message from the specified reader or buffer. * @function decode - * @memberof google.api.MetricDescriptor + * @memberof google.api.Service * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.api.Service} Service * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.decode = function decode(reader, length) { + Service.decode = function 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.MetricDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Service(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 8: - message.type = reader.string(); - break; case 2: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + message.title = reader.string(); + break; + case 22: + message.producerProjectId = reader.string(); + break; + case 33: + message.id = reader.string(); break; case 3: - message.metricKind = reader.int32(); + if (!(message.apis && message.apis.length)) + message.apis = []; + message.apis.push($root.google.protobuf.Api.decode(reader, reader.uint32())); break; case 4: - message.valueType = reader.int32(); + if (!(message.types && message.types.length)) + message.types = []; + message.types.push($root.google.protobuf.Type.decode(reader, reader.uint32())); break; case 5: - message.unit = reader.string(); + if (!(message.enums && message.enums.length)) + message.enums = []; + message.enums.push($root.google.protobuf.Enum.decode(reader, reader.uint32())); break; case 6: - message.description = reader.string(); + message.documentation = $root.google.api.Documentation.decode(reader, reader.uint32()); break; - case 7: - message.displayName = reader.string(); + case 8: + message.backend = $root.google.api.Backend.decode(reader, reader.uint32()); + break; + case 9: + message.http = $root.google.api.Http.decode(reader, reader.uint32()); break; case 10: - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); + message.quota = $root.google.api.Quota.decode(reader, reader.uint32()); break; - case 12: - message.launchStage = reader.int32(); + case 11: + message.authentication = $root.google.api.Authentication.decode(reader, reader.uint32()); break; - case 13: - if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) - message.monitoredResourceTypes = []; - message.monitoredResourceTypes.push(reader.string()); + case 12: + message.context = $root.google.api.Context.decode(reader, reader.uint32()); + break; + case 15: + message.usage = $root.google.api.Usage.decode(reader, reader.uint32()); + break; + case 18: + if (!(message.endpoints && message.endpoints.length)) + message.endpoints = []; + message.endpoints.push($root.google.api.Endpoint.decode(reader, reader.uint32())); + break; + case 21: + message.control = $root.google.api.Control.decode(reader, reader.uint32()); + break; + case 23: + if (!(message.logs && message.logs.length)) + message.logs = []; + message.logs.push($root.google.api.LogDescriptor.decode(reader, reader.uint32())); + break; + case 24: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); + break; + case 25: + if (!(message.monitoredResources && message.monitoredResources.length)) + message.monitoredResources = []; + message.monitoredResources.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); + break; + case 26: + message.billing = $root.google.api.Billing.decode(reader, reader.uint32()); + break; + case 27: + message.logging = $root.google.api.Logging.decode(reader, reader.uint32()); + break; + case 28: + message.monitoring = $root.google.api.Monitoring.decode(reader, reader.uint32()); + break; + case 29: + message.systemParameters = $root.google.api.SystemParameters.decode(reader, reader.uint32()); + break; + case 37: + message.sourceInfo = $root.google.api.SourceInfo.decode(reader, reader.uint32()); + break; + case 20: + message.configVersion = $root.google.protobuf.UInt32Value.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -10034,657 +10250,747 @@ }; /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Service message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MetricDescriptor + * @memberof google.api.Service * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.api.Service} Service * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { + Service.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetricDescriptor message. + * Verifies a Service message. * @function verify - * @memberof google.api.MetricDescriptor + * @memberof google.api.Service * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetricDescriptor.verify = function verify(message) { + Service.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.producerProjectId != null && message.hasOwnProperty("producerProjectId")) + if (!$util.isString(message.producerProjectId)) + return "producerProjectId: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string 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.protobuf.Api.verify(message.apis[i]); if (error) - return "labels." + error; + return "apis." + error; } } - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - switch (message.metricKind) { - default: - return "metricKind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) { + var error = $root.google.protobuf.Type.verify(message.types[i]); + if (error) + return "types." + error; } - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; + } + if (message.enums != null && message.hasOwnProperty("enums")) { + if (!Array.isArray(message.enums)) + return "enums: array expected"; + for (var i = 0; i < message.enums.length; ++i) { + var error = $root.google.protobuf.Enum.verify(message.enums[i]); + if (error) + return "enums." + error; } - if (message.unit != null && message.hasOwnProperty("unit")) - if (!$util.isString(message.unit)) - return "unit: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); + } + if (message.documentation != null && message.hasOwnProperty("documentation")) { + var error = $root.google.api.Documentation.verify(message.documentation); if (error) - return "metadata." + error; + return "documentation." + error; } - 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.backend != null && message.hasOwnProperty("backend")) { + var error = $root.google.api.Backend.verify(message.backend); + if (error) + return "backend." + error; + } + if (message.http != null && message.hasOwnProperty("http")) { + var error = $root.google.api.Http.verify(message.http); + if (error) + return "http." + error; + } + if (message.quota != null && message.hasOwnProperty("quota")) { + var error = $root.google.api.Quota.verify(message.quota); + if (error) + return "quota." + error; + } + if (message.authentication != null && message.hasOwnProperty("authentication")) { + var error = $root.google.api.Authentication.verify(message.authentication); + if (error) + return "authentication." + error; + } + if (message.context != null && message.hasOwnProperty("context")) { + var error = $root.google.api.Context.verify(message.context); + if (error) + return "context." + error; + } + if (message.usage != null && message.hasOwnProperty("usage")) { + var error = $root.google.api.Usage.verify(message.usage); + if (error) + return "usage." + error; + } + if (message.endpoints != null && message.hasOwnProperty("endpoints")) { + if (!Array.isArray(message.endpoints)) + return "endpoints: array expected"; + for (var i = 0; i < message.endpoints.length; ++i) { + var error = $root.google.api.Endpoint.verify(message.endpoints[i]); + if (error) + return "endpoints." + error; } - if (message.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { - if (!Array.isArray(message.monitoredResourceTypes)) - return "monitoredResourceTypes: array expected"; - for (var i = 0; i < message.monitoredResourceTypes.length; ++i) - if (!$util.isString(message.monitoredResourceTypes[i])) - return "monitoredResourceTypes: string[] expected"; + } + if (message.control != null && message.hasOwnProperty("control")) { + var error = $root.google.api.Control.verify(message.control); + if (error) + return "control." + error; + } + if (message.logs != null && message.hasOwnProperty("logs")) { + if (!Array.isArray(message.logs)) + return "logs: array expected"; + for (var i = 0; i < message.logs.length; ++i) { + var error = $root.google.api.LogDescriptor.verify(message.logs[i]); + if (error) + return "logs." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.api.MetricDescriptor.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.monitoredResources != null && message.hasOwnProperty("monitoredResources")) { + if (!Array.isArray(message.monitoredResources)) + return "monitoredResources: array expected"; + for (var i = 0; i < message.monitoredResources.length; ++i) { + var error = $root.google.api.MonitoredResourceDescriptor.verify(message.monitoredResources[i]); + if (error) + return "monitoredResources." + error; + } + } + if (message.billing != null && message.hasOwnProperty("billing")) { + var error = $root.google.api.Billing.verify(message.billing); + if (error) + return "billing." + error; + } + if (message.logging != null && message.hasOwnProperty("logging")) { + var error = $root.google.api.Logging.verify(message.logging); + if (error) + return "logging." + error; + } + if (message.monitoring != null && message.hasOwnProperty("monitoring")) { + var error = $root.google.api.Monitoring.verify(message.monitoring); + if (error) + return "monitoring." + error; + } + if (message.systemParameters != null && message.hasOwnProperty("systemParameters")) { + var error = $root.google.api.SystemParameters.verify(message.systemParameters); + if (error) + return "systemParameters." + error; + } + if (message.sourceInfo != null && message.hasOwnProperty("sourceInfo")) { + var error = $root.google.api.SourceInfo.verify(message.sourceInfo); + if (error) + return "sourceInfo." + error; + } + if (message.configVersion != null && message.hasOwnProperty("configVersion")) { + var error = $root.google.protobuf.UInt32Value.verify(message.configVersion); + if (error) + return "configVersion." + error; } return null; }; /** - * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Service message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MetricDescriptor + * @memberof google.api.Service * @static * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.api.Service} Service */ - MetricDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor) + Service.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Service) return object; - var message = new $root.google.api.MetricDescriptor(); + var message = new $root.google.api.Service(); if (object.name != null) message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MetricDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MetricDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + if (object.title != null) + message.title = String(object.title); + if (object.producerProjectId != null) + message.producerProjectId = String(object.producerProjectId); + if (object.id != null) + message.id = String(object.id); + if (object.apis) { + if (!Array.isArray(object.apis)) + throw TypeError(".google.api.Service.apis: array expected"); + message.apis = []; + for (var i = 0; i < object.apis.length; ++i) { + if (typeof object.apis[i] !== "object") + throw TypeError(".google.api.Service.apis: object expected"); + message.apis[i] = $root.google.protobuf.Api.fromObject(object.apis[i]); } } - switch (object.metricKind) { - case "METRIC_KIND_UNSPECIFIED": - case 0: - message.metricKind = 0; - break; - case "GAUGE": - case 1: - message.metricKind = 1; - break; - case "DELTA": - case 2: - message.metricKind = 2; - break; - case "CUMULATIVE": - case 3: - message.metricKind = 3; - break; + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.api.Service.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) { + if (typeof object.types[i] !== "object") + throw TypeError(".google.api.Service.types: object expected"); + message.types[i] = $root.google.protobuf.Type.fromObject(object.types[i]); + } } - switch (object.valueType) { - case "VALUE_TYPE_UNSPECIFIED": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - case "DOUBLE": - case 3: - message.valueType = 3; - break; - case "STRING": - case 4: - message.valueType = 4; - break; - case "DISTRIBUTION": - case 5: - message.valueType = 5; - break; - case "MONEY": - case 6: - message.valueType = 6; - break; + if (object.enums) { + if (!Array.isArray(object.enums)) + throw TypeError(".google.api.Service.enums: array expected"); + message.enums = []; + for (var i = 0; i < object.enums.length; ++i) { + if (typeof object.enums[i] !== "object") + throw TypeError(".google.api.Service.enums: object expected"); + message.enums[i] = $root.google.protobuf.Enum.fromObject(object.enums[i]); + } } - if (object.unit != null) - message.unit = String(object.unit); - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); + if (object.documentation != null) { + if (typeof object.documentation !== "object") + throw TypeError(".google.api.Service.documentation: object expected"); + message.documentation = $root.google.api.Documentation.fromObject(object.documentation); } - switch (object.launchStage) { - 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.backend != null) { + if (typeof object.backend !== "object") + throw TypeError(".google.api.Service.backend: object expected"); + message.backend = $root.google.api.Backend.fromObject(object.backend); } - if (object.monitoredResourceTypes) { - if (!Array.isArray(object.monitoredResourceTypes)) - throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); - message.monitoredResourceTypes = []; - for (var i = 0; i < object.monitoredResourceTypes.length; ++i) - message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); + if (object.http != null) { + if (typeof object.http !== "object") + throw TypeError(".google.api.Service.http: object expected"); + message.http = $root.google.api.Http.fromObject(object.http); + } + if (object.quota != null) { + if (typeof object.quota !== "object") + throw TypeError(".google.api.Service.quota: object expected"); + message.quota = $root.google.api.Quota.fromObject(object.quota); + } + if (object.authentication != null) { + if (typeof object.authentication !== "object") + throw TypeError(".google.api.Service.authentication: object expected"); + message.authentication = $root.google.api.Authentication.fromObject(object.authentication); + } + if (object.context != null) { + if (typeof object.context !== "object") + throw TypeError(".google.api.Service.context: object expected"); + message.context = $root.google.api.Context.fromObject(object.context); + } + if (object.usage != null) { + if (typeof object.usage !== "object") + throw TypeError(".google.api.Service.usage: object expected"); + message.usage = $root.google.api.Usage.fromObject(object.usage); + } + if (object.endpoints) { + if (!Array.isArray(object.endpoints)) + throw TypeError(".google.api.Service.endpoints: array expected"); + message.endpoints = []; + for (var i = 0; i < object.endpoints.length; ++i) { + if (typeof object.endpoints[i] !== "object") + throw TypeError(".google.api.Service.endpoints: object expected"); + message.endpoints[i] = $root.google.api.Endpoint.fromObject(object.endpoints[i]); + } + } + if (object.control != null) { + if (typeof object.control !== "object") + throw TypeError(".google.api.Service.control: object expected"); + message.control = $root.google.api.Control.fromObject(object.control); + } + if (object.logs) { + if (!Array.isArray(object.logs)) + throw TypeError(".google.api.Service.logs: array expected"); + message.logs = []; + for (var i = 0; i < object.logs.length; ++i) { + if (typeof object.logs[i] !== "object") + throw TypeError(".google.api.Service.logs: object expected"); + message.logs[i] = $root.google.api.LogDescriptor.fromObject(object.logs[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.api.Service.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.api.Service.metrics: object expected"); + message.metrics[i] = $root.google.api.MetricDescriptor.fromObject(object.metrics[i]); + } + } + if (object.monitoredResources) { + if (!Array.isArray(object.monitoredResources)) + throw TypeError(".google.api.Service.monitoredResources: array expected"); + message.monitoredResources = []; + for (var i = 0; i < object.monitoredResources.length; ++i) { + if (typeof object.monitoredResources[i] !== "object") + throw TypeError(".google.api.Service.monitoredResources: object expected"); + message.monitoredResources[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.monitoredResources[i]); + } + } + if (object.billing != null) { + if (typeof object.billing !== "object") + throw TypeError(".google.api.Service.billing: object expected"); + message.billing = $root.google.api.Billing.fromObject(object.billing); + } + if (object.logging != null) { + if (typeof object.logging !== "object") + throw TypeError(".google.api.Service.logging: object expected"); + message.logging = $root.google.api.Logging.fromObject(object.logging); + } + if (object.monitoring != null) { + if (typeof object.monitoring !== "object") + throw TypeError(".google.api.Service.monitoring: object expected"); + message.monitoring = $root.google.api.Monitoring.fromObject(object.monitoring); + } + if (object.systemParameters != null) { + if (typeof object.systemParameters !== "object") + throw TypeError(".google.api.Service.systemParameters: object expected"); + message.systemParameters = $root.google.api.SystemParameters.fromObject(object.systemParameters); + } + if (object.sourceInfo != null) { + if (typeof object.sourceInfo !== "object") + throw TypeError(".google.api.Service.sourceInfo: object expected"); + message.sourceInfo = $root.google.api.SourceInfo.fromObject(object.sourceInfo); + } + if (object.configVersion != null) { + if (typeof object.configVersion !== "object") + throw TypeError(".google.api.Service.configVersion: object expected"); + message.configVersion = $root.google.protobuf.UInt32Value.fromObject(object.configVersion); } return message; }; /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a Service message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MetricDescriptor + * @memberof google.api.Service * @static - * @param {google.api.MetricDescriptor} message MetricDescriptor + * @param {google.api.Service} message Service * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetricDescriptor.toObject = function toObject(message, options) { + Service.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.labels = []; - object.monitoredResourceTypes = []; + object.apis = []; + object.types = []; + object.enums = []; + object.endpoints = []; + object.logs = []; + object.metrics = []; + object.monitoredResources = []; } if (options.defaults) { object.name = ""; - object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; - object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; - object.unit = ""; - object.description = ""; - object.displayName = ""; - object.type = ""; - object.metadata = null; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.title = ""; + object.documentation = null; + object.backend = null; + object.http = null; + object.quota = null; + object.authentication = null; + object.context = null; + object.usage = null; + object.configVersion = null; + object.control = null; + object.producerProjectId = ""; + object.billing = null; + object.logging = null; + object.monitoring = null; + object.systemParameters = null; + object.id = ""; + object.sourceInfo = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.apis && message.apis.length) { + object.apis = []; + for (var j = 0; j < message.apis.length; ++j) + object.apis[j] = $root.google.protobuf.Api.toObject(message.apis[j], options); } - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; - if (message.unit != null && message.hasOwnProperty("unit")) - object.unit = message.unit; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { - object.monitoredResourceTypes = []; - for (var j = 0; j < message.monitoredResourceTypes.length; ++j) - object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = $root.google.protobuf.Type.toObject(message.types[j], options); + } + if (message.enums && message.enums.length) { + object.enums = []; + for (var j = 0; j < message.enums.length; ++j) + object.enums[j] = $root.google.protobuf.Enum.toObject(message.enums[j], options); + } + if (message.documentation != null && message.hasOwnProperty("documentation")) + object.documentation = $root.google.api.Documentation.toObject(message.documentation, options); + if (message.backend != null && message.hasOwnProperty("backend")) + object.backend = $root.google.api.Backend.toObject(message.backend, options); + if (message.http != null && message.hasOwnProperty("http")) + object.http = $root.google.api.Http.toObject(message.http, options); + if (message.quota != null && message.hasOwnProperty("quota")) + object.quota = $root.google.api.Quota.toObject(message.quota, options); + if (message.authentication != null && message.hasOwnProperty("authentication")) + object.authentication = $root.google.api.Authentication.toObject(message.authentication, options); + if (message.context != null && message.hasOwnProperty("context")) + object.context = $root.google.api.Context.toObject(message.context, options); + if (message.usage != null && message.hasOwnProperty("usage")) + object.usage = $root.google.api.Usage.toObject(message.usage, options); + if (message.endpoints && message.endpoints.length) { + object.endpoints = []; + for (var j = 0; j < message.endpoints.length; ++j) + object.endpoints[j] = $root.google.api.Endpoint.toObject(message.endpoints[j], options); } + if (message.configVersion != null && message.hasOwnProperty("configVersion")) + object.configVersion = $root.google.protobuf.UInt32Value.toObject(message.configVersion, options); + if (message.control != null && message.hasOwnProperty("control")) + object.control = $root.google.api.Control.toObject(message.control, options); + if (message.producerProjectId != null && message.hasOwnProperty("producerProjectId")) + object.producerProjectId = message.producerProjectId; + if (message.logs && message.logs.length) { + object.logs = []; + for (var j = 0; j < message.logs.length; ++j) + object.logs[j] = $root.google.api.LogDescriptor.toObject(message.logs[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.api.MetricDescriptor.toObject(message.metrics[j], options); + } + if (message.monitoredResources && message.monitoredResources.length) { + object.monitoredResources = []; + for (var j = 0; j < message.monitoredResources.length; ++j) + object.monitoredResources[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.monitoredResources[j], options); + } + if (message.billing != null && message.hasOwnProperty("billing")) + object.billing = $root.google.api.Billing.toObject(message.billing, options); + if (message.logging != null && message.hasOwnProperty("logging")) + object.logging = $root.google.api.Logging.toObject(message.logging, options); + if (message.monitoring != null && message.hasOwnProperty("monitoring")) + object.monitoring = $root.google.api.Monitoring.toObject(message.monitoring, options); + if (message.systemParameters != null && message.hasOwnProperty("systemParameters")) + object.systemParameters = $root.google.api.SystemParameters.toObject(message.systemParameters, options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.sourceInfo != null && message.hasOwnProperty("sourceInfo")) + object.sourceInfo = $root.google.api.SourceInfo.toObject(message.sourceInfo, options); return object; }; /** - * Converts this MetricDescriptor to JSON. + * Converts this Service to JSON. * @function toJSON - * @memberof google.api.MetricDescriptor + * @memberof google.api.Service * @instance * @returns {Object.} JSON object */ - MetricDescriptor.prototype.toJSON = function toJSON() { + Service.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - MetricDescriptor.MetricDescriptorMetadata = (function() { + return Service; + })(); - /** - * Properties of a MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @interface IMetricDescriptorMetadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage - * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod - * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay - */ + api.Authentication = (function() { - /** - * Constructs a new MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @classdesc Represents a MetricDescriptorMetadata. - * @implements IMetricDescriptorMetadata - * @constructor - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set - */ - function MetricDescriptorMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an Authentication. + * @memberof google.api + * @interface IAuthentication + * @property {Array.|null} [rules] Authentication rules + * @property {Array.|null} [providers] Authentication providers + */ - /** - * MetricDescriptorMetadata launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.launchStage = 0; + /** + * Constructs a new Authentication. + * @memberof google.api + * @classdesc Represents an Authentication. + * @implements IAuthentication + * @constructor + * @param {google.api.IAuthentication=} [properties] Properties to set + */ + function Authentication(properties) { + this.rules = []; + this.providers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * MetricDescriptorMetadata samplePeriod. - * @member {google.protobuf.IDuration|null|undefined} samplePeriod - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.samplePeriod = null; + /** + * Authentication rules. + * @member {Array.} rules + * @memberof google.api.Authentication + * @instance + */ + Authentication.prototype.rules = $util.emptyArray; - /** - * MetricDescriptorMetadata ingestDelay. - * @member {google.protobuf.IDuration|null|undefined} ingestDelay - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.ingestDelay = null; + /** + * Authentication providers. + * @member {Array.} providers + * @memberof google.api.Authentication + * @instance + */ + Authentication.prototype.providers = $util.emptyArray; - /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. - * @function create - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance - */ - MetricDescriptorMetadata.create = function create(properties) { - return new MetricDescriptorMetadata(properties); - }; + /** + * Creates a new Authentication instance using the specified properties. + * @function create + * @memberof google.api.Authentication + * @static + * @param {google.api.IAuthentication=} [properties] Properties to set + * @returns {google.api.Authentication} Authentication instance + */ + Authentication.create = function create(properties) { + return new Authentication(properties); + }; - /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @function encode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptorMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); - if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) - $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) - $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Authentication message. Does not implicitly {@link google.api.Authentication.verify|verify} messages. + * @function encode + * @memberof google.api.Authentication + * @static + * @param {google.api.IAuthentication} message Authentication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Authentication.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.AuthenticationRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.providers != null && message.providers.length) + for (var i = 0; i < message.providers.length; ++i) + $root.google.api.AuthProvider.encode(message.providers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Authentication message, length delimited. Does not implicitly {@link google.api.Authentication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Authentication + * @static + * @param {google.api.IAuthentication} message Authentication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Authentication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptorMetadata.decode = function 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.MetricDescriptor.MetricDescriptorMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.launchStage = reader.int32(); - break; - case 2: - message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes an Authentication message from the specified reader or buffer. + * @function decode + * @memberof google.api.Authentication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Authentication} Authentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Authentication.decode = function 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.Authentication(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.AuthenticationRule.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.providers && message.providers.length)) + message.providers = []; + message.providers.push($root.google.api.AuthProvider.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an Authentication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Authentication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Authentication} Authentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Authentication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a MetricDescriptorMetadata message. - * @function verify - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricDescriptorMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { - var error = $root.google.protobuf.Duration.verify(message.samplePeriod); + /** + * Verifies an Authentication message. + * @function verify + * @memberof google.api.Authentication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Authentication.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.AuthenticationRule.verify(message.rules[i]); if (error) - return "samplePeriod." + error; + return "rules." + error; } - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { - var error = $root.google.protobuf.Duration.verify(message.ingestDelay); + } + if (message.providers != null && message.hasOwnProperty("providers")) { + if (!Array.isArray(message.providers)) + return "providers: array expected"; + for (var i = 0; i < message.providers.length; ++i) { + var error = $root.google.api.AuthProvider.verify(message.providers[i]); if (error) - return "ingestDelay." + error; + return "providers." + error; } - return null; - }; + } + return null; + }; - /** - * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - */ - MetricDescriptorMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) - return object; - var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); - switch (object.launchStage) { - 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.samplePeriod != null) { - if (typeof object.samplePeriod !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); - message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); - } - if (object.ingestDelay != null) { - if (typeof object.ingestDelay !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); - message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); + /** + * Creates an Authentication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Authentication + * @static + * @param {Object.} object Plain object + * @returns {google.api.Authentication} Authentication + */ + Authentication.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Authentication) + return object; + var message = new $root.google.api.Authentication(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Authentication.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Authentication.rules: object expected"); + message.rules[i] = $root.google.api.AuthenticationRule.fromObject(object.rules[i]); } - return message; - }; - - /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricDescriptorMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.samplePeriod = null; - object.ingestDelay = null; + } + if (object.providers) { + if (!Array.isArray(object.providers)) + throw TypeError(".google.api.Authentication.providers: array expected"); + message.providers = []; + for (var i = 0; i < object.providers.length; ++i) { + if (typeof object.providers[i] !== "object") + throw TypeError(".google.api.Authentication.providers: object expected"); + message.providers[i] = $root.google.api.AuthProvider.fromObject(object.providers[i]); } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) - object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) - object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); - return object; - }; - - /** - * Converts this MetricDescriptorMetadata to JSON. - * @function toJSON - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - * @returns {Object.} JSON object - */ - MetricDescriptorMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MetricDescriptorMetadata; - })(); + } + return message; + }; /** - * MetricKind enum. - * @name google.api.MetricDescriptor.MetricKind - * @enum {number} - * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value - * @property {number} GAUGE=1 GAUGE value - * @property {number} DELTA=2 DELTA value - * @property {number} CUMULATIVE=3 CUMULATIVE value + * Creates a plain object from an Authentication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Authentication + * @static + * @param {google.api.Authentication} message Authentication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - MetricDescriptor.MetricKind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "GAUGE"] = 1; - values[valuesById[2] = "DELTA"] = 2; - values[valuesById[3] = "CUMULATIVE"] = 3; - return values; - })(); + Authentication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.rules = []; + object.providers = []; + } + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.AuthenticationRule.toObject(message.rules[j], options); + } + if (message.providers && message.providers.length) { + object.providers = []; + for (var j = 0; j < message.providers.length; ++j) + object.providers[j] = $root.google.api.AuthProvider.toObject(message.providers[j], options); + } + return object; + }; /** - * ValueType enum. - * @name google.api.MetricDescriptor.ValueType - * @enum {number} - * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - * @property {number} DOUBLE=3 DOUBLE value - * @property {number} STRING=4 STRING value - * @property {number} DISTRIBUTION=5 DISTRIBUTION value - * @property {number} MONEY=6 MONEY value + * Converts this Authentication to JSON. + * @function toJSON + * @memberof google.api.Authentication + * @instance + * @returns {Object.} JSON object */ - MetricDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - values[valuesById[3] = "DOUBLE"] = 3; - values[valuesById[4] = "STRING"] = 4; - values[valuesById[5] = "DISTRIBUTION"] = 5; - values[valuesById[6] = "MONEY"] = 6; - return values; - })(); + Authentication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MetricDescriptor; + return Authentication; })(); - api.Metric = (function() { + api.AuthenticationRule = (function() { /** - * Properties of a Metric. + * Properties of an AuthenticationRule. * @memberof google.api - * @interface IMetric - * @property {string|null} [type] Metric type - * @property {Object.|null} [labels] Metric labels + * @interface IAuthenticationRule + * @property {string|null} [selector] AuthenticationRule selector + * @property {google.api.IOAuthRequirements|null} [oauth] AuthenticationRule oauth + * @property {boolean|null} [allowWithoutCredential] AuthenticationRule allowWithoutCredential + * @property {Array.|null} [requirements] AuthenticationRule requirements */ /** - * Constructs a new Metric. + * Constructs a new AuthenticationRule. * @memberof google.api - * @classdesc Represents a Metric. - * @implements IMetric + * @classdesc Represents an AuthenticationRule. + * @implements IAuthenticationRule * @constructor - * @param {google.api.IMetric=} [properties] Properties to set + * @param {google.api.IAuthenticationRule=} [properties] Properties to set */ - function Metric(properties) { - this.labels = {}; + function AuthenticationRule(properties) { + this.requirements = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10692,108 +10998,117 @@ } /** - * Metric type. - * @member {string} type - * @memberof google.api.Metric + * AuthenticationRule selector. + * @member {string} selector + * @memberof google.api.AuthenticationRule * @instance */ - Metric.prototype.type = ""; + AuthenticationRule.prototype.selector = ""; /** - * Metric labels. - * @member {Object.} labels - * @memberof google.api.Metric + * AuthenticationRule oauth. + * @member {google.api.IOAuthRequirements|null|undefined} oauth + * @memberof google.api.AuthenticationRule * @instance */ - Metric.prototype.labels = $util.emptyObject; + AuthenticationRule.prototype.oauth = null; /** - * Creates a new Metric instance using the specified properties. + * AuthenticationRule allowWithoutCredential. + * @member {boolean} allowWithoutCredential + * @memberof google.api.AuthenticationRule + * @instance + */ + AuthenticationRule.prototype.allowWithoutCredential = false; + + /** + * AuthenticationRule requirements. + * @member {Array.} requirements + * @memberof google.api.AuthenticationRule + * @instance + */ + AuthenticationRule.prototype.requirements = $util.emptyArray; + + /** + * Creates a new AuthenticationRule instance using the specified properties. * @function create - * @memberof google.api.Metric + * @memberof google.api.AuthenticationRule * @static - * @param {google.api.IMetric=} [properties] Properties to set - * @returns {google.api.Metric} Metric instance + * @param {google.api.IAuthenticationRule=} [properties] Properties to set + * @returns {google.api.AuthenticationRule} AuthenticationRule instance */ - Metric.create = function create(properties) { - return new Metric(properties); + AuthenticationRule.create = function create(properties) { + return new AuthenticationRule(properties); }; /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * Encodes the specified AuthenticationRule message. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. * @function encode - * @memberof google.api.Metric + * @memberof google.api.AuthenticationRule * @static - * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {google.api.IAuthenticationRule} message AuthenticationRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metric.encode = function encode(message, writer) { + AuthenticationRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.oauth != null && Object.hasOwnProperty.call(message, "oauth")) + $root.google.api.OAuthRequirements.encode(message.oauth, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowWithoutCredential != null && Object.hasOwnProperty.call(message, "allowWithoutCredential")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowWithoutCredential); + if (message.requirements != null && message.requirements.length) + for (var i = 0; i < message.requirements.length; ++i) + $root.google.api.AuthRequirement.encode(message.requirements[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * Encodes the specified AuthenticationRule message, length delimited. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Metric + * @memberof google.api.AuthenticationRule * @static - * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {google.api.IAuthenticationRule} message AuthenticationRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { + AuthenticationRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Metric message from the specified reader or buffer. + * Decodes an AuthenticationRule message from the specified reader or buffer. * @function decode - * @memberof google.api.Metric + * @memberof google.api.AuthenticationRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Metric} Metric + * @returns {google.api.AuthenticationRule} AuthenticationRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metric.decode = function decode(reader, length) { + AuthenticationRule.decode = function 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.Metric(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.AuthenticationRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.type = reader.string(); + case 1: + message.selector = reader.string(); break; case 2: - 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; + message.oauth = $root.google.api.OAuthRequirements.decode(reader, reader.uint32()); + break; + case 5: + message.allowWithoutCredential = reader.bool(); + break; + case 7: + if (!(message.requirements && message.requirements.length)) + message.requirements = []; + message.requirements.push($root.google.api.AuthRequirement.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -10804,132 +11119,157 @@ }; /** - * Decodes a Metric message from the specified reader or buffer, length delimited. + * Decodes an AuthenticationRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Metric + * @memberof google.api.AuthenticationRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Metric} Metric + * @returns {google.api.AuthenticationRule} AuthenticationRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metric.decodeDelimited = function decodeDelimited(reader) { + AuthenticationRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Metric message. + * Verifies an AuthenticationRule message. * @function verify - * @memberof google.api.Metric + * @memberof google.api.AuthenticationRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Metric.verify = function verify(message) { + AuthenticationRule.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.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.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.oauth != null && message.hasOwnProperty("oauth")) { + var error = $root.google.api.OAuthRequirements.verify(message.oauth); + if (error) + return "oauth." + error; + } + if (message.allowWithoutCredential != null && message.hasOwnProperty("allowWithoutCredential")) + if (typeof message.allowWithoutCredential !== "boolean") + return "allowWithoutCredential: boolean expected"; + if (message.requirements != null && message.hasOwnProperty("requirements")) { + if (!Array.isArray(message.requirements)) + return "requirements: array expected"; + for (var i = 0; i < message.requirements.length; ++i) { + var error = $root.google.api.AuthRequirement.verify(message.requirements[i]); + if (error) + return "requirements." + error; + } } return null; }; /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * Creates an AuthenticationRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Metric + * @memberof google.api.AuthenticationRule * @static * @param {Object.} object Plain object - * @returns {google.api.Metric} Metric + * @returns {google.api.AuthenticationRule} AuthenticationRule */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Metric) + AuthenticationRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.AuthenticationRule) return object; - var message = new $root.google.api.Metric(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.Metric.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]]); + var message = new $root.google.api.AuthenticationRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.oauth != null) { + if (typeof object.oauth !== "object") + throw TypeError(".google.api.AuthenticationRule.oauth: object expected"); + message.oauth = $root.google.api.OAuthRequirements.fromObject(object.oauth); + } + if (object.allowWithoutCredential != null) + message.allowWithoutCredential = Boolean(object.allowWithoutCredential); + if (object.requirements) { + if (!Array.isArray(object.requirements)) + throw TypeError(".google.api.AuthenticationRule.requirements: array expected"); + message.requirements = []; + for (var i = 0; i < object.requirements.length; ++i) { + if (typeof object.requirements[i] !== "object") + throw TypeError(".google.api.AuthenticationRule.requirements: object expected"); + message.requirements[i] = $root.google.api.AuthRequirement.fromObject(object.requirements[i]); + } } return message; }; /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. + * Creates a plain object from an AuthenticationRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Metric + * @memberof google.api.AuthenticationRule * @static - * @param {google.api.Metric} message Metric + * @param {google.api.AuthenticationRule} message AuthenticationRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Metric.toObject = function toObject(message, options) { + AuthenticationRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) - object.type = ""; - 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 (options.arrays || options.defaults) + object.requirements = []; + if (options.defaults) { + object.selector = ""; + object.oauth = null; + object.allowWithoutCredential = false; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.oauth != null && message.hasOwnProperty("oauth")) + object.oauth = $root.google.api.OAuthRequirements.toObject(message.oauth, options); + if (message.allowWithoutCredential != null && message.hasOwnProperty("allowWithoutCredential")) + object.allowWithoutCredential = message.allowWithoutCredential; + if (message.requirements && message.requirements.length) { + object.requirements = []; + for (var j = 0; j < message.requirements.length; ++j) + object.requirements[j] = $root.google.api.AuthRequirement.toObject(message.requirements[j], options); } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; return object; }; /** - * Converts this Metric to JSON. + * Converts this AuthenticationRule to JSON. * @function toJSON - * @memberof google.api.Metric + * @memberof google.api.AuthenticationRule * @instance * @returns {Object.} JSON object */ - Metric.prototype.toJSON = function toJSON() { + AuthenticationRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Metric; + return AuthenticationRule; })(); - api.LabelDescriptor = (function() { + api.JwtLocation = (function() { /** - * Properties of a LabelDescriptor. + * Properties of a JwtLocation. * @memberof google.api - * @interface ILabelDescriptor - * @property {string|null} [key] LabelDescriptor key - * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType - * @property {string|null} [description] LabelDescriptor description + * @interface IJwtLocation + * @property {string|null} [header] JwtLocation header + * @property {string|null} [query] JwtLocation query + * @property {string|null} [valuePrefix] JwtLocation valuePrefix */ /** - * Constructs a new LabelDescriptor. + * Constructs a new JwtLocation. * @memberof google.api - * @classdesc Represents a LabelDescriptor. - * @implements ILabelDescriptor + * @classdesc Represents a JwtLocation. + * @implements IJwtLocation * @constructor - * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @param {google.api.IJwtLocation=} [properties] Properties to set */ - function LabelDescriptor(properties) { + function JwtLocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10937,101 +11277,115 @@ } /** - * LabelDescriptor key. - * @member {string} key - * @memberof google.api.LabelDescriptor + * JwtLocation header. + * @member {string|null|undefined} header + * @memberof google.api.JwtLocation * @instance */ - LabelDescriptor.prototype.key = ""; + JwtLocation.prototype.header = null; /** - * LabelDescriptor valueType. - * @member {google.api.LabelDescriptor.ValueType} valueType - * @memberof google.api.LabelDescriptor + * JwtLocation query. + * @member {string|null|undefined} query + * @memberof google.api.JwtLocation * @instance */ - LabelDescriptor.prototype.valueType = 0; + JwtLocation.prototype.query = null; /** - * LabelDescriptor description. - * @member {string} description - * @memberof google.api.LabelDescriptor + * JwtLocation valuePrefix. + * @member {string} valuePrefix + * @memberof google.api.JwtLocation * @instance */ - LabelDescriptor.prototype.description = ""; + JwtLocation.prototype.valuePrefix = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new LabelDescriptor instance using the specified properties. + * JwtLocation in. + * @member {"header"|"query"|undefined} in_ + * @memberof google.api.JwtLocation + * @instance + */ + Object.defineProperty(JwtLocation.prototype, "in", { + get: $util.oneOfGetter($oneOfFields = ["header", "query"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new JwtLocation instance using the specified properties. * @function create - * @memberof google.api.LabelDescriptor + * @memberof google.api.JwtLocation * @static - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - * @returns {google.api.LabelDescriptor} LabelDescriptor instance + * @param {google.api.IJwtLocation=} [properties] Properties to set + * @returns {google.api.JwtLocation} JwtLocation instance */ - LabelDescriptor.create = function create(properties) { - return new LabelDescriptor(properties); + JwtLocation.create = function create(properties) { + return new JwtLocation(properties); }; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified JwtLocation message. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. * @function encode - * @memberof google.api.LabelDescriptor + * @memberof google.api.JwtLocation * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.IJwtLocation} message JwtLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encode = function encode(message, writer) { + JwtLocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.header); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.valuePrefix != null && Object.hasOwnProperty.call(message, "valuePrefix")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.valuePrefix); return writer; }; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified JwtLocation message, length delimited. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.JwtLocation * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.IJwtLocation} message JwtLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + JwtLocation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a JwtLocation message from the specified reader or buffer. * @function decode - * @memberof google.api.LabelDescriptor + * @memberof google.api.JwtLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.JwtLocation} JwtLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decode = function decode(reader, length) { + JwtLocation.decode = function 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.LabelDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JwtLocation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.key = reader.string(); + message.header = reader.string(); break; case 2: - message.valueType = reader.int32(); + message.query = reader.string(); break; case 3: - message.description = reader.string(); + message.valuePrefix = reader.string(); break; default: reader.skipType(tag & 7); @@ -11042,187 +11396,140 @@ }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a JwtLocation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.JwtLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.JwtLocation} JwtLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + JwtLocation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LabelDescriptor message. + * Verifies a JwtLocation message. * @function verify - * @memberof google.api.LabelDescriptor + * @memberof google.api.JwtLocation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LabelDescriptor.verify = function verify(message) { + JwtLocation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + var properties = {}; + if (message.header != null && message.hasOwnProperty("header")) { + properties["in"] = 1; + if (!$util.isString(message.header)) + return "header: string expected"; + } + if (message.query != null && message.hasOwnProperty("query")) { + if (properties["in"] === 1) + return "in: multiple values"; + properties["in"] = 1; + if (!$util.isString(message.query)) + return "query: string expected"; + } + if (message.valuePrefix != null && message.hasOwnProperty("valuePrefix")) + if (!$util.isString(message.valuePrefix)) + return "valuePrefix: string expected"; return null; }; /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a JwtLocation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.JwtLocation * @static * @param {Object.} object Plain object - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.JwtLocation} JwtLocation */ - LabelDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LabelDescriptor) + JwtLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JwtLocation) return object; - var message = new $root.google.api.LabelDescriptor(); - if (object.key != null) - message.key = String(object.key); - switch (object.valueType) { - case "STRING": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - } - if (object.description != null) - message.description = String(object.description); + var message = new $root.google.api.JwtLocation(); + if (object.header != null) + message.header = String(object.header); + if (object.query != null) + message.query = String(object.query); + if (object.valuePrefix != null) + message.valuePrefix = String(object.valuePrefix); return message; }; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a JwtLocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.JwtLocation * @static - * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {google.api.JwtLocation} message JwtLocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LabelDescriptor.toObject = function toObject(message, options) { + JwtLocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.key = ""; - object.valueType = options.enums === String ? "STRING" : 0; - object.description = ""; + if (options.defaults) + object.valuePrefix = ""; + if (message.header != null && message.hasOwnProperty("header")) { + object.header = message.header; + if (options.oneofs) + object["in"] = "header"; } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = message.query; + if (options.oneofs) + object["in"] = "query"; + } + if (message.valuePrefix != null && message.hasOwnProperty("valuePrefix")) + object.valuePrefix = message.valuePrefix; return object; }; /** - * Converts this LabelDescriptor to JSON. + * Converts this JwtLocation to JSON. * @function toJSON - * @memberof google.api.LabelDescriptor + * @memberof google.api.JwtLocation * @instance * @returns {Object.} JSON object */ - LabelDescriptor.prototype.toJSON = function toJSON() { + JwtLocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ValueType enum. - * @name google.api.LabelDescriptor.ValueType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - */ - LabelDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - return values; - })(); - - return LabelDescriptor; - })(); - - /** - * 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; + return JwtLocation; })(); - api.Quota = (function() { + api.AuthProvider = (function() { /** - * Properties of a Quota. + * Properties of an AuthProvider. * @memberof google.api - * @interface IQuota - * @property {Array.|null} [limits] Quota limits - * @property {Array.|null} [metricRules] Quota metricRules + * @interface IAuthProvider + * @property {string|null} [id] AuthProvider id + * @property {string|null} [issuer] AuthProvider issuer + * @property {string|null} [jwksUri] AuthProvider jwksUri + * @property {string|null} [audiences] AuthProvider audiences + * @property {string|null} [authorizationUrl] AuthProvider authorizationUrl + * @property {Array.|null} [jwtLocations] AuthProvider jwtLocations */ /** - * Constructs a new Quota. + * Constructs a new AuthProvider. * @memberof google.api - * @classdesc Represents a Quota. - * @implements IQuota + * @classdesc Represents an AuthProvider. + * @implements IAuthProvider * @constructor - * @param {google.api.IQuota=} [properties] Properties to set + * @param {google.api.IAuthProvider=} [properties] Properties to set */ - function Quota(properties) { - this.limits = []; - this.metricRules = []; + function AuthProvider(properties) { + this.jwtLocations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11230,94 +11537,143 @@ } /** - * Quota limits. - * @member {Array.} limits - * @memberof google.api.Quota + * AuthProvider id. + * @member {string} id + * @memberof google.api.AuthProvider * @instance */ - Quota.prototype.limits = $util.emptyArray; + AuthProvider.prototype.id = ""; /** - * Quota metricRules. - * @member {Array.} metricRules - * @memberof google.api.Quota + * AuthProvider issuer. + * @member {string} issuer + * @memberof google.api.AuthProvider * @instance */ - Quota.prototype.metricRules = $util.emptyArray; + AuthProvider.prototype.issuer = ""; /** - * Creates a new Quota instance using the specified properties. - * @function create - * @memberof google.api.Quota - * @static - * @param {google.api.IQuota=} [properties] Properties to set - * @returns {google.api.Quota} Quota instance + * AuthProvider jwksUri. + * @member {string} jwksUri + * @memberof google.api.AuthProvider + * @instance */ - Quota.create = function create(properties) { - return new Quota(properties); - }; + AuthProvider.prototype.jwksUri = ""; /** - * Encodes the specified Quota message. Does not implicitly {@link google.api.Quota.verify|verify} messages. - * @function encode - * @memberof google.api.Quota - * @static - * @param {google.api.IQuota} message Quota message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * AuthProvider audiences. + * @member {string} audiences + * @memberof google.api.AuthProvider + * @instance */ - Quota.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.limits != null && message.limits.length) - for (var i = 0; i < message.limits.length; ++i) - $root.google.api.QuotaLimit.encode(message.limits[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.metricRules != null && message.metricRules.length) - for (var i = 0; i < message.metricRules.length; ++i) - $root.google.api.MetricRule.encode(message.metricRules[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + AuthProvider.prototype.audiences = ""; + + /** + * AuthProvider authorizationUrl. + * @member {string} authorizationUrl + * @memberof google.api.AuthProvider + * @instance + */ + AuthProvider.prototype.authorizationUrl = ""; + + /** + * AuthProvider jwtLocations. + * @member {Array.} jwtLocations + * @memberof google.api.AuthProvider + * @instance + */ + AuthProvider.prototype.jwtLocations = $util.emptyArray; + + /** + * Creates a new AuthProvider instance using the specified properties. + * @function create + * @memberof google.api.AuthProvider + * @static + * @param {google.api.IAuthProvider=} [properties] Properties to set + * @returns {google.api.AuthProvider} AuthProvider instance + */ + AuthProvider.create = function create(properties) { + return new AuthProvider(properties); + }; + + /** + * Encodes the specified AuthProvider message. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. + * @function encode + * @memberof google.api.AuthProvider + * @static + * @param {google.api.IAuthProvider} message AuthProvider message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthProvider.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.issuer); + if (message.jwksUri != null && Object.hasOwnProperty.call(message, "jwksUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jwksUri); + if (message.audiences != null && Object.hasOwnProperty.call(message, "audiences")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.audiences); + if (message.authorizationUrl != null && Object.hasOwnProperty.call(message, "authorizationUrl")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.authorizationUrl); + if (message.jwtLocations != null && message.jwtLocations.length) + for (var i = 0; i < message.jwtLocations.length; ++i) + $root.google.api.JwtLocation.encode(message.jwtLocations[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Quota message, length delimited. Does not implicitly {@link google.api.Quota.verify|verify} messages. + * Encodes the specified AuthProvider message, length delimited. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Quota + * @memberof google.api.AuthProvider * @static - * @param {google.api.IQuota} message Quota message or plain object to encode + * @param {google.api.IAuthProvider} message AuthProvider message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Quota.encodeDelimited = function encodeDelimited(message, writer) { + AuthProvider.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Quota message from the specified reader or buffer. + * Decodes an AuthProvider message from the specified reader or buffer. * @function decode - * @memberof google.api.Quota + * @memberof google.api.AuthProvider * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Quota} Quota + * @returns {google.api.AuthProvider} AuthProvider * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Quota.decode = function decode(reader, length) { + AuthProvider.decode = function 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.Quota(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.AuthProvider(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.issuer = reader.string(); + break; case 3: - if (!(message.limits && message.limits.length)) - message.limits = []; - message.limits.push($root.google.api.QuotaLimit.decode(reader, reader.uint32())); + message.jwksUri = reader.string(); break; case 4: - if (!(message.metricRules && message.metricRules.length)) - message.metricRules = []; - message.metricRules.push($root.google.api.MetricRule.decode(reader, reader.uint32())); + message.audiences = reader.string(); + break; + case 5: + message.authorizationUrl = reader.string(); + break; + case 6: + if (!(message.jwtLocations && message.jwtLocations.length)) + message.jwtLocations = []; + message.jwtLocations.push($root.google.api.JwtLocation.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -11328,152 +11684,166 @@ }; /** - * Decodes a Quota message from the specified reader or buffer, length delimited. + * Decodes an AuthProvider message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Quota + * @memberof google.api.AuthProvider * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Quota} Quota + * @returns {google.api.AuthProvider} AuthProvider * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Quota.decodeDelimited = function decodeDelimited(reader) { + AuthProvider.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Quota message. + * Verifies an AuthProvider message. * @function verify - * @memberof google.api.Quota + * @memberof google.api.AuthProvider * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Quota.verify = function verify(message) { + AuthProvider.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.limits != null && message.hasOwnProperty("limits")) { - if (!Array.isArray(message.limits)) - return "limits: array expected"; - for (var i = 0; i < message.limits.length; ++i) { - var error = $root.google.api.QuotaLimit.verify(message.limits[i]); - if (error) - return "limits." + error; - } - } - if (message.metricRules != null && message.hasOwnProperty("metricRules")) { - if (!Array.isArray(message.metricRules)) - return "metricRules: array expected"; - for (var i = 0; i < message.metricRules.length; ++i) { - var error = $root.google.api.MetricRule.verify(message.metricRules[i]); + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.issuer != null && message.hasOwnProperty("issuer")) + if (!$util.isString(message.issuer)) + return "issuer: string expected"; + if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) + if (!$util.isString(message.jwksUri)) + return "jwksUri: string expected"; + if (message.audiences != null && message.hasOwnProperty("audiences")) + if (!$util.isString(message.audiences)) + return "audiences: string expected"; + if (message.authorizationUrl != null && message.hasOwnProperty("authorizationUrl")) + if (!$util.isString(message.authorizationUrl)) + return "authorizationUrl: string expected"; + if (message.jwtLocations != null && message.hasOwnProperty("jwtLocations")) { + if (!Array.isArray(message.jwtLocations)) + return "jwtLocations: array expected"; + for (var i = 0; i < message.jwtLocations.length; ++i) { + var error = $root.google.api.JwtLocation.verify(message.jwtLocations[i]); if (error) - return "metricRules." + error; + return "jwtLocations." + error; } } return null; }; /** - * Creates a Quota message from a plain object. Also converts values to their respective internal types. + * Creates an AuthProvider message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Quota + * @memberof google.api.AuthProvider * @static * @param {Object.} object Plain object - * @returns {google.api.Quota} Quota + * @returns {google.api.AuthProvider} AuthProvider */ - Quota.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Quota) + AuthProvider.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.AuthProvider) return object; - var message = new $root.google.api.Quota(); - if (object.limits) { - if (!Array.isArray(object.limits)) - throw TypeError(".google.api.Quota.limits: array expected"); - message.limits = []; - for (var i = 0; i < object.limits.length; ++i) { - if (typeof object.limits[i] !== "object") - throw TypeError(".google.api.Quota.limits: object expected"); - message.limits[i] = $root.google.api.QuotaLimit.fromObject(object.limits[i]); - } - } - if (object.metricRules) { - if (!Array.isArray(object.metricRules)) - throw TypeError(".google.api.Quota.metricRules: array expected"); - message.metricRules = []; - for (var i = 0; i < object.metricRules.length; ++i) { - if (typeof object.metricRules[i] !== "object") - throw TypeError(".google.api.Quota.metricRules: object expected"); - message.metricRules[i] = $root.google.api.MetricRule.fromObject(object.metricRules[i]); + var message = new $root.google.api.AuthProvider(); + if (object.id != null) + message.id = String(object.id); + if (object.issuer != null) + message.issuer = String(object.issuer); + if (object.jwksUri != null) + message.jwksUri = String(object.jwksUri); + if (object.audiences != null) + message.audiences = String(object.audiences); + if (object.authorizationUrl != null) + message.authorizationUrl = String(object.authorizationUrl); + if (object.jwtLocations) { + if (!Array.isArray(object.jwtLocations)) + throw TypeError(".google.api.AuthProvider.jwtLocations: array expected"); + message.jwtLocations = []; + for (var i = 0; i < object.jwtLocations.length; ++i) { + if (typeof object.jwtLocations[i] !== "object") + throw TypeError(".google.api.AuthProvider.jwtLocations: object expected"); + message.jwtLocations[i] = $root.google.api.JwtLocation.fromObject(object.jwtLocations[i]); } } return message; }; /** - * Creates a plain object from a Quota message. Also converts values to other types if specified. + * Creates a plain object from an AuthProvider message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Quota + * @memberof google.api.AuthProvider * @static - * @param {google.api.Quota} message Quota + * @param {google.api.AuthProvider} message AuthProvider * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Quota.toObject = function toObject(message, options) { + AuthProvider.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.limits = []; - object.metricRules = []; - } - if (message.limits && message.limits.length) { - object.limits = []; - for (var j = 0; j < message.limits.length; ++j) - object.limits[j] = $root.google.api.QuotaLimit.toObject(message.limits[j], options); + if (options.arrays || options.defaults) + object.jwtLocations = []; + if (options.defaults) { + object.id = ""; + object.issuer = ""; + object.jwksUri = ""; + object.audiences = ""; + object.authorizationUrl = ""; } - if (message.metricRules && message.metricRules.length) { - object.metricRules = []; - for (var j = 0; j < message.metricRules.length; ++j) - object.metricRules[j] = $root.google.api.MetricRule.toObject(message.metricRules[j], options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.issuer != null && message.hasOwnProperty("issuer")) + object.issuer = message.issuer; + if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) + object.jwksUri = message.jwksUri; + if (message.audiences != null && message.hasOwnProperty("audiences")) + object.audiences = message.audiences; + if (message.authorizationUrl != null && message.hasOwnProperty("authorizationUrl")) + object.authorizationUrl = message.authorizationUrl; + if (message.jwtLocations && message.jwtLocations.length) { + object.jwtLocations = []; + for (var j = 0; j < message.jwtLocations.length; ++j) + object.jwtLocations[j] = $root.google.api.JwtLocation.toObject(message.jwtLocations[j], options); } return object; }; /** - * Converts this Quota to JSON. + * Converts this AuthProvider to JSON. * @function toJSON - * @memberof google.api.Quota + * @memberof google.api.AuthProvider * @instance * @returns {Object.} JSON object */ - Quota.prototype.toJSON = function toJSON() { + AuthProvider.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Quota; + return AuthProvider; })(); - api.MetricRule = (function() { + api.OAuthRequirements = (function() { /** - * Properties of a MetricRule. + * Properties of a OAuthRequirements. * @memberof google.api - * @interface IMetricRule - * @property {string|null} [selector] MetricRule selector - * @property {Object.|null} [metricCosts] MetricRule metricCosts - */ + * @interface IOAuthRequirements + * @property {string|null} [canonicalScopes] OAuthRequirements canonicalScopes + */ /** - * Constructs a new MetricRule. + * Constructs a new OAuthRequirements. * @memberof google.api - * @classdesc Represents a MetricRule. - * @implements IMetricRule + * @classdesc Represents a OAuthRequirements. + * @implements IOAuthRequirements * @constructor - * @param {google.api.IMetricRule=} [properties] Properties to set + * @param {google.api.IOAuthRequirements=} [properties] Properties to set */ - function MetricRule(properties) { - this.metricCosts = {}; + function OAuthRequirements(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11481,108 +11851,75 @@ } /** - * MetricRule selector. - * @member {string} selector - * @memberof google.api.MetricRule - * @instance - */ - MetricRule.prototype.selector = ""; - - /** - * MetricRule metricCosts. - * @member {Object.} metricCosts - * @memberof google.api.MetricRule + * OAuthRequirements canonicalScopes. + * @member {string} canonicalScopes + * @memberof google.api.OAuthRequirements * @instance */ - MetricRule.prototype.metricCosts = $util.emptyObject; + OAuthRequirements.prototype.canonicalScopes = ""; /** - * Creates a new MetricRule instance using the specified properties. + * Creates a new OAuthRequirements instance using the specified properties. * @function create - * @memberof google.api.MetricRule + * @memberof google.api.OAuthRequirements * @static - * @param {google.api.IMetricRule=} [properties] Properties to set - * @returns {google.api.MetricRule} MetricRule instance + * @param {google.api.IOAuthRequirements=} [properties] Properties to set + * @returns {google.api.OAuthRequirements} OAuthRequirements instance */ - MetricRule.create = function create(properties) { - return new MetricRule(properties); + OAuthRequirements.create = function create(properties) { + return new OAuthRequirements(properties); }; /** - * Encodes the specified MetricRule message. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. + * Encodes the specified OAuthRequirements message. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. * @function encode - * @memberof google.api.MetricRule + * @memberof google.api.OAuthRequirements * @static - * @param {google.api.IMetricRule} message MetricRule message or plain object to encode + * @param {google.api.IOAuthRequirements} message OAuthRequirements message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricRule.encode = function encode(message, writer) { + OAuthRequirements.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.metricCosts != null && Object.hasOwnProperty.call(message, "metricCosts")) - for (var keys = Object.keys(message.metricCosts), 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 0 =*/16).int64(message.metricCosts[keys[i]]).ldelim(); + if (message.canonicalScopes != null && Object.hasOwnProperty.call(message, "canonicalScopes")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.canonicalScopes); return writer; }; /** - * Encodes the specified MetricRule message, length delimited. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. + * Encodes the specified OAuthRequirements message, length delimited. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MetricRule + * @memberof google.api.OAuthRequirements * @static - * @param {google.api.IMetricRule} message MetricRule message or plain object to encode + * @param {google.api.IOAuthRequirements} message OAuthRequirements message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricRule.encodeDelimited = function encodeDelimited(message, writer) { + OAuthRequirements.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetricRule message from the specified reader or buffer. + * Decodes a OAuthRequirements message from the specified reader or buffer. * @function decode - * @memberof google.api.MetricRule + * @memberof google.api.OAuthRequirements * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricRule} MetricRule + * @returns {google.api.OAuthRequirements} OAuthRequirements * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricRule.decode = function decode(reader, length) { + OAuthRequirements.decode = function 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.MetricRule(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.OAuthRequirements(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); - break; - case 2: - if (message.metricCosts === $util.emptyObject) - message.metricCosts = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int64(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metricCosts[key] = value; + message.canonicalScopes = reader.string(); break; default: reader.skipType(tag & 7); @@ -11593,150 +11930,108 @@ }; /** - * Decodes a MetricRule message from the specified reader or buffer, length delimited. + * Decodes a OAuthRequirements message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MetricRule + * @memberof google.api.OAuthRequirements * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricRule} MetricRule + * @returns {google.api.OAuthRequirements} OAuthRequirements * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricRule.decodeDelimited = function decodeDelimited(reader) { + OAuthRequirements.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetricRule message. + * Verifies a OAuthRequirements message. * @function verify - * @memberof google.api.MetricRule + * @memberof google.api.OAuthRequirements * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetricRule.verify = function verify(message) { + OAuthRequirements.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.metricCosts != null && message.hasOwnProperty("metricCosts")) { - if (!$util.isObject(message.metricCosts)) - return "metricCosts: object expected"; - var key = Object.keys(message.metricCosts); - for (var i = 0; i < key.length; ++i) - if (!$util.isInteger(message.metricCosts[key[i]]) && !(message.metricCosts[key[i]] && $util.isInteger(message.metricCosts[key[i]].low) && $util.isInteger(message.metricCosts[key[i]].high))) - return "metricCosts: integer|Long{k:string} expected"; - } + if (message.canonicalScopes != null && message.hasOwnProperty("canonicalScopes")) + if (!$util.isString(message.canonicalScopes)) + return "canonicalScopes: string expected"; return null; }; /** - * Creates a MetricRule message from a plain object. Also converts values to their respective internal types. + * Creates a OAuthRequirements message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MetricRule + * @memberof google.api.OAuthRequirements * @static * @param {Object.} object Plain object - * @returns {google.api.MetricRule} MetricRule + * @returns {google.api.OAuthRequirements} OAuthRequirements */ - MetricRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricRule) + OAuthRequirements.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.OAuthRequirements) return object; - var message = new $root.google.api.MetricRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.metricCosts) { - if (typeof object.metricCosts !== "object") - throw TypeError(".google.api.MetricRule.metricCosts: object expected"); - message.metricCosts = {}; - for (var keys = Object.keys(object.metricCosts), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.metricCosts[keys[i]] = $util.Long.fromValue(object.metricCosts[keys[i]])).unsigned = false; - else if (typeof object.metricCosts[keys[i]] === "string") - message.metricCosts[keys[i]] = parseInt(object.metricCosts[keys[i]], 10); - else if (typeof object.metricCosts[keys[i]] === "number") - message.metricCosts[keys[i]] = object.metricCosts[keys[i]]; - else if (typeof object.metricCosts[keys[i]] === "object") - message.metricCosts[keys[i]] = new $util.LongBits(object.metricCosts[keys[i]].low >>> 0, object.metricCosts[keys[i]].high >>> 0).toNumber(); - } + var message = new $root.google.api.OAuthRequirements(); + if (object.canonicalScopes != null) + message.canonicalScopes = String(object.canonicalScopes); return message; }; /** - * Creates a plain object from a MetricRule message. Also converts values to other types if specified. + * Creates a plain object from a OAuthRequirements message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MetricRule + * @memberof google.api.OAuthRequirements * @static - * @param {google.api.MetricRule} message MetricRule + * @param {google.api.OAuthRequirements} message OAuthRequirements * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetricRule.toObject = function toObject(message, options) { + OAuthRequirements.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.metricCosts = {}; if (options.defaults) - object.selector = ""; - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - var keys2; - if (message.metricCosts && (keys2 = Object.keys(message.metricCosts)).length) { - object.metricCosts = {}; - for (var j = 0; j < keys2.length; ++j) - if (typeof message.metricCosts[keys2[j]] === "number") - object.metricCosts[keys2[j]] = options.longs === String ? String(message.metricCosts[keys2[j]]) : message.metricCosts[keys2[j]]; - else - object.metricCosts[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.metricCosts[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.metricCosts[keys2[j]].low >>> 0, message.metricCosts[keys2[j]].high >>> 0).toNumber() : message.metricCosts[keys2[j]]; - } + object.canonicalScopes = ""; + if (message.canonicalScopes != null && message.hasOwnProperty("canonicalScopes")) + object.canonicalScopes = message.canonicalScopes; return object; }; /** - * Converts this MetricRule to JSON. + * Converts this OAuthRequirements to JSON. * @function toJSON - * @memberof google.api.MetricRule + * @memberof google.api.OAuthRequirements * @instance * @returns {Object.} JSON object */ - MetricRule.prototype.toJSON = function toJSON() { + OAuthRequirements.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MetricRule; + return OAuthRequirements; })(); - api.QuotaLimit = (function() { + api.AuthRequirement = (function() { /** - * Properties of a QuotaLimit. + * Properties of an AuthRequirement. * @memberof google.api - * @interface IQuotaLimit - * @property {string|null} [name] QuotaLimit name - * @property {string|null} [description] QuotaLimit description - * @property {number|Long|null} [defaultLimit] QuotaLimit defaultLimit - * @property {number|Long|null} [maxLimit] QuotaLimit maxLimit - * @property {number|Long|null} [freeTier] QuotaLimit freeTier - * @property {string|null} [duration] QuotaLimit duration - * @property {string|null} [metric] QuotaLimit metric - * @property {string|null} [unit] QuotaLimit unit - * @property {Object.|null} [values] QuotaLimit values - * @property {string|null} [displayName] QuotaLimit displayName + * @interface IAuthRequirement + * @property {string|null} [providerId] AuthRequirement providerId + * @property {string|null} [audiences] AuthRequirement audiences */ /** - * Constructs a new QuotaLimit. + * Constructs a new AuthRequirement. * @memberof google.api - * @classdesc Represents a QuotaLimit. - * @implements IQuotaLimit + * @classdesc Represents an AuthRequirement. + * @implements IAuthRequirement * @constructor - * @param {google.api.IQuotaLimit=} [properties] Properties to set + * @param {google.api.IAuthRequirement=} [properties] Properties to set */ - function QuotaLimit(properties) { - this.values = {}; + function AuthRequirement(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11744,212 +12039,88 @@ } /** - * QuotaLimit name. - * @member {string} name - * @memberof google.api.QuotaLimit + * AuthRequirement providerId. + * @member {string} providerId + * @memberof google.api.AuthRequirement * @instance */ - QuotaLimit.prototype.name = ""; + AuthRequirement.prototype.providerId = ""; /** - * QuotaLimit description. - * @member {string} description - * @memberof google.api.QuotaLimit + * AuthRequirement audiences. + * @member {string} audiences + * @memberof google.api.AuthRequirement * @instance */ - QuotaLimit.prototype.description = ""; + AuthRequirement.prototype.audiences = ""; /** - * QuotaLimit defaultLimit. - * @member {number|Long} defaultLimit - * @memberof google.api.QuotaLimit - * @instance + * Creates a new AuthRequirement instance using the specified properties. + * @function create + * @memberof google.api.AuthRequirement + * @static + * @param {google.api.IAuthRequirement=} [properties] Properties to set + * @returns {google.api.AuthRequirement} AuthRequirement instance */ - QuotaLimit.prototype.defaultLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AuthRequirement.create = function create(properties) { + return new AuthRequirement(properties); + }; /** - * QuotaLimit maxLimit. - * @member {number|Long} maxLimit - * @memberof google.api.QuotaLimit - * @instance - */ - QuotaLimit.prototype.maxLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * QuotaLimit freeTier. - * @member {number|Long} freeTier - * @memberof google.api.QuotaLimit - * @instance - */ - QuotaLimit.prototype.freeTier = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * QuotaLimit duration. - * @member {string} duration - * @memberof google.api.QuotaLimit - * @instance - */ - QuotaLimit.prototype.duration = ""; - - /** - * QuotaLimit metric. - * @member {string} metric - * @memberof google.api.QuotaLimit - * @instance - */ - QuotaLimit.prototype.metric = ""; - - /** - * QuotaLimit unit. - * @member {string} unit - * @memberof google.api.QuotaLimit - * @instance - */ - QuotaLimit.prototype.unit = ""; - - /** - * QuotaLimit values. - * @member {Object.} values - * @memberof google.api.QuotaLimit - * @instance - */ - QuotaLimit.prototype.values = $util.emptyObject; - - /** - * QuotaLimit displayName. - * @member {string} displayName - * @memberof google.api.QuotaLimit - * @instance - */ - QuotaLimit.prototype.displayName = ""; - - /** - * Creates a new QuotaLimit instance using the specified properties. - * @function create - * @memberof google.api.QuotaLimit - * @static - * @param {google.api.IQuotaLimit=} [properties] Properties to set - * @returns {google.api.QuotaLimit} QuotaLimit instance - */ - QuotaLimit.create = function create(properties) { - return new QuotaLimit(properties); - }; - - /** - * Encodes the specified QuotaLimit message. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. + * Encodes the specified AuthRequirement message. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. * @function encode - * @memberof google.api.QuotaLimit + * @memberof google.api.AuthRequirement * @static - * @param {google.api.IQuotaLimit} message QuotaLimit message or plain object to encode + * @param {google.api.IAuthRequirement} message AuthRequirement message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuotaLimit.encode = function encode(message, writer) { + AuthRequirement.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.defaultLimit != null && Object.hasOwnProperty.call(message, "defaultLimit")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.defaultLimit); - if (message.maxLimit != null && Object.hasOwnProperty.call(message, "maxLimit")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.maxLimit); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.duration); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.freeTier != null && Object.hasOwnProperty.call(message, "freeTier")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.freeTier); - if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.metric); - if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.unit); - if (message.values != null && Object.hasOwnProperty.call(message, "values")) - for (var keys = Object.keys(message.values), 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 0 =*/16).int64(message.values[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.displayName); + if (message.providerId != null && Object.hasOwnProperty.call(message, "providerId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.providerId); + if (message.audiences != null && Object.hasOwnProperty.call(message, "audiences")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audiences); return writer; }; /** - * Encodes the specified QuotaLimit message, length delimited. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. + * Encodes the specified AuthRequirement message, length delimited. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.QuotaLimit + * @memberof google.api.AuthRequirement * @static - * @param {google.api.IQuotaLimit} message QuotaLimit message or plain object to encode + * @param {google.api.IAuthRequirement} message AuthRequirement message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuotaLimit.encodeDelimited = function encodeDelimited(message, writer) { + AuthRequirement.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QuotaLimit message from the specified reader or buffer. + * Decodes an AuthRequirement message from the specified reader or buffer. * @function decode - * @memberof google.api.QuotaLimit + * @memberof google.api.AuthRequirement * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.QuotaLimit} QuotaLimit + * @returns {google.api.AuthRequirement} AuthRequirement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuotaLimit.decode = function decode(reader, length) { + AuthRequirement.decode = function 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.QuotaLimit(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.AuthRequirement(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: - message.name = reader.string(); + case 1: + message.providerId = reader.string(); break; case 2: - message.description = reader.string(); - break; - case 3: - message.defaultLimit = reader.int64(); - break; - case 4: - message.maxLimit = reader.int64(); - break; - case 7: - message.freeTier = reader.int64(); - break; - case 5: - message.duration = reader.string(); - break; - case 8: - message.metric = reader.string(); - break; - case 9: - message.unit = reader.string(); - break; - case 10: - if (message.values === $util.emptyObject) - message.values = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int64(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.values[key] = value; - break; - case 12: - message.displayName = reader.string(); + message.audiences = reader.string(); break; default: reader.skipType(tag & 7); @@ -11960,278 +12131,117 @@ }; /** - * Decodes a QuotaLimit message from the specified reader or buffer, length delimited. + * Decodes an AuthRequirement message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.QuotaLimit + * @memberof google.api.AuthRequirement * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.QuotaLimit} QuotaLimit + * @returns {google.api.AuthRequirement} AuthRequirement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuotaLimit.decodeDelimited = function decodeDelimited(reader) { + AuthRequirement.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QuotaLimit message. + * Verifies an AuthRequirement message. * @function verify - * @memberof google.api.QuotaLimit + * @memberof google.api.AuthRequirement * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QuotaLimit.verify = function verify(message) { + AuthRequirement.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.defaultLimit != null && message.hasOwnProperty("defaultLimit")) - if (!$util.isInteger(message.defaultLimit) && !(message.defaultLimit && $util.isInteger(message.defaultLimit.low) && $util.isInteger(message.defaultLimit.high))) - return "defaultLimit: integer|Long expected"; - if (message.maxLimit != null && message.hasOwnProperty("maxLimit")) - if (!$util.isInteger(message.maxLimit) && !(message.maxLimit && $util.isInteger(message.maxLimit.low) && $util.isInteger(message.maxLimit.high))) - return "maxLimit: integer|Long expected"; - if (message.freeTier != null && message.hasOwnProperty("freeTier")) - if (!$util.isInteger(message.freeTier) && !(message.freeTier && $util.isInteger(message.freeTier.low) && $util.isInteger(message.freeTier.high))) - return "freeTier: integer|Long expected"; - if (message.duration != null && message.hasOwnProperty("duration")) - if (!$util.isString(message.duration)) - return "duration: string expected"; - if (message.metric != null && message.hasOwnProperty("metric")) - if (!$util.isString(message.metric)) - return "metric: string expected"; - if (message.unit != null && message.hasOwnProperty("unit")) - if (!$util.isString(message.unit)) - return "unit: string expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!$util.isObject(message.values)) - return "values: object expected"; - var key = Object.keys(message.values); - for (var i = 0; i < key.length; ++i) - if (!$util.isInteger(message.values[key[i]]) && !(message.values[key[i]] && $util.isInteger(message.values[key[i]].low) && $util.isInteger(message.values[key[i]].high))) - return "values: integer|Long{k:string} expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; + if (message.providerId != null && message.hasOwnProperty("providerId")) + if (!$util.isString(message.providerId)) + return "providerId: string expected"; + if (message.audiences != null && message.hasOwnProperty("audiences")) + if (!$util.isString(message.audiences)) + return "audiences: string expected"; return null; }; /** - * Creates a QuotaLimit message from a plain object. Also converts values to their respective internal types. + * Creates an AuthRequirement message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.QuotaLimit + * @memberof google.api.AuthRequirement * @static * @param {Object.} object Plain object - * @returns {google.api.QuotaLimit} QuotaLimit + * @returns {google.api.AuthRequirement} AuthRequirement */ - QuotaLimit.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.QuotaLimit) + AuthRequirement.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.AuthRequirement) return object; - var message = new $root.google.api.QuotaLimit(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.defaultLimit != null) - if ($util.Long) - (message.defaultLimit = $util.Long.fromValue(object.defaultLimit)).unsigned = false; - else if (typeof object.defaultLimit === "string") - message.defaultLimit = parseInt(object.defaultLimit, 10); - else if (typeof object.defaultLimit === "number") - message.defaultLimit = object.defaultLimit; - else if (typeof object.defaultLimit === "object") - message.defaultLimit = new $util.LongBits(object.defaultLimit.low >>> 0, object.defaultLimit.high >>> 0).toNumber(); - if (object.maxLimit != null) - if ($util.Long) - (message.maxLimit = $util.Long.fromValue(object.maxLimit)).unsigned = false; - else if (typeof object.maxLimit === "string") - message.maxLimit = parseInt(object.maxLimit, 10); - else if (typeof object.maxLimit === "number") - message.maxLimit = object.maxLimit; - else if (typeof object.maxLimit === "object") - message.maxLimit = new $util.LongBits(object.maxLimit.low >>> 0, object.maxLimit.high >>> 0).toNumber(); - if (object.freeTier != null) - if ($util.Long) - (message.freeTier = $util.Long.fromValue(object.freeTier)).unsigned = false; - else if (typeof object.freeTier === "string") - message.freeTier = parseInt(object.freeTier, 10); - else if (typeof object.freeTier === "number") - message.freeTier = object.freeTier; - else if (typeof object.freeTier === "object") - message.freeTier = new $util.LongBits(object.freeTier.low >>> 0, object.freeTier.high >>> 0).toNumber(); - if (object.duration != null) - message.duration = String(object.duration); - if (object.metric != null) - message.metric = String(object.metric); - if (object.unit != null) - message.unit = String(object.unit); - if (object.values) { - if (typeof object.values !== "object") - throw TypeError(".google.api.QuotaLimit.values: object expected"); - message.values = {}; - for (var keys = Object.keys(object.values), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.values[keys[i]] = $util.Long.fromValue(object.values[keys[i]])).unsigned = false; - else if (typeof object.values[keys[i]] === "string") - message.values[keys[i]] = parseInt(object.values[keys[i]], 10); - else if (typeof object.values[keys[i]] === "number") - message.values[keys[i]] = object.values[keys[i]]; - else if (typeof object.values[keys[i]] === "object") - message.values[keys[i]] = new $util.LongBits(object.values[keys[i]].low >>> 0, object.values[keys[i]].high >>> 0).toNumber(); - } - if (object.displayName != null) - message.displayName = String(object.displayName); + var message = new $root.google.api.AuthRequirement(); + if (object.providerId != null) + message.providerId = String(object.providerId); + if (object.audiences != null) + message.audiences = String(object.audiences); return message; }; /** - * Creates a plain object from a QuotaLimit message. Also converts values to other types if specified. + * Creates a plain object from an AuthRequirement message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.QuotaLimit + * @memberof google.api.AuthRequirement * @static - * @param {google.api.QuotaLimit} message QuotaLimit + * @param {google.api.AuthRequirement} message AuthRequirement * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QuotaLimit.toObject = function toObject(message, options) { + AuthRequirement.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.values = {}; if (options.defaults) { - object.description = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.defaultLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.defaultLimit = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maxLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maxLimit = options.longs === String ? "0" : 0; - object.duration = ""; - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.freeTier = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.freeTier = options.longs === String ? "0" : 0; - object.metric = ""; - object.unit = ""; - object.displayName = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.defaultLimit != null && message.hasOwnProperty("defaultLimit")) - if (typeof message.defaultLimit === "number") - object.defaultLimit = options.longs === String ? String(message.defaultLimit) : message.defaultLimit; - else - object.defaultLimit = options.longs === String ? $util.Long.prototype.toString.call(message.defaultLimit) : options.longs === Number ? new $util.LongBits(message.defaultLimit.low >>> 0, message.defaultLimit.high >>> 0).toNumber() : message.defaultLimit; - if (message.maxLimit != null && message.hasOwnProperty("maxLimit")) - if (typeof message.maxLimit === "number") - object.maxLimit = options.longs === String ? String(message.maxLimit) : message.maxLimit; - else - object.maxLimit = options.longs === String ? $util.Long.prototype.toString.call(message.maxLimit) : options.longs === Number ? new $util.LongBits(message.maxLimit.low >>> 0, message.maxLimit.high >>> 0).toNumber() : message.maxLimit; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = message.duration; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.freeTier != null && message.hasOwnProperty("freeTier")) - if (typeof message.freeTier === "number") - object.freeTier = options.longs === String ? String(message.freeTier) : message.freeTier; - else - object.freeTier = options.longs === String ? $util.Long.prototype.toString.call(message.freeTier) : options.longs === Number ? new $util.LongBits(message.freeTier.low >>> 0, message.freeTier.high >>> 0).toNumber() : message.freeTier; - if (message.metric != null && message.hasOwnProperty("metric")) - object.metric = message.metric; - if (message.unit != null && message.hasOwnProperty("unit")) - object.unit = message.unit; - var keys2; - if (message.values && (keys2 = Object.keys(message.values)).length) { - object.values = {}; - for (var j = 0; j < keys2.length; ++j) - if (typeof message.values[keys2[j]] === "number") - object.values[keys2[j]] = options.longs === String ? String(message.values[keys2[j]]) : message.values[keys2[j]]; - else - object.values[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.values[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.values[keys2[j]].low >>> 0, message.values[keys2[j]].high >>> 0).toNumber() : message.values[keys2[j]]; + object.providerId = ""; + object.audiences = ""; } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; + if (message.providerId != null && message.hasOwnProperty("providerId")) + object.providerId = message.providerId; + if (message.audiences != null && message.hasOwnProperty("audiences")) + object.audiences = message.audiences; return object; }; /** - * Converts this QuotaLimit to JSON. + * Converts this AuthRequirement to JSON. * @function toJSON - * @memberof google.api.QuotaLimit + * @memberof google.api.AuthRequirement * @instance * @returns {Object.} JSON object */ - QuotaLimit.prototype.toJSON = function toJSON() { + AuthRequirement.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return QuotaLimit; + return AuthRequirement; })(); - api.Service = (function() { + api.Backend = (function() { /** - * Properties of a Service. + * Properties of a Backend. * @memberof google.api - * @interface IService - * @property {string|null} [name] Service name - * @property {string|null} [title] Service title - * @property {string|null} [producerProjectId] Service producerProjectId - * @property {string|null} [id] Service id - * @property {Array.|null} [apis] Service apis - * @property {Array.|null} [types] Service types - * @property {Array.|null} [enums] Service enums - * @property {google.api.IDocumentation|null} [documentation] Service documentation - * @property {google.api.IBackend|null} [backend] Service backend - * @property {google.api.IHttp|null} [http] Service http - * @property {google.api.IQuota|null} [quota] Service quota - * @property {google.api.IAuthentication|null} [authentication] Service authentication - * @property {google.api.IContext|null} [context] Service context - * @property {google.api.IUsage|null} [usage] Service usage - * @property {Array.|null} [endpoints] Service endpoints - * @property {google.api.IControl|null} [control] Service control - * @property {Array.|null} [logs] Service logs - * @property {Array.|null} [metrics] Service metrics - * @property {Array.|null} [monitoredResources] Service monitoredResources - * @property {google.api.IBilling|null} [billing] Service billing - * @property {google.api.ILogging|null} [logging] Service logging - * @property {google.api.IMonitoring|null} [monitoring] Service monitoring - * @property {google.api.ISystemParameters|null} [systemParameters] Service systemParameters - * @property {google.api.ISourceInfo|null} [sourceInfo] Service sourceInfo - * @property {google.protobuf.IUInt32Value|null} [configVersion] Service configVersion + * @interface IBackend + * @property {Array.|null} [rules] Backend rules */ /** - * Constructs a new Service. + * Constructs a new Backend. * @memberof google.api - * @classdesc Represents a Service. - * @implements IService + * @classdesc Represents a Backend. + * @implements IBackend * @constructor - * @param {google.api.IService=} [properties] Properties to set + * @param {google.api.IBackend=} [properties] Properties to set */ - function Service(properties) { - this.apis = []; - this.types = []; - this.enums = []; - this.endpoints = []; - this.logs = []; - this.metrics = []; - this.monitoredResources = []; + function Backend(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12239,408 +12249,408 @@ } /** - * Service name. - * @member {string} name - * @memberof google.api.Service + * Backend rules. + * @member {Array.} rules + * @memberof google.api.Backend * @instance */ - Service.prototype.name = ""; + Backend.prototype.rules = $util.emptyArray; /** - * Service title. - * @member {string} title - * @memberof google.api.Service - * @instance + * Creates a new Backend instance using the specified properties. + * @function create + * @memberof google.api.Backend + * @static + * @param {google.api.IBackend=} [properties] Properties to set + * @returns {google.api.Backend} Backend instance */ - Service.prototype.title = ""; + Backend.create = function create(properties) { + return new Backend(properties); + }; /** - * Service producerProjectId. - * @member {string} producerProjectId - * @memberof google.api.Service - * @instance + * Encodes the specified Backend message. Does not implicitly {@link google.api.Backend.verify|verify} messages. + * @function encode + * @memberof google.api.Backend + * @static + * @param {google.api.IBackend} message Backend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Service.prototype.producerProjectId = ""; + Backend.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.BackendRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Service id. - * @member {string} id - * @memberof google.api.Service - * @instance + * Encodes the specified Backend message, length delimited. Does not implicitly {@link google.api.Backend.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Backend + * @static + * @param {google.api.IBackend} message Backend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Service.prototype.id = ""; + Backend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Service apis. - * @member {Array.} apis - * @memberof google.api.Service - * @instance + * Decodes a Backend message from the specified reader or buffer. + * @function decode + * @memberof google.api.Backend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Backend} Backend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.prototype.apis = $util.emptyArray; + Backend.decode = function 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.Backend(); + 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.BackendRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Service types. - * @member {Array.} types - * @memberof google.api.Service - * @instance - */ - Service.prototype.types = $util.emptyArray; - - /** - * Service enums. - * @member {Array.} enums - * @memberof google.api.Service - * @instance + * Decodes a Backend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Backend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Backend} Backend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.prototype.enums = $util.emptyArray; + Backend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Service documentation. - * @member {google.api.IDocumentation|null|undefined} documentation - * @memberof google.api.Service - * @instance + * Verifies a Backend message. + * @function verify + * @memberof google.api.Backend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Service.prototype.documentation = null; + Backend.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.BackendRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + return null; + }; /** - * Service backend. - * @member {google.api.IBackend|null|undefined} backend - * @memberof google.api.Service - * @instance + * Creates a Backend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Backend + * @static + * @param {Object.} object Plain object + * @returns {google.api.Backend} Backend */ - Service.prototype.backend = null; + Backend.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Backend) + return object; + var message = new $root.google.api.Backend(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Backend.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Backend.rules: object expected"); + message.rules[i] = $root.google.api.BackendRule.fromObject(object.rules[i]); + } + } + return message; + }; /** - * Service http. - * @member {google.api.IHttp|null|undefined} http - * @memberof google.api.Service - * @instance + * Creates a plain object from a Backend message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Backend + * @static + * @param {google.api.Backend} message Backend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Service.prototype.http = null; + Backend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.BackendRule.toObject(message.rules[j], options); + } + return object; + }; /** - * Service quota. - * @member {google.api.IQuota|null|undefined} quota - * @memberof google.api.Service + * Converts this Backend to JSON. + * @function toJSON + * @memberof google.api.Backend * @instance + * @returns {Object.} JSON object */ - Service.prototype.quota = null; + Backend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Service authentication. - * @member {google.api.IAuthentication|null|undefined} authentication - * @memberof google.api.Service - * @instance - */ - Service.prototype.authentication = null; + return Backend; + })(); - /** - * Service context. - * @member {google.api.IContext|null|undefined} context - * @memberof google.api.Service - * @instance - */ - Service.prototype.context = null; + api.BackendRule = (function() { /** - * Service usage. - * @member {google.api.IUsage|null|undefined} usage - * @memberof google.api.Service - * @instance + * Properties of a BackendRule. + * @memberof google.api + * @interface IBackendRule + * @property {string|null} [selector] BackendRule selector + * @property {string|null} [address] BackendRule address + * @property {number|null} [deadline] BackendRule deadline + * @property {number|null} [minDeadline] BackendRule minDeadline + * @property {number|null} [operationDeadline] BackendRule operationDeadline + * @property {google.api.BackendRule.PathTranslation|null} [pathTranslation] BackendRule pathTranslation + * @property {string|null} [jwtAudience] BackendRule jwtAudience + * @property {boolean|null} [disableAuth] BackendRule disableAuth + * @property {string|null} [protocol] BackendRule protocol */ - Service.prototype.usage = null; /** - * Service endpoints. - * @member {Array.} endpoints - * @memberof google.api.Service - * @instance + * Constructs a new BackendRule. + * @memberof google.api + * @classdesc Represents a BackendRule. + * @implements IBackendRule + * @constructor + * @param {google.api.IBackendRule=} [properties] Properties to set */ - Service.prototype.endpoints = $util.emptyArray; + function BackendRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Service control. - * @member {google.api.IControl|null|undefined} control - * @memberof google.api.Service + * BackendRule selector. + * @member {string} selector + * @memberof google.api.BackendRule * @instance */ - Service.prototype.control = null; + BackendRule.prototype.selector = ""; /** - * Service logs. - * @member {Array.} logs - * @memberof google.api.Service + * BackendRule address. + * @member {string} address + * @memberof google.api.BackendRule * @instance */ - Service.prototype.logs = $util.emptyArray; + BackendRule.prototype.address = ""; /** - * Service metrics. - * @member {Array.} metrics - * @memberof google.api.Service + * BackendRule deadline. + * @member {number} deadline + * @memberof google.api.BackendRule * @instance */ - Service.prototype.metrics = $util.emptyArray; + BackendRule.prototype.deadline = 0; /** - * Service monitoredResources. - * @member {Array.} monitoredResources - * @memberof google.api.Service + * BackendRule minDeadline. + * @member {number} minDeadline + * @memberof google.api.BackendRule * @instance */ - Service.prototype.monitoredResources = $util.emptyArray; + BackendRule.prototype.minDeadline = 0; /** - * Service billing. - * @member {google.api.IBilling|null|undefined} billing - * @memberof google.api.Service + * BackendRule operationDeadline. + * @member {number} operationDeadline + * @memberof google.api.BackendRule * @instance */ - Service.prototype.billing = null; + BackendRule.prototype.operationDeadline = 0; /** - * Service logging. - * @member {google.api.ILogging|null|undefined} logging - * @memberof google.api.Service + * BackendRule pathTranslation. + * @member {google.api.BackendRule.PathTranslation} pathTranslation + * @memberof google.api.BackendRule * @instance */ - Service.prototype.logging = null; + BackendRule.prototype.pathTranslation = 0; /** - * Service monitoring. - * @member {google.api.IMonitoring|null|undefined} monitoring - * @memberof google.api.Service + * BackendRule jwtAudience. + * @member {string|null|undefined} jwtAudience + * @memberof google.api.BackendRule * @instance */ - Service.prototype.monitoring = null; + BackendRule.prototype.jwtAudience = null; /** - * Service systemParameters. - * @member {google.api.ISystemParameters|null|undefined} systemParameters - * @memberof google.api.Service + * BackendRule disableAuth. + * @member {boolean|null|undefined} disableAuth + * @memberof google.api.BackendRule * @instance */ - Service.prototype.systemParameters = null; + BackendRule.prototype.disableAuth = null; /** - * Service sourceInfo. - * @member {google.api.ISourceInfo|null|undefined} sourceInfo - * @memberof google.api.Service + * BackendRule protocol. + * @member {string} protocol + * @memberof google.api.BackendRule * @instance */ - Service.prototype.sourceInfo = null; + BackendRule.prototype.protocol = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Service configVersion. - * @member {google.protobuf.IUInt32Value|null|undefined} configVersion - * @memberof google.api.Service + * BackendRule authentication. + * @member {"jwtAudience"|"disableAuth"|undefined} authentication + * @memberof google.api.BackendRule * @instance */ - Service.prototype.configVersion = null; + Object.defineProperty(BackendRule.prototype, "authentication", { + get: $util.oneOfGetter($oneOfFields = ["jwtAudience", "disableAuth"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Service instance using the specified properties. + * Creates a new BackendRule instance using the specified properties. * @function create - * @memberof google.api.Service + * @memberof google.api.BackendRule * @static - * @param {google.api.IService=} [properties] Properties to set - * @returns {google.api.Service} Service instance + * @param {google.api.IBackendRule=} [properties] Properties to set + * @returns {google.api.BackendRule} BackendRule instance */ - Service.create = function create(properties) { - return new Service(properties); - }; + BackendRule.create = function create(properties) { + return new BackendRule(properties); + }; /** - * Encodes the specified Service message. Does not implicitly {@link google.api.Service.verify|verify} messages. + * Encodes the specified BackendRule message. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. * @function encode - * @memberof google.api.Service + * @memberof google.api.BackendRule * @static - * @param {google.api.IService} message Service message or plain object to encode + * @param {google.api.IBackendRule} message BackendRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Service.encode = function encode(message, writer) { + BackendRule.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.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.apis != null && message.apis.length) - for (var i = 0; i < message.apis.length; ++i) - $root.google.protobuf.Api.encode(message.apis[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.types != null && message.types.length) - for (var i = 0; i < message.types.length; ++i) - $root.google.protobuf.Type.encode(message.types[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enums != null && message.enums.length) - for (var i = 0; i < message.enums.length; ++i) - $root.google.protobuf.Enum.encode(message.enums[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.documentation != null && Object.hasOwnProperty.call(message, "documentation")) - $root.google.api.Documentation.encode(message.documentation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.backend != null && Object.hasOwnProperty.call(message, "backend")) - $root.google.api.Backend.encode(message.backend, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.http != null && Object.hasOwnProperty.call(message, "http")) - $root.google.api.Http.encode(message.http, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.quota != null && Object.hasOwnProperty.call(message, "quota")) - $root.google.api.Quota.encode(message.quota, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.authentication != null && Object.hasOwnProperty.call(message, "authentication")) - $root.google.api.Authentication.encode(message.authentication, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.context != null && Object.hasOwnProperty.call(message, "context")) - $root.google.api.Context.encode(message.context, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.usage != null && Object.hasOwnProperty.call(message, "usage")) - $root.google.api.Usage.encode(message.usage, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.endpoints != null && message.endpoints.length) - for (var i = 0; i < message.endpoints.length; ++i) - $root.google.api.Endpoint.encode(message.endpoints[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.configVersion != null && Object.hasOwnProperty.call(message, "configVersion")) - $root.google.protobuf.UInt32Value.encode(message.configVersion, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.control != null && Object.hasOwnProperty.call(message, "control")) - $root.google.api.Control.encode(message.control, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.producerProjectId != null && Object.hasOwnProperty.call(message, "producerProjectId")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.producerProjectId); - if (message.logs != null && message.logs.length) - for (var i = 0; i < message.logs.length; ++i) - $root.google.api.LogDescriptor.encode(message.logs[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.api.MetricDescriptor.encode(message.metrics[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.monitoredResources != null && message.monitoredResources.length) - for (var i = 0; i < message.monitoredResources.length; ++i) - $root.google.api.MonitoredResourceDescriptor.encode(message.monitoredResources[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.billing != null && Object.hasOwnProperty.call(message, "billing")) - $root.google.api.Billing.encode(message.billing, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.logging != null && Object.hasOwnProperty.call(message, "logging")) - $root.google.api.Logging.encode(message.logging, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.monitoring != null && Object.hasOwnProperty.call(message, "monitoring")) - $root.google.api.Monitoring.encode(message.monitoring, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.systemParameters != null && Object.hasOwnProperty.call(message, "systemParameters")) - $root.google.api.SystemParameters.encode(message.systemParameters, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 33, wireType 2 =*/266).string(message.id); - if (message.sourceInfo != null && Object.hasOwnProperty.call(message, "sourceInfo")) - $root.google.api.SourceInfo.encode(message.sourceInfo, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.address); + if (message.deadline != null && Object.hasOwnProperty.call(message, "deadline")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.deadline); + if (message.minDeadline != null && Object.hasOwnProperty.call(message, "minDeadline")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.minDeadline); + if (message.operationDeadline != null && Object.hasOwnProperty.call(message, "operationDeadline")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.operationDeadline); + if (message.pathTranslation != null && Object.hasOwnProperty.call(message, "pathTranslation")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.pathTranslation); + if (message.jwtAudience != null && Object.hasOwnProperty.call(message, "jwtAudience")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.jwtAudience); + if (message.disableAuth != null && Object.hasOwnProperty.call(message, "disableAuth")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.disableAuth); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.protocol); return writer; }; /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.api.Service.verify|verify} messages. + * Encodes the specified BackendRule message, length delimited. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Service + * @memberof google.api.BackendRule * @static - * @param {google.api.IService} message Service message or plain object to encode + * @param {google.api.IBackendRule} message BackendRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Service.encodeDelimited = function encodeDelimited(message, writer) { + BackendRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Service message from the specified reader or buffer. + * Decodes a BackendRule message from the specified reader or buffer. * @function decode - * @memberof google.api.Service + * @memberof google.api.BackendRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Service} Service + * @returns {google.api.BackendRule} BackendRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.decode = function decode(reader, length) { + BackendRule.decode = function 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.Service(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.BackendRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.selector = reader.string(); break; case 2: - message.title = reader.string(); - break; - case 22: - message.producerProjectId = reader.string(); - break; - case 33: - message.id = reader.string(); + message.address = reader.string(); break; case 3: - if (!(message.apis && message.apis.length)) - message.apis = []; - message.apis.push($root.google.protobuf.Api.decode(reader, reader.uint32())); + message.deadline = reader.double(); break; case 4: - if (!(message.types && message.types.length)) - message.types = []; - message.types.push($root.google.protobuf.Type.decode(reader, reader.uint32())); + message.minDeadline = reader.double(); break; case 5: - if (!(message.enums && message.enums.length)) - message.enums = []; - message.enums.push($root.google.protobuf.Enum.decode(reader, reader.uint32())); + message.operationDeadline = reader.double(); break; case 6: - message.documentation = $root.google.api.Documentation.decode(reader, reader.uint32()); + message.pathTranslation = reader.int32(); + break; + case 7: + message.jwtAudience = reader.string(); break; case 8: - message.backend = $root.google.api.Backend.decode(reader, reader.uint32()); + message.disableAuth = reader.bool(); break; case 9: - message.http = $root.google.api.Http.decode(reader, reader.uint32()); - break; - case 10: - message.quota = $root.google.api.Quota.decode(reader, reader.uint32()); - break; - case 11: - message.authentication = $root.google.api.Authentication.decode(reader, reader.uint32()); - break; - case 12: - message.context = $root.google.api.Context.decode(reader, reader.uint32()); - break; - case 15: - message.usage = $root.google.api.Usage.decode(reader, reader.uint32()); - break; - case 18: - if (!(message.endpoints && message.endpoints.length)) - message.endpoints = []; - message.endpoints.push($root.google.api.Endpoint.decode(reader, reader.uint32())); - break; - case 21: - message.control = $root.google.api.Control.decode(reader, reader.uint32()); - break; - case 23: - if (!(message.logs && message.logs.length)) - message.logs = []; - message.logs.push($root.google.api.LogDescriptor.decode(reader, reader.uint32())); - break; - case 24: - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); - break; - case 25: - if (!(message.monitoredResources && message.monitoredResources.length)) - message.monitoredResources = []; - message.monitoredResources.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); - break; - case 26: - message.billing = $root.google.api.Billing.decode(reader, reader.uint32()); - break; - case 27: - message.logging = $root.google.api.Logging.decode(reader, reader.uint32()); - break; - case 28: - message.monitoring = $root.google.api.Monitoring.decode(reader, reader.uint32()); - break; - case 29: - message.systemParameters = $root.google.api.SystemParameters.decode(reader, reader.uint32()); - break; - case 37: - message.sourceInfo = $root.google.api.SourceInfo.decode(reader, reader.uint32()); - break; - case 20: - message.configVersion = $root.google.protobuf.UInt32Value.decode(reader, reader.uint32()); + message.protocol = reader.string(); break; default: reader.skipType(tag & 7); @@ -12651,494 +12661,218 @@ }; /** - * Decodes a Service message from the specified reader or buffer, length delimited. + * Decodes a BackendRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Service + * @memberof google.api.BackendRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Service} Service + * @returns {google.api.BackendRule} BackendRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.decodeDelimited = function decodeDelimited(reader) { + BackendRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Service message. + * Verifies a BackendRule message. * @function verify - * @memberof google.api.Service + * @memberof google.api.BackendRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Service.verify = function verify(message) { + BackendRule.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.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.producerProjectId != null && message.hasOwnProperty("producerProjectId")) - if (!$util.isString(message.producerProjectId)) - return "producerProjectId: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string 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.protobuf.Api.verify(message.apis[i]); - if (error) - return "apis." + error; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.deadline != null && message.hasOwnProperty("deadline")) + if (typeof message.deadline !== "number") + return "deadline: number expected"; + if (message.minDeadline != null && message.hasOwnProperty("minDeadline")) + if (typeof message.minDeadline !== "number") + return "minDeadline: number expected"; + if (message.operationDeadline != null && message.hasOwnProperty("operationDeadline")) + if (typeof message.operationDeadline !== "number") + return "operationDeadline: number expected"; + if (message.pathTranslation != null && message.hasOwnProperty("pathTranslation")) + switch (message.pathTranslation) { + default: + return "pathTranslation: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.jwtAudience != null && message.hasOwnProperty("jwtAudience")) { + properties.authentication = 1; + if (!$util.isString(message.jwtAudience)) + return "jwtAudience: string expected"; } - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) { - var error = $root.google.protobuf.Type.verify(message.types[i]); - if (error) - return "types." + error; - } - } - if (message.enums != null && message.hasOwnProperty("enums")) { - if (!Array.isArray(message.enums)) - return "enums: array expected"; - for (var i = 0; i < message.enums.length; ++i) { - var error = $root.google.protobuf.Enum.verify(message.enums[i]); - if (error) - return "enums." + error; - } - } - if (message.documentation != null && message.hasOwnProperty("documentation")) { - var error = $root.google.api.Documentation.verify(message.documentation); - if (error) - return "documentation." + error; - } - if (message.backend != null && message.hasOwnProperty("backend")) { - var error = $root.google.api.Backend.verify(message.backend); - if (error) - return "backend." + error; - } - if (message.http != null && message.hasOwnProperty("http")) { - var error = $root.google.api.Http.verify(message.http); - if (error) - return "http." + error; - } - if (message.quota != null && message.hasOwnProperty("quota")) { - var error = $root.google.api.Quota.verify(message.quota); - if (error) - return "quota." + error; - } - if (message.authentication != null && message.hasOwnProperty("authentication")) { - var error = $root.google.api.Authentication.verify(message.authentication); - if (error) - return "authentication." + error; - } - if (message.context != null && message.hasOwnProperty("context")) { - var error = $root.google.api.Context.verify(message.context); - if (error) - return "context." + error; - } - if (message.usage != null && message.hasOwnProperty("usage")) { - var error = $root.google.api.Usage.verify(message.usage); - if (error) - return "usage." + error; - } - if (message.endpoints != null && message.hasOwnProperty("endpoints")) { - if (!Array.isArray(message.endpoints)) - return "endpoints: array expected"; - for (var i = 0; i < message.endpoints.length; ++i) { - var error = $root.google.api.Endpoint.verify(message.endpoints[i]); - if (error) - return "endpoints." + error; - } - } - if (message.control != null && message.hasOwnProperty("control")) { - var error = $root.google.api.Control.verify(message.control); - if (error) - return "control." + error; - } - if (message.logs != null && message.hasOwnProperty("logs")) { - if (!Array.isArray(message.logs)) - return "logs: array expected"; - for (var i = 0; i < message.logs.length; ++i) { - var error = $root.google.api.LogDescriptor.verify(message.logs[i]); - if (error) - return "logs." + error; - } - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.api.MetricDescriptor.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.monitoredResources != null && message.hasOwnProperty("monitoredResources")) { - if (!Array.isArray(message.monitoredResources)) - return "monitoredResources: array expected"; - for (var i = 0; i < message.monitoredResources.length; ++i) { - var error = $root.google.api.MonitoredResourceDescriptor.verify(message.monitoredResources[i]); - if (error) - return "monitoredResources." + error; - } - } - if (message.billing != null && message.hasOwnProperty("billing")) { - var error = $root.google.api.Billing.verify(message.billing); - if (error) - return "billing." + error; - } - if (message.logging != null && message.hasOwnProperty("logging")) { - var error = $root.google.api.Logging.verify(message.logging); - if (error) - return "logging." + error; - } - if (message.monitoring != null && message.hasOwnProperty("monitoring")) { - var error = $root.google.api.Monitoring.verify(message.monitoring); - if (error) - return "monitoring." + error; - } - if (message.systemParameters != null && message.hasOwnProperty("systemParameters")) { - var error = $root.google.api.SystemParameters.verify(message.systemParameters); - if (error) - return "systemParameters." + error; - } - if (message.sourceInfo != null && message.hasOwnProperty("sourceInfo")) { - var error = $root.google.api.SourceInfo.verify(message.sourceInfo); - if (error) - return "sourceInfo." + error; - } - if (message.configVersion != null && message.hasOwnProperty("configVersion")) { - var error = $root.google.protobuf.UInt32Value.verify(message.configVersion); - if (error) - return "configVersion." + error; + if (message.disableAuth != null && message.hasOwnProperty("disableAuth")) { + if (properties.authentication === 1) + return "authentication: multiple values"; + properties.authentication = 1; + if (typeof message.disableAuth !== "boolean") + return "disableAuth: boolean expected"; } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; return null; }; /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. + * Creates a BackendRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Service + * @memberof google.api.BackendRule * @static * @param {Object.} object Plain object - * @returns {google.api.Service} Service + * @returns {google.api.BackendRule} BackendRule */ - Service.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Service) + BackendRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.BackendRule) return object; - var message = new $root.google.api.Service(); - if (object.name != null) - message.name = String(object.name); - if (object.title != null) - message.title = String(object.title); - if (object.producerProjectId != null) - message.producerProjectId = String(object.producerProjectId); - if (object.id != null) - message.id = String(object.id); - if (object.apis) { - if (!Array.isArray(object.apis)) - throw TypeError(".google.api.Service.apis: array expected"); - message.apis = []; - for (var i = 0; i < object.apis.length; ++i) { - if (typeof object.apis[i] !== "object") - throw TypeError(".google.api.Service.apis: object expected"); - message.apis[i] = $root.google.protobuf.Api.fromObject(object.apis[i]); - } - } - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.api.Service.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) { - if (typeof object.types[i] !== "object") - throw TypeError(".google.api.Service.types: object expected"); - message.types[i] = $root.google.protobuf.Type.fromObject(object.types[i]); - } + var message = new $root.google.api.BackendRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.address != null) + message.address = String(object.address); + if (object.deadline != null) + message.deadline = Number(object.deadline); + if (object.minDeadline != null) + message.minDeadline = Number(object.minDeadline); + if (object.operationDeadline != null) + message.operationDeadline = Number(object.operationDeadline); + switch (object.pathTranslation) { + case "PATH_TRANSLATION_UNSPECIFIED": + case 0: + message.pathTranslation = 0; + break; + case "CONSTANT_ADDRESS": + case 1: + message.pathTranslation = 1; + break; + case "APPEND_PATH_TO_ADDRESS": + case 2: + message.pathTranslation = 2; + break; } - if (object.enums) { - if (!Array.isArray(object.enums)) - throw TypeError(".google.api.Service.enums: array expected"); - message.enums = []; - for (var i = 0; i < object.enums.length; ++i) { - if (typeof object.enums[i] !== "object") - throw TypeError(".google.api.Service.enums: object expected"); - message.enums[i] = $root.google.protobuf.Enum.fromObject(object.enums[i]); - } + if (object.jwtAudience != null) + message.jwtAudience = String(object.jwtAudience); + if (object.disableAuth != null) + message.disableAuth = Boolean(object.disableAuth); + if (object.protocol != null) + message.protocol = String(object.protocol); + return message; + }; + + /** + * Creates a plain object from a BackendRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.BackendRule + * @static + * @param {google.api.BackendRule} message BackendRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackendRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selector = ""; + object.address = ""; + object.deadline = 0; + object.minDeadline = 0; + object.operationDeadline = 0; + object.pathTranslation = options.enums === String ? "PATH_TRANSLATION_UNSPECIFIED" : 0; + object.protocol = ""; } - if (object.documentation != null) { - if (typeof object.documentation !== "object") - throw TypeError(".google.api.Service.documentation: object expected"); - message.documentation = $root.google.api.Documentation.fromObject(object.documentation); + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.deadline != null && message.hasOwnProperty("deadline")) + object.deadline = options.json && !isFinite(message.deadline) ? String(message.deadline) : message.deadline; + if (message.minDeadline != null && message.hasOwnProperty("minDeadline")) + object.minDeadline = options.json && !isFinite(message.minDeadline) ? String(message.minDeadline) : message.minDeadline; + if (message.operationDeadline != null && message.hasOwnProperty("operationDeadline")) + object.operationDeadline = options.json && !isFinite(message.operationDeadline) ? String(message.operationDeadline) : message.operationDeadline; + if (message.pathTranslation != null && message.hasOwnProperty("pathTranslation")) + object.pathTranslation = options.enums === String ? $root.google.api.BackendRule.PathTranslation[message.pathTranslation] : message.pathTranslation; + if (message.jwtAudience != null && message.hasOwnProperty("jwtAudience")) { + object.jwtAudience = message.jwtAudience; + if (options.oneofs) + object.authentication = "jwtAudience"; } - if (object.backend != null) { - if (typeof object.backend !== "object") - throw TypeError(".google.api.Service.backend: object expected"); - message.backend = $root.google.api.Backend.fromObject(object.backend); + if (message.disableAuth != null && message.hasOwnProperty("disableAuth")) { + object.disableAuth = message.disableAuth; + if (options.oneofs) + object.authentication = "disableAuth"; } - if (object.http != null) { - if (typeof object.http !== "object") - throw TypeError(".google.api.Service.http: object expected"); - message.http = $root.google.api.Http.fromObject(object.http); - } - if (object.quota != null) { - if (typeof object.quota !== "object") - throw TypeError(".google.api.Service.quota: object expected"); - message.quota = $root.google.api.Quota.fromObject(object.quota); - } - if (object.authentication != null) { - if (typeof object.authentication !== "object") - throw TypeError(".google.api.Service.authentication: object expected"); - message.authentication = $root.google.api.Authentication.fromObject(object.authentication); - } - if (object.context != null) { - if (typeof object.context !== "object") - throw TypeError(".google.api.Service.context: object expected"); - message.context = $root.google.api.Context.fromObject(object.context); - } - if (object.usage != null) { - if (typeof object.usage !== "object") - throw TypeError(".google.api.Service.usage: object expected"); - message.usage = $root.google.api.Usage.fromObject(object.usage); - } - if (object.endpoints) { - if (!Array.isArray(object.endpoints)) - throw TypeError(".google.api.Service.endpoints: array expected"); - message.endpoints = []; - for (var i = 0; i < object.endpoints.length; ++i) { - if (typeof object.endpoints[i] !== "object") - throw TypeError(".google.api.Service.endpoints: object expected"); - message.endpoints[i] = $root.google.api.Endpoint.fromObject(object.endpoints[i]); - } - } - if (object.control != null) { - if (typeof object.control !== "object") - throw TypeError(".google.api.Service.control: object expected"); - message.control = $root.google.api.Control.fromObject(object.control); - } - if (object.logs) { - if (!Array.isArray(object.logs)) - throw TypeError(".google.api.Service.logs: array expected"); - message.logs = []; - for (var i = 0; i < object.logs.length; ++i) { - if (typeof object.logs[i] !== "object") - throw TypeError(".google.api.Service.logs: object expected"); - message.logs[i] = $root.google.api.LogDescriptor.fromObject(object.logs[i]); - } - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.api.Service.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.api.Service.metrics: object expected"); - message.metrics[i] = $root.google.api.MetricDescriptor.fromObject(object.metrics[i]); - } - } - if (object.monitoredResources) { - if (!Array.isArray(object.monitoredResources)) - throw TypeError(".google.api.Service.monitoredResources: array expected"); - message.monitoredResources = []; - for (var i = 0; i < object.monitoredResources.length; ++i) { - if (typeof object.monitoredResources[i] !== "object") - throw TypeError(".google.api.Service.monitoredResources: object expected"); - message.monitoredResources[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.monitoredResources[i]); - } - } - if (object.billing != null) { - if (typeof object.billing !== "object") - throw TypeError(".google.api.Service.billing: object expected"); - message.billing = $root.google.api.Billing.fromObject(object.billing); - } - if (object.logging != null) { - if (typeof object.logging !== "object") - throw TypeError(".google.api.Service.logging: object expected"); - message.logging = $root.google.api.Logging.fromObject(object.logging); - } - if (object.monitoring != null) { - if (typeof object.monitoring !== "object") - throw TypeError(".google.api.Service.monitoring: object expected"); - message.monitoring = $root.google.api.Monitoring.fromObject(object.monitoring); - } - if (object.systemParameters != null) { - if (typeof object.systemParameters !== "object") - throw TypeError(".google.api.Service.systemParameters: object expected"); - message.systemParameters = $root.google.api.SystemParameters.fromObject(object.systemParameters); - } - if (object.sourceInfo != null) { - if (typeof object.sourceInfo !== "object") - throw TypeError(".google.api.Service.sourceInfo: object expected"); - message.sourceInfo = $root.google.api.SourceInfo.fromObject(object.sourceInfo); - } - if (object.configVersion != null) { - if (typeof object.configVersion !== "object") - throw TypeError(".google.api.Service.configVersion: object expected"); - message.configVersion = $root.google.protobuf.UInt32Value.fromObject(object.configVersion); - } - return message; - }; - - /** - * Creates a plain object from a Service message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Service - * @static - * @param {google.api.Service} message Service - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Service.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.apis = []; - object.types = []; - object.enums = []; - object.endpoints = []; - object.logs = []; - object.metrics = []; - object.monitoredResources = []; - } - if (options.defaults) { - object.name = ""; - object.title = ""; - object.documentation = null; - object.backend = null; - object.http = null; - object.quota = null; - object.authentication = null; - object.context = null; - object.usage = null; - object.configVersion = null; - object.control = null; - object.producerProjectId = ""; - object.billing = null; - object.logging = null; - object.monitoring = null; - object.systemParameters = null; - object.id = ""; - object.sourceInfo = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.apis && message.apis.length) { - object.apis = []; - for (var j = 0; j < message.apis.length; ++j) - object.apis[j] = $root.google.protobuf.Api.toObject(message.apis[j], options); - } - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = $root.google.protobuf.Type.toObject(message.types[j], options); - } - if (message.enums && message.enums.length) { - object.enums = []; - for (var j = 0; j < message.enums.length; ++j) - object.enums[j] = $root.google.protobuf.Enum.toObject(message.enums[j], options); - } - if (message.documentation != null && message.hasOwnProperty("documentation")) - object.documentation = $root.google.api.Documentation.toObject(message.documentation, options); - if (message.backend != null && message.hasOwnProperty("backend")) - object.backend = $root.google.api.Backend.toObject(message.backend, options); - if (message.http != null && message.hasOwnProperty("http")) - object.http = $root.google.api.Http.toObject(message.http, options); - if (message.quota != null && message.hasOwnProperty("quota")) - object.quota = $root.google.api.Quota.toObject(message.quota, options); - if (message.authentication != null && message.hasOwnProperty("authentication")) - object.authentication = $root.google.api.Authentication.toObject(message.authentication, options); - if (message.context != null && message.hasOwnProperty("context")) - object.context = $root.google.api.Context.toObject(message.context, options); - if (message.usage != null && message.hasOwnProperty("usage")) - object.usage = $root.google.api.Usage.toObject(message.usage, options); - if (message.endpoints && message.endpoints.length) { - object.endpoints = []; - for (var j = 0; j < message.endpoints.length; ++j) - object.endpoints[j] = $root.google.api.Endpoint.toObject(message.endpoints[j], options); - } - if (message.configVersion != null && message.hasOwnProperty("configVersion")) - object.configVersion = $root.google.protobuf.UInt32Value.toObject(message.configVersion, options); - if (message.control != null && message.hasOwnProperty("control")) - object.control = $root.google.api.Control.toObject(message.control, options); - if (message.producerProjectId != null && message.hasOwnProperty("producerProjectId")) - object.producerProjectId = message.producerProjectId; - if (message.logs && message.logs.length) { - object.logs = []; - for (var j = 0; j < message.logs.length; ++j) - object.logs[j] = $root.google.api.LogDescriptor.toObject(message.logs[j], options); - } - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.api.MetricDescriptor.toObject(message.metrics[j], options); - } - if (message.monitoredResources && message.monitoredResources.length) { - object.monitoredResources = []; - for (var j = 0; j < message.monitoredResources.length; ++j) - object.monitoredResources[j] = $root.google.api.MonitoredResourceDescriptor.toObject(message.monitoredResources[j], options); - } - if (message.billing != null && message.hasOwnProperty("billing")) - object.billing = $root.google.api.Billing.toObject(message.billing, options); - if (message.logging != null && message.hasOwnProperty("logging")) - object.logging = $root.google.api.Logging.toObject(message.logging, options); - if (message.monitoring != null && message.hasOwnProperty("monitoring")) - object.monitoring = $root.google.api.Monitoring.toObject(message.monitoring, options); - if (message.systemParameters != null && message.hasOwnProperty("systemParameters")) - object.systemParameters = $root.google.api.SystemParameters.toObject(message.systemParameters, options); - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.sourceInfo != null && message.hasOwnProperty("sourceInfo")) - object.sourceInfo = $root.google.api.SourceInfo.toObject(message.sourceInfo, options); + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; return object; }; /** - * Converts this Service to JSON. + * Converts this BackendRule to JSON. * @function toJSON - * @memberof google.api.Service + * @memberof google.api.BackendRule * @instance * @returns {Object.} JSON object */ - Service.prototype.toJSON = function toJSON() { + BackendRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Service; + /** + * PathTranslation enum. + * @name google.api.BackendRule.PathTranslation + * @enum {number} + * @property {number} PATH_TRANSLATION_UNSPECIFIED=0 PATH_TRANSLATION_UNSPECIFIED value + * @property {number} CONSTANT_ADDRESS=1 CONSTANT_ADDRESS value + * @property {number} APPEND_PATH_TO_ADDRESS=2 APPEND_PATH_TO_ADDRESS value + */ + BackendRule.PathTranslation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PATH_TRANSLATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONSTANT_ADDRESS"] = 1; + values[valuesById[2] = "APPEND_PATH_TO_ADDRESS"] = 2; + return values; + })(); + + return BackendRule; })(); - api.Authentication = (function() { + api.Billing = (function() { /** - * Properties of an Authentication. + * Properties of a Billing. * @memberof google.api - * @interface IAuthentication - * @property {Array.|null} [rules] Authentication rules - * @property {Array.|null} [providers] Authentication providers + * @interface IBilling + * @property {Array.|null} [consumerDestinations] Billing consumerDestinations */ /** - * Constructs a new Authentication. + * Constructs a new Billing. * @memberof google.api - * @classdesc Represents an Authentication. - * @implements IAuthentication + * @classdesc Represents a Billing. + * @implements IBilling * @constructor - * @param {google.api.IAuthentication=} [properties] Properties to set + * @param {google.api.IBilling=} [properties] Properties to set */ - function Authentication(properties) { - this.rules = []; - this.providers = []; + function Billing(properties) { + this.consumerDestinations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13146,94 +12880,78 @@ } /** - * Authentication rules. - * @member {Array.} rules - * @memberof google.api.Authentication - * @instance - */ - Authentication.prototype.rules = $util.emptyArray; - - /** - * Authentication providers. - * @member {Array.} providers - * @memberof google.api.Authentication + * Billing consumerDestinations. + * @member {Array.} consumerDestinations + * @memberof google.api.Billing * @instance */ - Authentication.prototype.providers = $util.emptyArray; + Billing.prototype.consumerDestinations = $util.emptyArray; /** - * Creates a new Authentication instance using the specified properties. + * Creates a new Billing instance using the specified properties. * @function create - * @memberof google.api.Authentication + * @memberof google.api.Billing * @static - * @param {google.api.IAuthentication=} [properties] Properties to set - * @returns {google.api.Authentication} Authentication instance + * @param {google.api.IBilling=} [properties] Properties to set + * @returns {google.api.Billing} Billing instance */ - Authentication.create = function create(properties) { - return new Authentication(properties); + Billing.create = function create(properties) { + return new Billing(properties); }; /** - * Encodes the specified Authentication message. Does not implicitly {@link google.api.Authentication.verify|verify} messages. + * Encodes the specified Billing message. Does not implicitly {@link google.api.Billing.verify|verify} messages. * @function encode - * @memberof google.api.Authentication + * @memberof google.api.Billing * @static - * @param {google.api.IAuthentication} message Authentication message or plain object to encode + * @param {google.api.IBilling} message Billing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Authentication.encode = function encode(message, writer) { + Billing.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.AuthenticationRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.providers != null && message.providers.length) - for (var i = 0; i < message.providers.length; ++i) - $root.google.api.AuthProvider.encode(message.providers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.consumerDestinations != null && message.consumerDestinations.length) + for (var i = 0; i < message.consumerDestinations.length; ++i) + $root.google.api.Billing.BillingDestination.encode(message.consumerDestinations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified Authentication message, length delimited. Does not implicitly {@link google.api.Authentication.verify|verify} messages. + * Encodes the specified Billing message, length delimited. Does not implicitly {@link google.api.Billing.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Authentication + * @memberof google.api.Billing * @static - * @param {google.api.IAuthentication} message Authentication message or plain object to encode + * @param {google.api.IBilling} message Billing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Authentication.encodeDelimited = function encodeDelimited(message, writer) { + Billing.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Authentication message from the specified reader or buffer. + * Decodes a Billing message from the specified reader or buffer. * @function decode - * @memberof google.api.Authentication + * @memberof google.api.Billing * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Authentication} Authentication + * @returns {google.api.Billing} Billing * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Authentication.decode = function decode(reader, length) { + Billing.decode = function 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.Authentication(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Billing(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.AuthenticationRule.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.providers && message.providers.length)) - message.providers = []; - message.providers.push($root.google.api.AuthProvider.decode(reader, reader.uint32())); + case 8: + if (!(message.consumerDestinations && message.consumerDestinations.length)) + message.consumerDestinations = []; + message.consumerDestinations.push($root.google.api.Billing.BillingDestination.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -13244,272 +12962,574 @@ }; /** - * Decodes an Authentication message from the specified reader or buffer, length delimited. + * Decodes a Billing message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Authentication + * @memberof google.api.Billing * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Authentication} Authentication + * @returns {google.api.Billing} Billing * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Authentication.decodeDelimited = function decodeDelimited(reader) { + Billing.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Authentication message. + * Verifies a Billing message. * @function verify - * @memberof google.api.Authentication + * @memberof google.api.Billing * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Authentication.verify = function verify(message) { + Billing.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.AuthenticationRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.providers != null && message.hasOwnProperty("providers")) { - if (!Array.isArray(message.providers)) - return "providers: array expected"; - for (var i = 0; i < message.providers.length; ++i) { - var error = $root.google.api.AuthProvider.verify(message.providers[i]); + if (message.consumerDestinations != null && message.hasOwnProperty("consumerDestinations")) { + if (!Array.isArray(message.consumerDestinations)) + return "consumerDestinations: array expected"; + for (var i = 0; i < message.consumerDestinations.length; ++i) { + var error = $root.google.api.Billing.BillingDestination.verify(message.consumerDestinations[i]); if (error) - return "providers." + error; + return "consumerDestinations." + error; } } return null; }; /** - * Creates an Authentication message from a plain object. Also converts values to their respective internal types. + * Creates a Billing message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Authentication + * @memberof google.api.Billing * @static * @param {Object.} object Plain object - * @returns {google.api.Authentication} Authentication + * @returns {google.api.Billing} Billing */ - Authentication.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Authentication) + Billing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Billing) return object; - var message = new $root.google.api.Authentication(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Authentication.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Authentication.rules: object expected"); - message.rules[i] = $root.google.api.AuthenticationRule.fromObject(object.rules[i]); - } - } - if (object.providers) { - if (!Array.isArray(object.providers)) - throw TypeError(".google.api.Authentication.providers: array expected"); - message.providers = []; - for (var i = 0; i < object.providers.length; ++i) { - if (typeof object.providers[i] !== "object") - throw TypeError(".google.api.Authentication.providers: object expected"); - message.providers[i] = $root.google.api.AuthProvider.fromObject(object.providers[i]); + var message = new $root.google.api.Billing(); + if (object.consumerDestinations) { + if (!Array.isArray(object.consumerDestinations)) + throw TypeError(".google.api.Billing.consumerDestinations: array expected"); + message.consumerDestinations = []; + for (var i = 0; i < object.consumerDestinations.length; ++i) { + if (typeof object.consumerDestinations[i] !== "object") + throw TypeError(".google.api.Billing.consumerDestinations: object expected"); + message.consumerDestinations[i] = $root.google.api.Billing.BillingDestination.fromObject(object.consumerDestinations[i]); } } return message; }; /** - * Creates a plain object from an Authentication message. Also converts values to other types if specified. + * Creates a plain object from a Billing message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Authentication + * @memberof google.api.Billing * @static - * @param {google.api.Authentication} message Authentication + * @param {google.api.Billing} message Billing * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Authentication.toObject = function toObject(message, options) { + Billing.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.rules = []; - object.providers = []; - } - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.AuthenticationRule.toObject(message.rules[j], options); - } - if (message.providers && message.providers.length) { - object.providers = []; - for (var j = 0; j < message.providers.length; ++j) - object.providers[j] = $root.google.api.AuthProvider.toObject(message.providers[j], options); + if (options.arrays || options.defaults) + object.consumerDestinations = []; + if (message.consumerDestinations && message.consumerDestinations.length) { + object.consumerDestinations = []; + for (var j = 0; j < message.consumerDestinations.length; ++j) + object.consumerDestinations[j] = $root.google.api.Billing.BillingDestination.toObject(message.consumerDestinations[j], options); } return object; }; /** - * Converts this Authentication to JSON. + * Converts this Billing to JSON. * @function toJSON - * @memberof google.api.Authentication + * @memberof google.api.Billing * @instance * @returns {Object.} JSON object */ - Authentication.prototype.toJSON = function toJSON() { + Billing.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Authentication; - })(); - - api.AuthenticationRule = (function() { + Billing.BillingDestination = (function() { - /** - * Properties of an AuthenticationRule. - * @memberof google.api - * @interface IAuthenticationRule - * @property {string|null} [selector] AuthenticationRule selector - * @property {google.api.IOAuthRequirements|null} [oauth] AuthenticationRule oauth - * @property {boolean|null} [allowWithoutCredential] AuthenticationRule allowWithoutCredential - * @property {Array.|null} [requirements] AuthenticationRule requirements - */ + /** + * Properties of a BillingDestination. + * @memberof google.api.Billing + * @interface IBillingDestination + * @property {string|null} [monitoredResource] BillingDestination monitoredResource + * @property {Array.|null} [metrics] BillingDestination metrics + */ - /** - * Constructs a new AuthenticationRule. - * @memberof google.api - * @classdesc Represents an AuthenticationRule. - * @implements IAuthenticationRule - * @constructor - * @param {google.api.IAuthenticationRule=} [properties] Properties to set - */ - function AuthenticationRule(properties) { - this.requirements = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new BillingDestination. + * @memberof google.api.Billing + * @classdesc Represents a BillingDestination. + * @implements IBillingDestination + * @constructor + * @param {google.api.Billing.IBillingDestination=} [properties] Properties to set + */ + function BillingDestination(properties) { + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * AuthenticationRule selector. - * @member {string} selector - * @memberof google.api.AuthenticationRule - * @instance - */ - AuthenticationRule.prototype.selector = ""; + /** + * BillingDestination monitoredResource. + * @member {string} monitoredResource + * @memberof google.api.Billing.BillingDestination + * @instance + */ + BillingDestination.prototype.monitoredResource = ""; - /** - * AuthenticationRule oauth. - * @member {google.api.IOAuthRequirements|null|undefined} oauth - * @memberof google.api.AuthenticationRule - * @instance + /** + * BillingDestination metrics. + * @member {Array.} metrics + * @memberof google.api.Billing.BillingDestination + * @instance + */ + BillingDestination.prototype.metrics = $util.emptyArray; + + /** + * Creates a new BillingDestination instance using the specified properties. + * @function create + * @memberof google.api.Billing.BillingDestination + * @static + * @param {google.api.Billing.IBillingDestination=} [properties] Properties to set + * @returns {google.api.Billing.BillingDestination} BillingDestination instance + */ + BillingDestination.create = function create(properties) { + return new BillingDestination(properties); + }; + + /** + * Encodes the specified BillingDestination message. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. + * @function encode + * @memberof google.api.Billing.BillingDestination + * @static + * @param {google.api.Billing.IBillingDestination} message BillingDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BillingDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.monitoredResource); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metrics[i]); + return writer; + }; + + /** + * Encodes the specified BillingDestination message, length delimited. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Billing.BillingDestination + * @static + * @param {google.api.Billing.IBillingDestination} message BillingDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BillingDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BillingDestination message from the specified reader or buffer. + * @function decode + * @memberof google.api.Billing.BillingDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Billing.BillingDestination} BillingDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BillingDestination.decode = function 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.Billing.BillingDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.monitoredResource = reader.string(); + break; + case 2: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BillingDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Billing.BillingDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Billing.BillingDestination} BillingDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BillingDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BillingDestination message. + * @function verify + * @memberof google.api.Billing.BillingDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BillingDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + if (!$util.isString(message.monitoredResource)) + return "monitoredResource: string expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) + if (!$util.isString(message.metrics[i])) + return "metrics: string[] expected"; + } + return null; + }; + + /** + * Creates a BillingDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Billing.BillingDestination + * @static + * @param {Object.} object Plain object + * @returns {google.api.Billing.BillingDestination} BillingDestination + */ + BillingDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Billing.BillingDestination) + return object; + var message = new $root.google.api.Billing.BillingDestination(); + if (object.monitoredResource != null) + message.monitoredResource = String(object.monitoredResource); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.api.Billing.BillingDestination.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) + message.metrics[i] = String(object.metrics[i]); + } + return message; + }; + + /** + * Creates a plain object from a BillingDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Billing.BillingDestination + * @static + * @param {google.api.Billing.BillingDestination} message BillingDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BillingDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) + object.monitoredResource = ""; + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + object.monitoredResource = message.monitoredResource; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = message.metrics[j]; + } + return object; + }; + + /** + * Converts this BillingDestination to JSON. + * @function toJSON + * @memberof google.api.Billing.BillingDestination + * @instance + * @returns {Object.} JSON object + */ + BillingDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BillingDestination; + })(); + + return Billing; + })(); + + api.MetricDescriptor = (function() { + + /** + * Properties of a MetricDescriptor. + * @memberof google.api + * @interface IMetricDescriptor + * @property {string|null} [name] MetricDescriptor name + * @property {string|null} [type] MetricDescriptor type + * @property {Array.|null} [labels] MetricDescriptor labels + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType + * @property {string|null} [unit] MetricDescriptor unit + * @property {string|null} [description] MetricDescriptor description + * @property {string|null} [displayName] MetricDescriptor displayName + * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage + * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes */ - AuthenticationRule.prototype.oauth = null; /** - * AuthenticationRule allowWithoutCredential. - * @member {boolean} allowWithoutCredential - * @memberof google.api.AuthenticationRule - * @instance + * Constructs a new MetricDescriptor. + * @memberof google.api + * @classdesc Represents a MetricDescriptor. + * @implements IMetricDescriptor + * @constructor + * @param {google.api.IMetricDescriptor=} [properties] Properties to set */ - AuthenticationRule.prototype.allowWithoutCredential = false; + function MetricDescriptor(properties) { + this.labels = []; + this.monitoredResourceTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * AuthenticationRule requirements. - * @member {Array.} requirements - * @memberof google.api.AuthenticationRule + * MetricDescriptor name. + * @member {string} name + * @memberof google.api.MetricDescriptor * @instance */ - AuthenticationRule.prototype.requirements = $util.emptyArray; + MetricDescriptor.prototype.name = ""; /** - * Creates a new AuthenticationRule instance using the specified properties. - * @function create - * @memberof google.api.AuthenticationRule - * @static - * @param {google.api.IAuthenticationRule=} [properties] Properties to set - * @returns {google.api.AuthenticationRule} AuthenticationRule instance + * MetricDescriptor type. + * @member {string} type + * @memberof google.api.MetricDescriptor + * @instance */ - AuthenticationRule.create = function create(properties) { - return new AuthenticationRule(properties); - }; + MetricDescriptor.prototype.type = ""; /** - * Encodes the specified AuthenticationRule message. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. + * MetricDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.labels = $util.emptyArray; + + /** + * MetricDescriptor metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.metricKind = 0; + + /** + * MetricDescriptor valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.valueType = 0; + + /** + * MetricDescriptor unit. + * @member {string} unit + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.unit = ""; + + /** + * MetricDescriptor description. + * @member {string} description + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.description = ""; + + /** + * MetricDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.displayName = ""; + + /** + * MetricDescriptor metadata. + * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.metadata = null; + + /** + * MetricDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.launchStage = 0; + + /** + * MetricDescriptor monitoredResourceTypes. + * @member {Array.} monitoredResourceTypes + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; + + /** + * Creates a new MetricDescriptor instance using the specified properties. + * @function create + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @returns {google.api.MetricDescriptor} MetricDescriptor instance + */ + MetricDescriptor.create = function create(properties) { + return new MetricDescriptor(properties); + }; + + /** + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.AuthenticationRule + * @memberof google.api.MetricDescriptor * @static - * @param {google.api.IAuthenticationRule} message AuthenticationRule message or plain object to encode + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuthenticationRule.encode = function encode(message, writer) { + MetricDescriptor.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.oauth != null && Object.hasOwnProperty.call(message, "oauth")) - $root.google.api.OAuthRequirements.encode(message.oauth, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.allowWithoutCredential != null && Object.hasOwnProperty.call(message, "allowWithoutCredential")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowWithoutCredential); - if (message.requirements != null && message.requirements.length) - for (var i = 0; i < message.requirements.length; ++i) - $root.google.api.AuthRequirement.encode(message.requirements[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); + if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); return writer; }; /** - * Encodes the specified AuthenticationRule message, length delimited. Does not implicitly {@link google.api.AuthenticationRule.verify|verify} messages. + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.AuthenticationRule + * @memberof google.api.MetricDescriptor * @static - * @param {google.api.IAuthenticationRule} message AuthenticationRule message or plain object to encode + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuthenticationRule.encodeDelimited = function encodeDelimited(message, writer) { + MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AuthenticationRule message from the specified reader or buffer. + * Decodes a MetricDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.AuthenticationRule + * @memberof google.api.MetricDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.AuthenticationRule} AuthenticationRule + * @returns {google.api.MetricDescriptor} MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AuthenticationRule.decode = function decode(reader, length) { + MetricDescriptor.decode = function 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.AuthenticationRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.name = reader.string(); + break; + case 8: + message.type = reader.string(); break; case 2: - message.oauth = $root.google.api.OAuthRequirements.decode(reader, reader.uint32()); + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 3: + message.metricKind = reader.int32(); + break; + case 4: + message.valueType = reader.int32(); break; case 5: - message.allowWithoutCredential = reader.bool(); + message.unit = reader.string(); + break; + case 6: + message.description = reader.string(); break; case 7: - if (!(message.requirements && message.requirements.length)) - message.requirements = []; - message.requirements.push($root.google.api.AuthRequirement.decode(reader, reader.uint32())); + message.displayName = reader.string(); + break; + case 10: + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); + break; + case 12: + message.launchStage = reader.int32(); + break; + case 13: + if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) + message.monitoredResourceTypes = []; + message.monitoredResourceTypes.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -13520,417 +13540,657 @@ }; /** - * Decodes an AuthenticationRule message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.AuthenticationRule + * @memberof google.api.MetricDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.AuthenticationRule} AuthenticationRule + * @returns {google.api.MetricDescriptor} MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AuthenticationRule.decodeDelimited = function decodeDelimited(reader) { + MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AuthenticationRule message. + * Verifies a MetricDescriptor message. * @function verify - * @memberof google.api.AuthenticationRule + * @memberof google.api.MetricDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AuthenticationRule.verify = function verify(message) { + MetricDescriptor.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.oauth != null && message.hasOwnProperty("oauth")) { - var error = $root.google.api.OAuthRequirements.verify(message.oauth); - if (error) - return "oauth." + error; - } - if (message.allowWithoutCredential != null && message.hasOwnProperty("allowWithoutCredential")) - if (typeof message.allowWithoutCredential !== "boolean") - return "allowWithoutCredential: boolean expected"; - if (message.requirements != null && message.hasOwnProperty("requirements")) { - if (!Array.isArray(message.requirements)) - return "requirements: array expected"; - for (var i = 0; i < message.requirements.length; ++i) { - var error = $root.google.api.AuthRequirement.verify(message.requirements[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); if (error) - return "requirements." + error; - } - } - return null; - }; - - /** - * Creates an AuthenticationRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.AuthenticationRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.AuthenticationRule} AuthenticationRule - */ - AuthenticationRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.AuthenticationRule) - return object; - var message = new $root.google.api.AuthenticationRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.oauth != null) { - if (typeof object.oauth !== "object") - throw TypeError(".google.api.AuthenticationRule.oauth: object expected"); - message.oauth = $root.google.api.OAuthRequirements.fromObject(object.oauth); - } - if (object.allowWithoutCredential != null) - message.allowWithoutCredential = Boolean(object.allowWithoutCredential); - if (object.requirements) { - if (!Array.isArray(object.requirements)) - throw TypeError(".google.api.AuthenticationRule.requirements: array expected"); - message.requirements = []; - for (var i = 0; i < object.requirements.length; ++i) { - if (typeof object.requirements[i] !== "object") - throw TypeError(".google.api.AuthenticationRule.requirements: object expected"); - message.requirements[i] = $root.google.api.AuthRequirement.fromObject(object.requirements[i]); + return "labels." + error; } } - return message; + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + switch (message.metricKind) { + default: + return "metricKind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + 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.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { + if (!Array.isArray(message.monitoredResourceTypes)) + return "monitoredResourceTypes: array expected"; + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + if (!$util.isString(message.monitoredResourceTypes[i])) + return "monitoredResourceTypes: string[] expected"; + } + return null; }; /** - * Creates a plain object from an AuthenticationRule message. Also converts values to other types if specified. + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor} MetricDescriptor + */ + MetricDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor) + return object; + var message = new $root.google.api.MetricDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MetricDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MetricDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.metricKind) { + case "METRIC_KIND_UNSPECIFIED": + case 0: + message.metricKind = 0; + break; + case "GAUGE": + case 1: + message.metricKind = 1; + break; + case "DELTA": + case 2: + message.metricKind = 2; + break; + case "CUMULATIVE": + case 3: + message.metricKind = 3; + break; + } + switch (object.valueType) { + case "VALUE_TYPE_UNSPECIFIED": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + case "DOUBLE": + case 3: + message.valueType = 3; + break; + case "STRING": + case 4: + message.valueType = 4; + break; + case "DISTRIBUTION": + case 5: + message.valueType = 5; + break; + case "MONEY": + case 6: + message.valueType = 6; + break; + } + if (object.unit != null) + message.unit = String(object.unit); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); + } + switch (object.launchStage) { + 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.monitoredResourceTypes) { + if (!Array.isArray(object.monitoredResourceTypes)) + throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); + message.monitoredResourceTypes = []; + for (var i = 0; i < object.monitoredResourceTypes.length; ++i) + message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.AuthenticationRule + * @memberof google.api.MetricDescriptor * @static - * @param {google.api.AuthenticationRule} message AuthenticationRule + * @param {google.api.MetricDescriptor} message MetricDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AuthenticationRule.toObject = function toObject(message, options) { + MetricDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.requirements = []; + if (options.arrays || options.defaults) { + object.labels = []; + object.monitoredResourceTypes = []; + } if (options.defaults) { - object.selector = ""; - object.oauth = null; - object.allowWithoutCredential = false; + object.name = ""; + object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.unit = ""; + object.description = ""; + object.displayName = ""; + object.type = ""; + object.metadata = null; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.oauth != null && message.hasOwnProperty("oauth")) - object.oauth = $root.google.api.OAuthRequirements.toObject(message.oauth, options); - if (message.allowWithoutCredential != null && message.hasOwnProperty("allowWithoutCredential")) - object.allowWithoutCredential = message.allowWithoutCredential; - if (message.requirements && message.requirements.length) { - object.requirements = []; - for (var j = 0; j < message.requirements.length; ++j) - object.requirements[j] = $root.google.api.AuthRequirement.toObject(message.requirements[j], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { + object.monitoredResourceTypes = []; + for (var j = 0; j < message.monitoredResourceTypes.length; ++j) + object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; } return object; }; /** - * Converts this AuthenticationRule to JSON. + * Converts this MetricDescriptor to JSON. * @function toJSON - * @memberof google.api.AuthenticationRule + * @memberof google.api.MetricDescriptor * @instance * @returns {Object.} JSON object */ - AuthenticationRule.prototype.toJSON = function toJSON() { + MetricDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AuthenticationRule; - })(); - - api.JwtLocation = (function() { + MetricDescriptor.MetricDescriptorMetadata = (function() { - /** - * Properties of a JwtLocation. - * @memberof google.api - * @interface IJwtLocation - * @property {string|null} [header] JwtLocation header - * @property {string|null} [query] JwtLocation query - * @property {string|null} [valuePrefix] JwtLocation valuePrefix - */ + /** + * Properties of a MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @interface IMetricDescriptorMetadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage + * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod + * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay + */ - /** - * Constructs a new JwtLocation. - * @memberof google.api - * @classdesc Represents a JwtLocation. - * @implements IJwtLocation - * @constructor - * @param {google.api.IJwtLocation=} [properties] Properties to set - */ - function JwtLocation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @classdesc Represents a MetricDescriptorMetadata. + * @implements IMetricDescriptorMetadata + * @constructor + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + */ + function MetricDescriptorMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * JwtLocation header. - * @member {string|null|undefined} header - * @memberof google.api.JwtLocation - * @instance - */ - JwtLocation.prototype.header = null; + /** + * MetricDescriptorMetadata launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.launchStage = 0; - /** - * JwtLocation query. - * @member {string|null|undefined} query - * @memberof google.api.JwtLocation - * @instance - */ - JwtLocation.prototype.query = null; + /** + * MetricDescriptorMetadata samplePeriod. + * @member {google.protobuf.IDuration|null|undefined} samplePeriod + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.samplePeriod = null; - /** - * JwtLocation valuePrefix. - * @member {string} valuePrefix - * @memberof google.api.JwtLocation - * @instance - */ - JwtLocation.prototype.valuePrefix = ""; + /** + * MetricDescriptorMetadata ingestDelay. + * @member {google.protobuf.IDuration|null|undefined} ingestDelay + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.ingestDelay = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a new MetricDescriptorMetadata instance using the specified properties. + * @function create + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance + */ + MetricDescriptorMetadata.create = function create(properties) { + return new MetricDescriptorMetadata(properties); + }; - /** - * JwtLocation in. - * @member {"header"|"query"|undefined} in_ - * @memberof google.api.JwtLocation - * @instance - */ - Object.defineProperty(JwtLocation.prototype, "in", { - get: $util.oneOfGetter($oneOfFields = ["header", "query"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); + if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) + $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) + $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Creates a new JwtLocation instance using the specified properties. - * @function create - * @memberof google.api.JwtLocation - * @static - * @param {google.api.IJwtLocation=} [properties] Properties to set - * @returns {google.api.JwtLocation} JwtLocation instance - */ - JwtLocation.create = function create(properties) { - return new JwtLocation(properties); - }; + /** + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified JwtLocation message. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. - * @function encode - * @memberof google.api.JwtLocation - * @static - * @param {google.api.IJwtLocation} message JwtLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JwtLocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.header); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); - if (message.valuePrefix != null && Object.hasOwnProperty.call(message, "valuePrefix")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.valuePrefix); - return writer; - }; + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decode = function 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.MetricDescriptor.MetricDescriptorMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.launchStage = reader.int32(); + break; + case 2: + message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified JwtLocation message, length delimited. Does not implicitly {@link google.api.JwtLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JwtLocation - * @static - * @param {google.api.IJwtLocation} message JwtLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JwtLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a JwtLocation message from the specified reader or buffer. - * @function decode - * @memberof google.api.JwtLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JwtLocation} JwtLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JwtLocation.decode = function 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.JwtLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Verifies a MetricDescriptorMetadata message. + * @function verify + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricDescriptorMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { + var error = $root.google.protobuf.Duration.verify(message.samplePeriod); + if (error) + return "samplePeriod." + error; + } + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { + var error = $root.google.protobuf.Duration.verify(message.ingestDelay); + if (error) + return "ingestDelay." + error; + } + return null; + }; + + /** + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + */ + MetricDescriptorMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) + return object; + var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + switch (object.launchStage) { + 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.header = reader.string(); + message.launchStage = 1; break; + case "ALPHA": case 2: - message.query = reader.string(); + message.launchStage = 2; break; + case "BETA": case 3: - message.valuePrefix = reader.string(); + message.launchStage = 3; break; - default: - reader.skipType(tag & 7); + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; break; } - } - return message; - }; + if (object.samplePeriod != null) { + if (typeof object.samplePeriod !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); + message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); + } + if (object.ingestDelay != null) { + if (typeof object.ingestDelay !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); + message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); + } + return message; + }; + + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricDescriptorMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.samplePeriod = null; + object.ingestDelay = null; + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) + object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) + object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); + return object; + }; + + /** + * Converts this MetricDescriptorMetadata to JSON. + * @function toJSON + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + * @returns {Object.} JSON object + */ + MetricDescriptorMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MetricDescriptorMetadata; + })(); /** - * Decodes a JwtLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JwtLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JwtLocation} JwtLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * MetricKind enum. + * @name google.api.MetricDescriptor.MetricKind + * @enum {number} + * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value + * @property {number} GAUGE=1 GAUGE value + * @property {number} DELTA=2 DELTA value + * @property {number} CUMULATIVE=3 CUMULATIVE value */ - JwtLocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + MetricDescriptor.MetricKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "GAUGE"] = 1; + values[valuesById[2] = "DELTA"] = 2; + values[valuesById[3] = "CUMULATIVE"] = 3; + return values; + })(); /** - * Verifies a JwtLocation message. - * @function verify - * @memberof google.api.JwtLocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * ValueType enum. + * @name google.api.MetricDescriptor.ValueType + * @enum {number} + * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + * @property {number} DOUBLE=3 DOUBLE value + * @property {number} STRING=4 STRING value + * @property {number} DISTRIBUTION=5 DISTRIBUTION value + * @property {number} MONEY=6 MONEY value */ - JwtLocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.header != null && message.hasOwnProperty("header")) { - properties["in"] = 1; - if (!$util.isString(message.header)) - return "header: string expected"; - } - if (message.query != null && message.hasOwnProperty("query")) { - if (properties["in"] === 1) - return "in: multiple values"; - properties["in"] = 1; - if (!$util.isString(message.query)) - return "query: string expected"; - } - if (message.valuePrefix != null && message.hasOwnProperty("valuePrefix")) - if (!$util.isString(message.valuePrefix)) - return "valuePrefix: string expected"; - return null; - }; + MetricDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + values[valuesById[3] = "DOUBLE"] = 3; + values[valuesById[4] = "STRING"] = 4; + values[valuesById[5] = "DISTRIBUTION"] = 5; + values[valuesById[6] = "MONEY"] = 6; + return values; + })(); + + return MetricDescriptor; + })(); + + api.Metric = (function() { /** - * Creates a JwtLocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JwtLocation - * @static - * @param {Object.} object Plain object - * @returns {google.api.JwtLocation} JwtLocation + * Properties of a Metric. + * @memberof google.api + * @interface IMetric + * @property {string|null} [type] Metric type + * @property {Object.|null} [labels] Metric labels */ - JwtLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JwtLocation) - return object; - var message = new $root.google.api.JwtLocation(); - if (object.header != null) - message.header = String(object.header); - if (object.query != null) - message.query = String(object.query); - if (object.valuePrefix != null) - message.valuePrefix = String(object.valuePrefix); - return message; - }; /** - * Creates a plain object from a JwtLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JwtLocation - * @static - * @param {google.api.JwtLocation} message JwtLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Constructs a new Metric. + * @memberof google.api + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.api.IMetric=} [properties] Properties to set */ - JwtLocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.valuePrefix = ""; - if (message.header != null && message.hasOwnProperty("header")) { - object.header = message.header; - if (options.oneofs) - object["in"] = "header"; - } - if (message.query != null && message.hasOwnProperty("query")) { - object.query = message.query; - if (options.oneofs) - object["in"] = "query"; - } - if (message.valuePrefix != null && message.hasOwnProperty("valuePrefix")) - object.valuePrefix = message.valuePrefix; - return object; - }; - - /** - * Converts this JwtLocation to JSON. - * @function toJSON - * @memberof google.api.JwtLocation - * @instance - * @returns {Object.} JSON object - */ - JwtLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return JwtLocation; - })(); - - api.AuthProvider = (function() { - - /** - * Properties of an AuthProvider. - * @memberof google.api - * @interface IAuthProvider - * @property {string|null} [id] AuthProvider id - * @property {string|null} [issuer] AuthProvider issuer - * @property {string|null} [jwksUri] AuthProvider jwksUri - * @property {string|null} [audiences] AuthProvider audiences - * @property {string|null} [authorizationUrl] AuthProvider authorizationUrl - * @property {Array.|null} [jwtLocations] AuthProvider jwtLocations - */ - - /** - * Constructs a new AuthProvider. - * @memberof google.api - * @classdesc Represents an AuthProvider. - * @implements IAuthProvider - * @constructor - * @param {google.api.IAuthProvider=} [properties] Properties to set - */ - function AuthProvider(properties) { - this.jwtLocations = []; + function Metric(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13938,143 +14198,108 @@ } /** - * AuthProvider id. - * @member {string} id - * @memberof google.api.AuthProvider - * @instance - */ - AuthProvider.prototype.id = ""; - - /** - * AuthProvider issuer. - * @member {string} issuer - * @memberof google.api.AuthProvider - * @instance - */ - AuthProvider.prototype.issuer = ""; - - /** - * AuthProvider jwksUri. - * @member {string} jwksUri - * @memberof google.api.AuthProvider - * @instance - */ - AuthProvider.prototype.jwksUri = ""; - - /** - * AuthProvider audiences. - * @member {string} audiences - * @memberof google.api.AuthProvider - * @instance - */ - AuthProvider.prototype.audiences = ""; - - /** - * AuthProvider authorizationUrl. - * @member {string} authorizationUrl - * @memberof google.api.AuthProvider + * Metric type. + * @member {string} type + * @memberof google.api.Metric * @instance */ - AuthProvider.prototype.authorizationUrl = ""; + Metric.prototype.type = ""; /** - * AuthProvider jwtLocations. - * @member {Array.} jwtLocations - * @memberof google.api.AuthProvider + * Metric labels. + * @member {Object.} labels + * @memberof google.api.Metric * @instance */ - AuthProvider.prototype.jwtLocations = $util.emptyArray; + Metric.prototype.labels = $util.emptyObject; /** - * Creates a new AuthProvider instance using the specified properties. + * Creates a new Metric instance using the specified properties. * @function create - * @memberof google.api.AuthProvider + * @memberof google.api.Metric * @static - * @param {google.api.IAuthProvider=} [properties] Properties to set - * @returns {google.api.AuthProvider} AuthProvider instance + * @param {google.api.IMetric=} [properties] Properties to set + * @returns {google.api.Metric} Metric instance */ - AuthProvider.create = function create(properties) { - return new AuthProvider(properties); + Metric.create = function create(properties) { + return new Metric(properties); }; /** - * Encodes the specified AuthProvider message. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. * @function encode - * @memberof google.api.AuthProvider + * @memberof google.api.Metric * @static - * @param {google.api.IAuthProvider} message AuthProvider message or plain object to encode + * @param {google.api.IMetric} message Metric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuthProvider.encode = function encode(message, writer) { + Metric.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.issuer); - if (message.jwksUri != null && Object.hasOwnProperty.call(message, "jwksUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.jwksUri); - if (message.audiences != null && Object.hasOwnProperty.call(message, "audiences")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.audiences); - if (message.authorizationUrl != null && Object.hasOwnProperty.call(message, "authorizationUrl")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.authorizationUrl); - if (message.jwtLocations != null && message.jwtLocations.length) - for (var i = 0; i < message.jwtLocations.length; ++i) - $root.google.api.JwtLocation.encode(message.jwtLocations[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); return writer; }; /** - * Encodes the specified AuthProvider message, length delimited. Does not implicitly {@link google.api.AuthProvider.verify|verify} messages. + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.AuthProvider + * @memberof google.api.Metric * @static - * @param {google.api.IAuthProvider} message AuthProvider message or plain object to encode + * @param {google.api.IMetric} message Metric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuthProvider.encodeDelimited = function encodeDelimited(message, writer) { + Metric.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AuthProvider message from the specified reader or buffer. + * Decodes a Metric message from the specified reader or buffer. * @function decode - * @memberof google.api.AuthProvider + * @memberof google.api.Metric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.AuthProvider} AuthProvider + * @returns {google.api.Metric} Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AuthProvider.decode = function decode(reader, length) { + Metric.decode = function 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.AuthProvider(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.issuer = reader.string(); - break; case 3: - message.jwksUri = reader.string(); - break; - case 4: - message.audiences = reader.string(); - break; - case 5: - message.authorizationUrl = reader.string(); + message.type = reader.string(); break; - case 6: - if (!(message.jwtLocations && message.jwtLocations.length)) - message.jwtLocations = []; - message.jwtLocations.push($root.google.api.JwtLocation.decode(reader, reader.uint32())); + case 2: + 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; default: reader.skipType(tag & 7); @@ -14085,166 +14310,132 @@ }; /** - * Decodes an AuthProvider message from the specified reader or buffer, length delimited. + * Decodes a Metric message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.AuthProvider + * @memberof google.api.Metric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.AuthProvider} AuthProvider + * @returns {google.api.Metric} Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AuthProvider.decodeDelimited = function decodeDelimited(reader) { + Metric.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AuthProvider message. + * Verifies a Metric message. * @function verify - * @memberof google.api.AuthProvider + * @memberof google.api.Metric * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AuthProvider.verify = function verify(message) { + Metric.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.issuer != null && message.hasOwnProperty("issuer")) - if (!$util.isString(message.issuer)) - return "issuer: string expected"; - if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) - if (!$util.isString(message.jwksUri)) - return "jwksUri: string expected"; - if (message.audiences != null && message.hasOwnProperty("audiences")) - if (!$util.isString(message.audiences)) - return "audiences: string expected"; - if (message.authorizationUrl != null && message.hasOwnProperty("authorizationUrl")) - if (!$util.isString(message.authorizationUrl)) - return "authorizationUrl: string expected"; - if (message.jwtLocations != null && message.hasOwnProperty("jwtLocations")) { - if (!Array.isArray(message.jwtLocations)) - return "jwtLocations: array expected"; - for (var i = 0; i < message.jwtLocations.length; ++i) { - var error = $root.google.api.JwtLocation.verify(message.jwtLocations[i]); - if (error) - return "jwtLocations." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: 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"; } return null; }; /** - * Creates an AuthProvider message from a plain object. Also converts values to their respective internal types. + * Creates a Metric message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.AuthProvider + * @memberof google.api.Metric * @static * @param {Object.} object Plain object - * @returns {google.api.AuthProvider} AuthProvider + * @returns {google.api.Metric} Metric */ - AuthProvider.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.AuthProvider) + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Metric) return object; - var message = new $root.google.api.AuthProvider(); - if (object.id != null) - message.id = String(object.id); - if (object.issuer != null) - message.issuer = String(object.issuer); - if (object.jwksUri != null) - message.jwksUri = String(object.jwksUri); - if (object.audiences != null) - message.audiences = String(object.audiences); - if (object.authorizationUrl != null) - message.authorizationUrl = String(object.authorizationUrl); - if (object.jwtLocations) { - if (!Array.isArray(object.jwtLocations)) - throw TypeError(".google.api.AuthProvider.jwtLocations: array expected"); - message.jwtLocations = []; - for (var i = 0; i < object.jwtLocations.length; ++i) { - if (typeof object.jwtLocations[i] !== "object") - throw TypeError(".google.api.AuthProvider.jwtLocations: object expected"); - message.jwtLocations[i] = $root.google.api.JwtLocation.fromObject(object.jwtLocations[i]); - } + var message = new $root.google.api.Metric(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.Metric.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]]); } return message; }; /** - * Creates a plain object from an AuthProvider message. Also converts values to other types if specified. + * Creates a plain object from a Metric message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.AuthProvider + * @memberof google.api.Metric * @static - * @param {google.api.AuthProvider} message AuthProvider + * @param {google.api.Metric} message Metric * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AuthProvider.toObject = function toObject(message, options) { + Metric.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.jwtLocations = []; - if (options.defaults) { - object.id = ""; - object.issuer = ""; - object.jwksUri = ""; - object.audiences = ""; - object.authorizationUrl = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.issuer != null && message.hasOwnProperty("issuer")) - object.issuer = message.issuer; - if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) - object.jwksUri = message.jwksUri; - if (message.audiences != null && message.hasOwnProperty("audiences")) - object.audiences = message.audiences; - if (message.authorizationUrl != null && message.hasOwnProperty("authorizationUrl")) - object.authorizationUrl = message.authorizationUrl; - if (message.jwtLocations && message.jwtLocations.length) { - object.jwtLocations = []; - for (var j = 0; j < message.jwtLocations.length; ++j) - object.jwtLocations[j] = $root.google.api.JwtLocation.toObject(message.jwtLocations[j], options); + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + 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.type != null && message.hasOwnProperty("type")) + object.type = message.type; return object; }; /** - * Converts this AuthProvider to JSON. + * Converts this Metric to JSON. * @function toJSON - * @memberof google.api.AuthProvider + * @memberof google.api.Metric * @instance * @returns {Object.} JSON object */ - AuthProvider.prototype.toJSON = function toJSON() { + Metric.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AuthProvider; + return Metric; })(); - api.OAuthRequirements = (function() { + api.LabelDescriptor = (function() { /** - * Properties of a OAuthRequirements. + * Properties of a LabelDescriptor. * @memberof google.api - * @interface IOAuthRequirements - * @property {string|null} [canonicalScopes] OAuthRequirements canonicalScopes + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description */ /** - * Constructs a new OAuthRequirements. + * Constructs a new LabelDescriptor. * @memberof google.api - * @classdesc Represents a OAuthRequirements. - * @implements IOAuthRequirements + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor * @constructor - * @param {google.api.IOAuthRequirements=} [properties] Properties to set + * @param {google.api.ILabelDescriptor=} [properties] Properties to set */ - function OAuthRequirements(properties) { + function LabelDescriptor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14252,75 +14443,101 @@ } /** - * OAuthRequirements canonicalScopes. - * @member {string} canonicalScopes - * @memberof google.api.OAuthRequirements + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor * @instance */ - OAuthRequirements.prototype.canonicalScopes = ""; + LabelDescriptor.prototype.key = ""; /** - * Creates a new OAuthRequirements instance using the specified properties. + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.valueType = 0; + + /** + * LabelDescriptor description. + * @member {string} description + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.description = ""; + + /** + * Creates a new LabelDescriptor instance using the specified properties. * @function create - * @memberof google.api.OAuthRequirements + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IOAuthRequirements=} [properties] Properties to set - * @returns {google.api.OAuthRequirements} OAuthRequirements instance + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance */ - OAuthRequirements.create = function create(properties) { - return new OAuthRequirements(properties); + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); }; /** - * Encodes the specified OAuthRequirements message. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.OAuthRequirements + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IOAuthRequirements} message OAuthRequirements message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OAuthRequirements.encode = function encode(message, writer) { + LabelDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.canonicalScopes != null && Object.hasOwnProperty.call(message, "canonicalScopes")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.canonicalScopes); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); return writer; }; /** - * Encodes the specified OAuthRequirements message, length delimited. Does not implicitly {@link google.api.OAuthRequirements.verify|verify} messages. + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.OAuthRequirements + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IOAuthRequirements} message OAuthRequirements message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OAuthRequirements.encodeDelimited = function encodeDelimited(message, writer) { + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a OAuthRequirements message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.OAuthRequirements + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.OAuthRequirements} OAuthRequirements + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OAuthRequirements.decode = function decode(reader, length) { + LabelDescriptor.decode = function 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.OAuthRequirements(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.canonicalScopes = reader.string(); + message.key = reader.string(); + break; + case 2: + message.valueType = reader.int32(); + break; + case 3: + message.description = reader.string(); break; default: reader.skipType(tag & 7); @@ -14331,108 +14548,185 @@ }; /** - * Decodes a OAuthRequirements message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.OAuthRequirements + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.OAuthRequirements} OAuthRequirements + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OAuthRequirements.decodeDelimited = function decodeDelimited(reader) { + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a OAuthRequirements message. + * Verifies a LabelDescriptor message. * @function verify - * @memberof google.api.OAuthRequirements + * @memberof google.api.LabelDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OAuthRequirements.verify = function verify(message) { + LabelDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.canonicalScopes != null && message.hasOwnProperty("canonicalScopes")) - if (!$util.isString(message.canonicalScopes)) - return "canonicalScopes: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a OAuthRequirements message from a plain object. Also converts values to their respective internal types. + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.OAuthRequirements + * @memberof google.api.LabelDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.OAuthRequirements} OAuthRequirements + * @returns {google.api.LabelDescriptor} LabelDescriptor */ - OAuthRequirements.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.OAuthRequirements) + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) return object; - var message = new $root.google.api.OAuthRequirements(); - if (object.canonicalScopes != null) - message.canonicalScopes = String(object.canonicalScopes); + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { + case "STRING": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + } + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a OAuthRequirements message. Also converts values to other types if specified. + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.OAuthRequirements + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.OAuthRequirements} message OAuthRequirements + * @param {google.api.LabelDescriptor} message LabelDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OAuthRequirements.toObject = function toObject(message, options) { + LabelDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.canonicalScopes = ""; - if (message.canonicalScopes != null && message.hasOwnProperty("canonicalScopes")) - object.canonicalScopes = message.canonicalScopes; + if (options.defaults) { + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; + object.description = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this OAuthRequirements to JSON. + * Converts this LabelDescriptor to JSON. * @function toJSON - * @memberof google.api.OAuthRequirements + * @memberof google.api.LabelDescriptor * @instance * @returns {Object.} JSON object */ - OAuthRequirements.prototype.toJSON = function toJSON() { + LabelDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OAuthRequirements; + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; + })(); + + return LabelDescriptor; })(); - api.AuthRequirement = (function() { + /** + * 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; + })(); + + api.Context = (function() { /** - * Properties of an AuthRequirement. + * Properties of a Context. * @memberof google.api - * @interface IAuthRequirement - * @property {string|null} [providerId] AuthRequirement providerId - * @property {string|null} [audiences] AuthRequirement audiences + * @interface IContext + * @property {Array.|null} [rules] Context rules */ /** - * Constructs a new AuthRequirement. + * Constructs a new Context. * @memberof google.api - * @classdesc Represents an AuthRequirement. - * @implements IAuthRequirement + * @classdesc Represents a Context. + * @implements IContext * @constructor - * @param {google.api.IAuthRequirement=} [properties] Properties to set + * @param {google.api.IContext=} [properties] Properties to set */ - function AuthRequirement(properties) { + function Context(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14440,88 +14734,78 @@ } /** - * AuthRequirement providerId. - * @member {string} providerId - * @memberof google.api.AuthRequirement - * @instance - */ - AuthRequirement.prototype.providerId = ""; - - /** - * AuthRequirement audiences. - * @member {string} audiences - * @memberof google.api.AuthRequirement + * Context rules. + * @member {Array.} rules + * @memberof google.api.Context * @instance */ - AuthRequirement.prototype.audiences = ""; + Context.prototype.rules = $util.emptyArray; /** - * Creates a new AuthRequirement instance using the specified properties. + * Creates a new Context instance using the specified properties. * @function create - * @memberof google.api.AuthRequirement + * @memberof google.api.Context * @static - * @param {google.api.IAuthRequirement=} [properties] Properties to set - * @returns {google.api.AuthRequirement} AuthRequirement instance + * @param {google.api.IContext=} [properties] Properties to set + * @returns {google.api.Context} Context instance */ - AuthRequirement.create = function create(properties) { - return new AuthRequirement(properties); + Context.create = function create(properties) { + return new Context(properties); }; /** - * Encodes the specified AuthRequirement message. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. + * Encodes the specified Context message. Does not implicitly {@link google.api.Context.verify|verify} messages. * @function encode - * @memberof google.api.AuthRequirement + * @memberof google.api.Context * @static - * @param {google.api.IAuthRequirement} message AuthRequirement message or plain object to encode + * @param {google.api.IContext} message Context message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuthRequirement.encode = function encode(message, writer) { + Context.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.providerId != null && Object.hasOwnProperty.call(message, "providerId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.providerId); - if (message.audiences != null && Object.hasOwnProperty.call(message, "audiences")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.audiences); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.ContextRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified AuthRequirement message, length delimited. Does not implicitly {@link google.api.AuthRequirement.verify|verify} messages. + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.api.Context.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.AuthRequirement + * @memberof google.api.Context * @static - * @param {google.api.IAuthRequirement} message AuthRequirement message or plain object to encode + * @param {google.api.IContext} message Context message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuthRequirement.encodeDelimited = function encodeDelimited(message, writer) { + Context.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AuthRequirement message from the specified reader or buffer. + * Decodes a Context message from the specified reader or buffer. * @function decode - * @memberof google.api.AuthRequirement + * @memberof google.api.Context * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.AuthRequirement} AuthRequirement + * @returns {google.api.Context} Context * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AuthRequirement.decode = function decode(reader, length) { + Context.decode = function 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.AuthRequirement(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Context(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.providerId = reader.string(); - break; - case 2: - message.audiences = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.ContextRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -14532,117 +14816,132 @@ }; /** - * Decodes an AuthRequirement message from the specified reader or buffer, length delimited. + * Decodes a Context message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.AuthRequirement + * @memberof google.api.Context * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.AuthRequirement} AuthRequirement + * @returns {google.api.Context} Context * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AuthRequirement.decodeDelimited = function decodeDelimited(reader) { + Context.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AuthRequirement message. + * Verifies a Context message. * @function verify - * @memberof google.api.AuthRequirement + * @memberof google.api.Context * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AuthRequirement.verify = function verify(message) { + Context.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.providerId != null && message.hasOwnProperty("providerId")) - if (!$util.isString(message.providerId)) - return "providerId: string expected"; - if (message.audiences != null && message.hasOwnProperty("audiences")) - if (!$util.isString(message.audiences)) - return "audiences: string expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.ContextRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } return null; }; /** - * Creates an AuthRequirement message from a plain object. Also converts values to their respective internal types. + * Creates a Context message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.AuthRequirement + * @memberof google.api.Context * @static * @param {Object.} object Plain object - * @returns {google.api.AuthRequirement} AuthRequirement + * @returns {google.api.Context} Context */ - AuthRequirement.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.AuthRequirement) + Context.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Context) return object; - var message = new $root.google.api.AuthRequirement(); - if (object.providerId != null) - message.providerId = String(object.providerId); - if (object.audiences != null) - message.audiences = String(object.audiences); + var message = new $root.google.api.Context(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Context.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Context.rules: object expected"); + message.rules[i] = $root.google.api.ContextRule.fromObject(object.rules[i]); + } + } return message; }; /** - * Creates a plain object from an AuthRequirement message. Also converts values to other types if specified. + * Creates a plain object from a Context message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.AuthRequirement + * @memberof google.api.Context * @static - * @param {google.api.AuthRequirement} message AuthRequirement + * @param {google.api.Context} message Context * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AuthRequirement.toObject = function toObject(message, options) { + Context.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.providerId = ""; - object.audiences = ""; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.ContextRule.toObject(message.rules[j], options); } - if (message.providerId != null && message.hasOwnProperty("providerId")) - object.providerId = message.providerId; - if (message.audiences != null && message.hasOwnProperty("audiences")) - object.audiences = message.audiences; return object; }; /** - * Converts this AuthRequirement to JSON. + * Converts this Context to JSON. * @function toJSON - * @memberof google.api.AuthRequirement + * @memberof google.api.Context * @instance * @returns {Object.} JSON object */ - AuthRequirement.prototype.toJSON = function toJSON() { + Context.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AuthRequirement; + return Context; })(); - api.Backend = (function() { + api.ContextRule = (function() { /** - * Properties of a Backend. + * Properties of a ContextRule. * @memberof google.api - * @interface IBackend - * @property {Array.|null} [rules] Backend rules + * @interface IContextRule + * @property {string|null} [selector] ContextRule selector + * @property {Array.|null} [requested] ContextRule requested + * @property {Array.|null} [provided] ContextRule provided + * @property {Array.|null} [allowedRequestExtensions] ContextRule allowedRequestExtensions + * @property {Array.|null} [allowedResponseExtensions] ContextRule allowedResponseExtensions */ /** - * Constructs a new Backend. + * Constructs a new ContextRule. * @memberof google.api - * @classdesc Represents a Backend. - * @implements IBackend + * @classdesc Represents a ContextRule. + * @implements IContextRule * @constructor - * @param {google.api.IBackend=} [properties] Properties to set + * @param {google.api.IContextRule=} [properties] Properties to set */ - function Backend(properties) { - this.rules = []; + function ContextRule(properties) { + this.requested = []; + this.provided = []; + this.allowedRequestExtensions = []; + this.allowedResponseExtensions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14650,78 +14949,139 @@ } /** - * Backend rules. - * @member {Array.} rules - * @memberof google.api.Backend + * ContextRule selector. + * @member {string} selector + * @memberof google.api.ContextRule * @instance */ - Backend.prototype.rules = $util.emptyArray; + ContextRule.prototype.selector = ""; /** - * Creates a new Backend instance using the specified properties. + * ContextRule requested. + * @member {Array.} requested + * @memberof google.api.ContextRule + * @instance + */ + ContextRule.prototype.requested = $util.emptyArray; + + /** + * ContextRule provided. + * @member {Array.} provided + * @memberof google.api.ContextRule + * @instance + */ + ContextRule.prototype.provided = $util.emptyArray; + + /** + * ContextRule allowedRequestExtensions. + * @member {Array.} allowedRequestExtensions + * @memberof google.api.ContextRule + * @instance + */ + ContextRule.prototype.allowedRequestExtensions = $util.emptyArray; + + /** + * ContextRule allowedResponseExtensions. + * @member {Array.} allowedResponseExtensions + * @memberof google.api.ContextRule + * @instance + */ + ContextRule.prototype.allowedResponseExtensions = $util.emptyArray; + + /** + * Creates a new ContextRule instance using the specified properties. * @function create - * @memberof google.api.Backend + * @memberof google.api.ContextRule * @static - * @param {google.api.IBackend=} [properties] Properties to set - * @returns {google.api.Backend} Backend instance + * @param {google.api.IContextRule=} [properties] Properties to set + * @returns {google.api.ContextRule} ContextRule instance */ - Backend.create = function create(properties) { - return new Backend(properties); + ContextRule.create = function create(properties) { + return new ContextRule(properties); }; /** - * Encodes the specified Backend message. Does not implicitly {@link google.api.Backend.verify|verify} messages. + * Encodes the specified ContextRule message. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. * @function encode - * @memberof google.api.Backend + * @memberof google.api.ContextRule * @static - * @param {google.api.IBackend} message Backend message or plain object to encode + * @param {google.api.IContextRule} message ContextRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backend.encode = function encode(message, writer) { + ContextRule.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.BackendRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.requested != null && message.requested.length) + for (var i = 0; i < message.requested.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requested[i]); + if (message.provided != null && message.provided.length) + for (var i = 0; i < message.provided.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.provided[i]); + if (message.allowedRequestExtensions != null && message.allowedRequestExtensions.length) + for (var i = 0; i < message.allowedRequestExtensions.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.allowedRequestExtensions[i]); + if (message.allowedResponseExtensions != null && message.allowedResponseExtensions.length) + for (var i = 0; i < message.allowedResponseExtensions.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.allowedResponseExtensions[i]); return writer; }; /** - * Encodes the specified Backend message, length delimited. Does not implicitly {@link google.api.Backend.verify|verify} messages. + * Encodes the specified ContextRule message, length delimited. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Backend + * @memberof google.api.ContextRule * @static - * @param {google.api.IBackend} message Backend message or plain object to encode + * @param {google.api.IContextRule} message ContextRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backend.encodeDelimited = function encodeDelimited(message, writer) { + ContextRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Backend message from the specified reader or buffer. + * Decodes a ContextRule message from the specified reader or buffer. * @function decode - * @memberof google.api.Backend + * @memberof google.api.ContextRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Backend} Backend + * @returns {google.api.ContextRule} ContextRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backend.decode = function decode(reader, length) { + ContextRule.decode = function 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.Backend(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ContextRule(); 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.BackendRule.decode(reader, reader.uint32())); + message.selector = reader.string(); + break; + case 2: + if (!(message.requested && message.requested.length)) + message.requested = []; + message.requested.push(reader.string()); + break; + case 3: + if (!(message.provided && message.provided.length)) + message.provided = []; + message.provided.push(reader.string()); + break; + case 4: + if (!(message.allowedRequestExtensions && message.allowedRequestExtensions.length)) + message.allowedRequestExtensions = []; + message.allowedRequestExtensions.push(reader.string()); + break; + case 5: + if (!(message.allowedResponseExtensions && message.allowedResponseExtensions.length)) + message.allowedResponseExtensions = []; + message.allowedResponseExtensions.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -14732,132 +15092,189 @@ }; /** - * Decodes a Backend message from the specified reader or buffer, length delimited. + * Decodes a ContextRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Backend + * @memberof google.api.ContextRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Backend} Backend + * @returns {google.api.ContextRule} ContextRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backend.decodeDelimited = function decodeDelimited(reader) { + ContextRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Backend message. + * Verifies a ContextRule message. * @function verify - * @memberof google.api.Backend + * @memberof google.api.ContextRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Backend.verify = function verify(message) { + ContextRule.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.BackendRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.requested != null && message.hasOwnProperty("requested")) { + if (!Array.isArray(message.requested)) + return "requested: array expected"; + for (var i = 0; i < message.requested.length; ++i) + if (!$util.isString(message.requested[i])) + return "requested: string[] expected"; + } + if (message.provided != null && message.hasOwnProperty("provided")) { + if (!Array.isArray(message.provided)) + return "provided: array expected"; + for (var i = 0; i < message.provided.length; ++i) + if (!$util.isString(message.provided[i])) + return "provided: string[] expected"; + } + if (message.allowedRequestExtensions != null && message.hasOwnProperty("allowedRequestExtensions")) { + if (!Array.isArray(message.allowedRequestExtensions)) + return "allowedRequestExtensions: array expected"; + for (var i = 0; i < message.allowedRequestExtensions.length; ++i) + if (!$util.isString(message.allowedRequestExtensions[i])) + return "allowedRequestExtensions: string[] expected"; + } + if (message.allowedResponseExtensions != null && message.hasOwnProperty("allowedResponseExtensions")) { + if (!Array.isArray(message.allowedResponseExtensions)) + return "allowedResponseExtensions: array expected"; + for (var i = 0; i < message.allowedResponseExtensions.length; ++i) + if (!$util.isString(message.allowedResponseExtensions[i])) + return "allowedResponseExtensions: string[] expected"; } return null; }; /** - * Creates a Backend message from a plain object. Also converts values to their respective internal types. + * Creates a ContextRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Backend + * @memberof google.api.ContextRule * @static * @param {Object.} object Plain object - * @returns {google.api.Backend} Backend + * @returns {google.api.ContextRule} ContextRule */ - Backend.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Backend) + ContextRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ContextRule) return object; - var message = new $root.google.api.Backend(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Backend.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Backend.rules: object expected"); - message.rules[i] = $root.google.api.BackendRule.fromObject(object.rules[i]); - } + var message = new $root.google.api.ContextRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.requested) { + if (!Array.isArray(object.requested)) + throw TypeError(".google.api.ContextRule.requested: array expected"); + message.requested = []; + for (var i = 0; i < object.requested.length; ++i) + message.requested[i] = String(object.requested[i]); + } + if (object.provided) { + if (!Array.isArray(object.provided)) + throw TypeError(".google.api.ContextRule.provided: array expected"); + message.provided = []; + for (var i = 0; i < object.provided.length; ++i) + message.provided[i] = String(object.provided[i]); + } + if (object.allowedRequestExtensions) { + if (!Array.isArray(object.allowedRequestExtensions)) + throw TypeError(".google.api.ContextRule.allowedRequestExtensions: array expected"); + message.allowedRequestExtensions = []; + for (var i = 0; i < object.allowedRequestExtensions.length; ++i) + message.allowedRequestExtensions[i] = String(object.allowedRequestExtensions[i]); + } + if (object.allowedResponseExtensions) { + if (!Array.isArray(object.allowedResponseExtensions)) + throw TypeError(".google.api.ContextRule.allowedResponseExtensions: array expected"); + message.allowedResponseExtensions = []; + for (var i = 0; i < object.allowedResponseExtensions.length; ++i) + message.allowedResponseExtensions[i] = String(object.allowedResponseExtensions[i]); } return message; }; /** - * Creates a plain object from a Backend message. Also converts values to other types if specified. + * Creates a plain object from a ContextRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Backend + * @memberof google.api.ContextRule * @static - * @param {google.api.Backend} message Backend + * @param {google.api.ContextRule} message ContextRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Backend.toObject = function toObject(message, options) { + ContextRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.BackendRule.toObject(message.rules[j], options); + if (options.arrays || options.defaults) { + object.requested = []; + object.provided = []; + object.allowedRequestExtensions = []; + object.allowedResponseExtensions = []; } - return object; - }; - - /** - * Converts this Backend to JSON. - * @function toJSON - * @memberof google.api.Backend - * @instance - * @returns {Object.} JSON object - */ - Backend.prototype.toJSON = function toJSON() { + if (options.defaults) + object.selector = ""; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.requested && message.requested.length) { + object.requested = []; + for (var j = 0; j < message.requested.length; ++j) + object.requested[j] = message.requested[j]; + } + if (message.provided && message.provided.length) { + object.provided = []; + for (var j = 0; j < message.provided.length; ++j) + object.provided[j] = message.provided[j]; + } + if (message.allowedRequestExtensions && message.allowedRequestExtensions.length) { + object.allowedRequestExtensions = []; + for (var j = 0; j < message.allowedRequestExtensions.length; ++j) + object.allowedRequestExtensions[j] = message.allowedRequestExtensions[j]; + } + if (message.allowedResponseExtensions && message.allowedResponseExtensions.length) { + object.allowedResponseExtensions = []; + for (var j = 0; j < message.allowedResponseExtensions.length; ++j) + object.allowedResponseExtensions[j] = message.allowedResponseExtensions[j]; + } + return object; + }; + + /** + * Converts this ContextRule to JSON. + * @function toJSON + * @memberof google.api.ContextRule + * @instance + * @returns {Object.} JSON object + */ + ContextRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Backend; + return ContextRule; })(); - api.BackendRule = (function() { + api.Control = (function() { /** - * Properties of a BackendRule. + * Properties of a Control. * @memberof google.api - * @interface IBackendRule - * @property {string|null} [selector] BackendRule selector - * @property {string|null} [address] BackendRule address - * @property {number|null} [deadline] BackendRule deadline - * @property {number|null} [minDeadline] BackendRule minDeadline - * @property {number|null} [operationDeadline] BackendRule operationDeadline - * @property {google.api.BackendRule.PathTranslation|null} [pathTranslation] BackendRule pathTranslation - * @property {string|null} [jwtAudience] BackendRule jwtAudience - * @property {boolean|null} [disableAuth] BackendRule disableAuth - * @property {string|null} [protocol] BackendRule protocol + * @interface IControl + * @property {string|null} [environment] Control environment */ /** - * Constructs a new BackendRule. + * Constructs a new Control. * @memberof google.api - * @classdesc Represents a BackendRule. - * @implements IBackendRule + * @classdesc Represents a Control. + * @implements IControl * @constructor - * @param {google.api.IBackendRule=} [properties] Properties to set + * @param {google.api.IControl=} [properties] Properties to set */ - function BackendRule(properties) { + function Control(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14865,193 +15282,75 @@ } /** - * BackendRule selector. - * @member {string} selector - * @memberof google.api.BackendRule - * @instance - */ - BackendRule.prototype.selector = ""; - - /** - * BackendRule address. - * @member {string} address - * @memberof google.api.BackendRule - * @instance - */ - BackendRule.prototype.address = ""; - - /** - * BackendRule deadline. - * @member {number} deadline - * @memberof google.api.BackendRule - * @instance - */ - BackendRule.prototype.deadline = 0; - - /** - * BackendRule minDeadline. - * @member {number} minDeadline - * @memberof google.api.BackendRule - * @instance - */ - BackendRule.prototype.minDeadline = 0; - - /** - * BackendRule operationDeadline. - * @member {number} operationDeadline - * @memberof google.api.BackendRule - * @instance - */ - BackendRule.prototype.operationDeadline = 0; - - /** - * BackendRule pathTranslation. - * @member {google.api.BackendRule.PathTranslation} pathTranslation - * @memberof google.api.BackendRule - * @instance - */ - BackendRule.prototype.pathTranslation = 0; - - /** - * BackendRule jwtAudience. - * @member {string|null|undefined} jwtAudience - * @memberof google.api.BackendRule - * @instance - */ - BackendRule.prototype.jwtAudience = null; - - /** - * BackendRule disableAuth. - * @member {boolean|null|undefined} disableAuth - * @memberof google.api.BackendRule - * @instance - */ - BackendRule.prototype.disableAuth = null; - - /** - * BackendRule protocol. - * @member {string} protocol - * @memberof google.api.BackendRule - * @instance - */ - BackendRule.prototype.protocol = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackendRule authentication. - * @member {"jwtAudience"|"disableAuth"|undefined} authentication - * @memberof google.api.BackendRule + * Control environment. + * @member {string} environment + * @memberof google.api.Control * @instance */ - Object.defineProperty(BackendRule.prototype, "authentication", { - get: $util.oneOfGetter($oneOfFields = ["jwtAudience", "disableAuth"]), - set: $util.oneOfSetter($oneOfFields) - }); + Control.prototype.environment = ""; /** - * Creates a new BackendRule instance using the specified properties. + * Creates a new Control instance using the specified properties. * @function create - * @memberof google.api.BackendRule + * @memberof google.api.Control * @static - * @param {google.api.IBackendRule=} [properties] Properties to set - * @returns {google.api.BackendRule} BackendRule instance + * @param {google.api.IControl=} [properties] Properties to set + * @returns {google.api.Control} Control instance */ - BackendRule.create = function create(properties) { - return new BackendRule(properties); + Control.create = function create(properties) { + return new Control(properties); }; /** - * Encodes the specified BackendRule message. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. + * Encodes the specified Control message. Does not implicitly {@link google.api.Control.verify|verify} messages. * @function encode - * @memberof google.api.BackendRule + * @memberof google.api.Control * @static - * @param {google.api.IBackendRule} message BackendRule message or plain object to encode + * @param {google.api.IControl} message Control message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackendRule.encode = function encode(message, writer) { + Control.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.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.address); - if (message.deadline != null && Object.hasOwnProperty.call(message, "deadline")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.deadline); - if (message.minDeadline != null && Object.hasOwnProperty.call(message, "minDeadline")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.minDeadline); - if (message.operationDeadline != null && Object.hasOwnProperty.call(message, "operationDeadline")) - writer.uint32(/* id 5, wireType 1 =*/41).double(message.operationDeadline); - if (message.pathTranslation != null && Object.hasOwnProperty.call(message, "pathTranslation")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.pathTranslation); - if (message.jwtAudience != null && Object.hasOwnProperty.call(message, "jwtAudience")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.jwtAudience); - if (message.disableAuth != null && Object.hasOwnProperty.call(message, "disableAuth")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.disableAuth); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.protocol); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); return writer; }; /** - * Encodes the specified BackendRule message, length delimited. Does not implicitly {@link google.api.BackendRule.verify|verify} messages. + * Encodes the specified Control message, length delimited. Does not implicitly {@link google.api.Control.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.BackendRule + * @memberof google.api.Control * @static - * @param {google.api.IBackendRule} message BackendRule message or plain object to encode + * @param {google.api.IControl} message Control message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackendRule.encodeDelimited = function encodeDelimited(message, writer) { + Control.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackendRule message from the specified reader or buffer. + * Decodes a Control message from the specified reader or buffer. * @function decode - * @memberof google.api.BackendRule + * @memberof google.api.Control * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.BackendRule} BackendRule + * @returns {google.api.Control} Control * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackendRule.decode = function decode(reader, length) { + Control.decode = function 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.BackendRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Control(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); - break; - case 2: - message.address = reader.string(); - break; - case 3: - message.deadline = reader.double(); - break; - case 4: - message.minDeadline = reader.double(); - break; - case 5: - message.operationDeadline = reader.double(); - break; - case 6: - message.pathTranslation = reader.int32(); - break; - case 7: - message.jwtAudience = reader.string(); - break; - case 8: - message.disableAuth = reader.bool(); - break; - case 9: - message.protocol = reader.string(); + message.environment = reader.string(); break; default: reader.skipType(tag & 7); @@ -15062,218 +15361,114 @@ }; /** - * Decodes a BackendRule message from the specified reader or buffer, length delimited. + * Decodes a Control message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.BackendRule + * @memberof google.api.Control * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.BackendRule} BackendRule + * @returns {google.api.Control} Control * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackendRule.decodeDelimited = function decodeDelimited(reader) { + Control.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackendRule message. + * Verifies a Control message. * @function verify - * @memberof google.api.BackendRule + * @memberof google.api.Control * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackendRule.verify = function verify(message) { + Control.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.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.deadline != null && message.hasOwnProperty("deadline")) - if (typeof message.deadline !== "number") - return "deadline: number expected"; - if (message.minDeadline != null && message.hasOwnProperty("minDeadline")) - if (typeof message.minDeadline !== "number") - return "minDeadline: number expected"; - if (message.operationDeadline != null && message.hasOwnProperty("operationDeadline")) - if (typeof message.operationDeadline !== "number") - return "operationDeadline: number expected"; - if (message.pathTranslation != null && message.hasOwnProperty("pathTranslation")) - switch (message.pathTranslation) { - default: - return "pathTranslation: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jwtAudience != null && message.hasOwnProperty("jwtAudience")) { - properties.authentication = 1; - if (!$util.isString(message.jwtAudience)) - return "jwtAudience: string expected"; - } - if (message.disableAuth != null && message.hasOwnProperty("disableAuth")) { - if (properties.authentication === 1) - return "authentication: multiple values"; - properties.authentication = 1; - if (typeof message.disableAuth !== "boolean") - return "disableAuth: boolean expected"; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; return null; }; /** - * Creates a BackendRule message from a plain object. Also converts values to their respective internal types. + * Creates a Control message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.BackendRule + * @memberof google.api.Control * @static * @param {Object.} object Plain object - * @returns {google.api.BackendRule} BackendRule + * @returns {google.api.Control} Control */ - BackendRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.BackendRule) + Control.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Control) return object; - var message = new $root.google.api.BackendRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.address != null) - message.address = String(object.address); - if (object.deadline != null) - message.deadline = Number(object.deadline); - if (object.minDeadline != null) - message.minDeadline = Number(object.minDeadline); - if (object.operationDeadline != null) - message.operationDeadline = Number(object.operationDeadline); - switch (object.pathTranslation) { - case "PATH_TRANSLATION_UNSPECIFIED": - case 0: - message.pathTranslation = 0; - break; - case "CONSTANT_ADDRESS": - case 1: - message.pathTranslation = 1; - break; - case "APPEND_PATH_TO_ADDRESS": - case 2: - message.pathTranslation = 2; - break; - } - if (object.jwtAudience != null) - message.jwtAudience = String(object.jwtAudience); - if (object.disableAuth != null) - message.disableAuth = Boolean(object.disableAuth); - if (object.protocol != null) - message.protocol = String(object.protocol); + var message = new $root.google.api.Control(); + if (object.environment != null) + message.environment = String(object.environment); return message; }; /** - * Creates a plain object from a BackendRule message. Also converts values to other types if specified. + * Creates a plain object from a Control message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.BackendRule + * @memberof google.api.Control * @static - * @param {google.api.BackendRule} message BackendRule + * @param {google.api.Control} message Control * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackendRule.toObject = function toObject(message, options) { + Control.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.selector = ""; - object.address = ""; - object.deadline = 0; - object.minDeadline = 0; - object.operationDeadline = 0; - object.pathTranslation = options.enums === String ? "PATH_TRANSLATION_UNSPECIFIED" : 0; - object.protocol = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.deadline != null && message.hasOwnProperty("deadline")) - object.deadline = options.json && !isFinite(message.deadline) ? String(message.deadline) : message.deadline; - if (message.minDeadline != null && message.hasOwnProperty("minDeadline")) - object.minDeadline = options.json && !isFinite(message.minDeadline) ? String(message.minDeadline) : message.minDeadline; - if (message.operationDeadline != null && message.hasOwnProperty("operationDeadline")) - object.operationDeadline = options.json && !isFinite(message.operationDeadline) ? String(message.operationDeadline) : message.operationDeadline; - if (message.pathTranslation != null && message.hasOwnProperty("pathTranslation")) - object.pathTranslation = options.enums === String ? $root.google.api.BackendRule.PathTranslation[message.pathTranslation] : message.pathTranslation; - if (message.jwtAudience != null && message.hasOwnProperty("jwtAudience")) { - object.jwtAudience = message.jwtAudience; - if (options.oneofs) - object.authentication = "jwtAudience"; - } - if (message.disableAuth != null && message.hasOwnProperty("disableAuth")) { - object.disableAuth = message.disableAuth; - if (options.oneofs) - object.authentication = "disableAuth"; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; + if (options.defaults) + object.environment = ""; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; return object; }; /** - * Converts this BackendRule to JSON. + * Converts this Control to JSON. * @function toJSON - * @memberof google.api.BackendRule + * @memberof google.api.Control * @instance * @returns {Object.} JSON object */ - BackendRule.prototype.toJSON = function toJSON() { + Control.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * PathTranslation enum. - * @name google.api.BackendRule.PathTranslation - * @enum {number} - * @property {number} PATH_TRANSLATION_UNSPECIFIED=0 PATH_TRANSLATION_UNSPECIFIED value - * @property {number} CONSTANT_ADDRESS=1 CONSTANT_ADDRESS value - * @property {number} APPEND_PATH_TO_ADDRESS=2 APPEND_PATH_TO_ADDRESS value - */ - BackendRule.PathTranslation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PATH_TRANSLATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONSTANT_ADDRESS"] = 1; - values[valuesById[2] = "APPEND_PATH_TO_ADDRESS"] = 2; - return values; - })(); - - return BackendRule; + return Control; })(); - api.Billing = (function() { + api.Documentation = (function() { /** - * Properties of a Billing. + * Properties of a Documentation. * @memberof google.api - * @interface IBilling - * @property {Array.|null} [consumerDestinations] Billing consumerDestinations + * @interface IDocumentation + * @property {string|null} [summary] Documentation summary + * @property {Array.|null} [pages] Documentation pages + * @property {Array.|null} [rules] Documentation rules + * @property {string|null} [documentationRootUrl] Documentation documentationRootUrl + * @property {string|null} [serviceRootUrl] Documentation serviceRootUrl + * @property {string|null} [overview] Documentation overview */ /** - * Constructs a new Billing. + * Constructs a new Documentation. * @memberof google.api - * @classdesc Represents a Billing. - * @implements IBilling + * @classdesc Represents a Documentation. + * @implements IDocumentation * @constructor - * @param {google.api.IBilling=} [properties] Properties to set + * @param {google.api.IDocumentation=} [properties] Properties to set */ - function Billing(properties) { - this.consumerDestinations = []; + function Documentation(properties) { + this.pages = []; + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15281,78 +15476,146 @@ } /** - * Billing consumerDestinations. - * @member {Array.} consumerDestinations - * @memberof google.api.Billing + * Documentation summary. + * @member {string} summary + * @memberof google.api.Documentation * @instance */ - Billing.prototype.consumerDestinations = $util.emptyArray; + Documentation.prototype.summary = ""; /** - * Creates a new Billing instance using the specified properties. + * Documentation pages. + * @member {Array.} pages + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.pages = $util.emptyArray; + + /** + * Documentation rules. + * @member {Array.} rules + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.rules = $util.emptyArray; + + /** + * Documentation documentationRootUrl. + * @member {string} documentationRootUrl + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.documentationRootUrl = ""; + + /** + * Documentation serviceRootUrl. + * @member {string} serviceRootUrl + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.serviceRootUrl = ""; + + /** + * Documentation overview. + * @member {string} overview + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.overview = ""; + + /** + * Creates a new Documentation instance using the specified properties. * @function create - * @memberof google.api.Billing + * @memberof google.api.Documentation * @static - * @param {google.api.IBilling=} [properties] Properties to set - * @returns {google.api.Billing} Billing instance + * @param {google.api.IDocumentation=} [properties] Properties to set + * @returns {google.api.Documentation} Documentation instance */ - Billing.create = function create(properties) { - return new Billing(properties); + Documentation.create = function create(properties) { + return new Documentation(properties); }; /** - * Encodes the specified Billing message. Does not implicitly {@link google.api.Billing.verify|verify} messages. + * Encodes the specified Documentation message. Does not implicitly {@link google.api.Documentation.verify|verify} messages. * @function encode - * @memberof google.api.Billing + * @memberof google.api.Documentation * @static - * @param {google.api.IBilling} message Billing message or plain object to encode + * @param {google.api.IDocumentation} message Documentation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Billing.encode = function encode(message, writer) { + Documentation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.consumerDestinations != null && message.consumerDestinations.length) - for (var i = 0; i < message.consumerDestinations.length; ++i) - $root.google.api.Billing.BillingDestination.encode(message.consumerDestinations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Billing message, length delimited. Does not implicitly {@link google.api.Billing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Billing - * @static - * @param {google.api.IBilling} message Billing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Billing.encodeDelimited = function encodeDelimited(message, writer) { + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.summary); + if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.overview); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.DocumentationRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.documentationRootUrl != null && Object.hasOwnProperty.call(message, "documentationRootUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.documentationRootUrl); + if (message.pages != null && message.pages.length) + for (var i = 0; i < message.pages.length; ++i) + $root.google.api.Page.encode(message.pages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.serviceRootUrl != null && Object.hasOwnProperty.call(message, "serviceRootUrl")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.serviceRootUrl); + return writer; + }; + + /** + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.api.Documentation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Documentation + * @static + * @param {google.api.IDocumentation} message Documentation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documentation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Billing message from the specified reader or buffer. + * Decodes a Documentation message from the specified reader or buffer. * @function decode - * @memberof google.api.Billing + * @memberof google.api.Documentation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Billing} Billing + * @returns {google.api.Documentation} Documentation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Billing.decode = function decode(reader, length) { + Documentation.decode = function 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.Billing(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Documentation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 8: - if (!(message.consumerDestinations && message.consumerDestinations.length)) - message.consumerDestinations = []; - message.consumerDestinations.push($root.google.api.Billing.BillingDestination.decode(reader, reader.uint32())); + case 1: + message.summary = reader.string(); + break; + case 5: + if (!(message.pages && message.pages.length)) + message.pages = []; + message.pages.push($root.google.api.Page.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.DocumentationRule.decode(reader, reader.uint32())); + break; + case 4: + message.documentationRootUrl = reader.string(); + break; + case 6: + message.serviceRootUrl = reader.string(); + break; + case 2: + message.overview = reader.string(); break; default: reader.skipType(tag & 7); @@ -15363,351 +15626,186 @@ }; /** - * Decodes a Billing message from the specified reader or buffer, length delimited. + * Decodes a Documentation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Billing + * @memberof google.api.Documentation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Billing} Billing + * @returns {google.api.Documentation} Documentation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Billing.decodeDelimited = function decodeDelimited(reader) { + Documentation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Billing message. + * Verifies a Documentation message. * @function verify - * @memberof google.api.Billing + * @memberof google.api.Documentation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Billing.verify = function verify(message) { + Documentation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.consumerDestinations != null && message.hasOwnProperty("consumerDestinations")) { - if (!Array.isArray(message.consumerDestinations)) - return "consumerDestinations: array expected"; - for (var i = 0; i < message.consumerDestinations.length; ++i) { - var error = $root.google.api.Billing.BillingDestination.verify(message.consumerDestinations[i]); + if (message.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + if (message.pages != null && message.hasOwnProperty("pages")) { + if (!Array.isArray(message.pages)) + return "pages: array expected"; + for (var i = 0; i < message.pages.length; ++i) { + var error = $root.google.api.Page.verify(message.pages[i]); if (error) - return "consumerDestinations." + error; + return "pages." + error; + } + } + 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.DocumentationRule.verify(message.rules[i]); + if (error) + return "rules." + error; } } + if (message.documentationRootUrl != null && message.hasOwnProperty("documentationRootUrl")) + if (!$util.isString(message.documentationRootUrl)) + return "documentationRootUrl: string expected"; + if (message.serviceRootUrl != null && message.hasOwnProperty("serviceRootUrl")) + if (!$util.isString(message.serviceRootUrl)) + return "serviceRootUrl: string expected"; + if (message.overview != null && message.hasOwnProperty("overview")) + if (!$util.isString(message.overview)) + return "overview: string expected"; return null; }; /** - * Creates a Billing message from a plain object. Also converts values to their respective internal types. + * Creates a Documentation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Billing + * @memberof google.api.Documentation * @static * @param {Object.} object Plain object - * @returns {google.api.Billing} Billing + * @returns {google.api.Documentation} Documentation */ - Billing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Billing) + Documentation.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Documentation) return object; - var message = new $root.google.api.Billing(); - if (object.consumerDestinations) { - if (!Array.isArray(object.consumerDestinations)) - throw TypeError(".google.api.Billing.consumerDestinations: array expected"); - message.consumerDestinations = []; - for (var i = 0; i < object.consumerDestinations.length; ++i) { - if (typeof object.consumerDestinations[i] !== "object") - throw TypeError(".google.api.Billing.consumerDestinations: object expected"); - message.consumerDestinations[i] = $root.google.api.Billing.BillingDestination.fromObject(object.consumerDestinations[i]); + var message = new $root.google.api.Documentation(); + if (object.summary != null) + message.summary = String(object.summary); + if (object.pages) { + if (!Array.isArray(object.pages)) + throw TypeError(".google.api.Documentation.pages: array expected"); + message.pages = []; + for (var i = 0; i < object.pages.length; ++i) { + if (typeof object.pages[i] !== "object") + throw TypeError(".google.api.Documentation.pages: object expected"); + message.pages[i] = $root.google.api.Page.fromObject(object.pages[i]); + } + } + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Documentation.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Documentation.rules: object expected"); + message.rules[i] = $root.google.api.DocumentationRule.fromObject(object.rules[i]); } } + if (object.documentationRootUrl != null) + message.documentationRootUrl = String(object.documentationRootUrl); + if (object.serviceRootUrl != null) + message.serviceRootUrl = String(object.serviceRootUrl); + if (object.overview != null) + message.overview = String(object.overview); return message; }; /** - * Creates a plain object from a Billing message. Also converts values to other types if specified. + * Creates a plain object from a Documentation message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Billing + * @memberof google.api.Documentation * @static - * @param {google.api.Billing} message Billing + * @param {google.api.Documentation} message Documentation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Billing.toObject = function toObject(message, options) { + Documentation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.consumerDestinations = []; - if (message.consumerDestinations && message.consumerDestinations.length) { - object.consumerDestinations = []; - for (var j = 0; j < message.consumerDestinations.length; ++j) - object.consumerDestinations[j] = $root.google.api.Billing.BillingDestination.toObject(message.consumerDestinations[j], options); + if (options.arrays || options.defaults) { + object.rules = []; + object.pages = []; + } + if (options.defaults) { + object.summary = ""; + object.overview = ""; + object.documentationRootUrl = ""; + object.serviceRootUrl = ""; + } + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + if (message.overview != null && message.hasOwnProperty("overview")) + object.overview = message.overview; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.DocumentationRule.toObject(message.rules[j], options); + } + if (message.documentationRootUrl != null && message.hasOwnProperty("documentationRootUrl")) + object.documentationRootUrl = message.documentationRootUrl; + if (message.pages && message.pages.length) { + object.pages = []; + for (var j = 0; j < message.pages.length; ++j) + object.pages[j] = $root.google.api.Page.toObject(message.pages[j], options); } + if (message.serviceRootUrl != null && message.hasOwnProperty("serviceRootUrl")) + object.serviceRootUrl = message.serviceRootUrl; return object; }; /** - * Converts this Billing to JSON. + * Converts this Documentation to JSON. * @function toJSON - * @memberof google.api.Billing + * @memberof google.api.Documentation * @instance * @returns {Object.} JSON object */ - Billing.prototype.toJSON = function toJSON() { + Documentation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Billing.BillingDestination = (function() { - - /** - * Properties of a BillingDestination. - * @memberof google.api.Billing - * @interface IBillingDestination - * @property {string|null} [monitoredResource] BillingDestination monitoredResource - * @property {Array.|null} [metrics] BillingDestination metrics - */ - - /** - * Constructs a new BillingDestination. - * @memberof google.api.Billing - * @classdesc Represents a BillingDestination. - * @implements IBillingDestination - * @constructor - * @param {google.api.Billing.IBillingDestination=} [properties] Properties to set - */ - function BillingDestination(properties) { - this.metrics = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return Documentation; + })(); - /** - * BillingDestination monitoredResource. - * @member {string} monitoredResource - * @memberof google.api.Billing.BillingDestination - * @instance - */ - BillingDestination.prototype.monitoredResource = ""; + api.DocumentationRule = (function() { - /** - * BillingDestination metrics. - * @member {Array.} metrics - * @memberof google.api.Billing.BillingDestination - * @instance - */ - BillingDestination.prototype.metrics = $util.emptyArray; - - /** - * Creates a new BillingDestination instance using the specified properties. - * @function create - * @memberof google.api.Billing.BillingDestination - * @static - * @param {google.api.Billing.IBillingDestination=} [properties] Properties to set - * @returns {google.api.Billing.BillingDestination} BillingDestination instance - */ - BillingDestination.create = function create(properties) { - return new BillingDestination(properties); - }; - - /** - * Encodes the specified BillingDestination message. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. - * @function encode - * @memberof google.api.Billing.BillingDestination - * @static - * @param {google.api.Billing.IBillingDestination} message BillingDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BillingDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.monitoredResource); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metrics[i]); - return writer; - }; - - /** - * Encodes the specified BillingDestination message, length delimited. Does not implicitly {@link google.api.Billing.BillingDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Billing.BillingDestination - * @static - * @param {google.api.Billing.IBillingDestination} message BillingDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BillingDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BillingDestination message from the specified reader or buffer. - * @function decode - * @memberof google.api.Billing.BillingDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Billing.BillingDestination} BillingDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BillingDestination.decode = function 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.Billing.BillingDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.monitoredResource = reader.string(); - break; - case 2: - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BillingDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Billing.BillingDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Billing.BillingDestination} BillingDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BillingDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BillingDestination message. - * @function verify - * @memberof google.api.Billing.BillingDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BillingDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) - if (!$util.isString(message.monitoredResource)) - return "monitoredResource: string expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) - if (!$util.isString(message.metrics[i])) - return "metrics: string[] expected"; - } - return null; - }; - - /** - * Creates a BillingDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Billing.BillingDestination - * @static - * @param {Object.} object Plain object - * @returns {google.api.Billing.BillingDestination} BillingDestination - */ - BillingDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Billing.BillingDestination) - return object; - var message = new $root.google.api.Billing.BillingDestination(); - if (object.monitoredResource != null) - message.monitoredResource = String(object.monitoredResource); - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.api.Billing.BillingDestination.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) - message.metrics[i] = String(object.metrics[i]); - } - return message; - }; - - /** - * Creates a plain object from a BillingDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Billing.BillingDestination - * @static - * @param {google.api.Billing.BillingDestination} message BillingDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BillingDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.metrics = []; - if (options.defaults) - object.monitoredResource = ""; - if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) - object.monitoredResource = message.monitoredResource; - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = message.metrics[j]; - } - return object; - }; - - /** - * Converts this BillingDestination to JSON. - * @function toJSON - * @memberof google.api.Billing.BillingDestination - * @instance - * @returns {Object.} JSON object - */ - BillingDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BillingDestination; - })(); - - return Billing; - })(); - - api.Context = (function() { - - /** - * Properties of a Context. - * @memberof google.api - * @interface IContext - * @property {Array.|null} [rules] Context rules - */ + /** + * Properties of a DocumentationRule. + * @memberof google.api + * @interface IDocumentationRule + * @property {string|null} [selector] DocumentationRule selector + * @property {string|null} [description] DocumentationRule description + * @property {string|null} [deprecationDescription] DocumentationRule deprecationDescription + */ /** - * Constructs a new Context. + * Constructs a new DocumentationRule. * @memberof google.api - * @classdesc Represents a Context. - * @implements IContext + * @classdesc Represents a DocumentationRule. + * @implements IDocumentationRule * @constructor - * @param {google.api.IContext=} [properties] Properties to set + * @param {google.api.IDocumentationRule=} [properties] Properties to set */ - function Context(properties) { - this.rules = []; + function DocumentationRule(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15715,78 +15813,101 @@ } /** - * Context rules. - * @member {Array.} rules - * @memberof google.api.Context + * DocumentationRule selector. + * @member {string} selector + * @memberof google.api.DocumentationRule * @instance */ - Context.prototype.rules = $util.emptyArray; + DocumentationRule.prototype.selector = ""; /** - * Creates a new Context instance using the specified properties. + * DocumentationRule description. + * @member {string} description + * @memberof google.api.DocumentationRule + * @instance + */ + DocumentationRule.prototype.description = ""; + + /** + * DocumentationRule deprecationDescription. + * @member {string} deprecationDescription + * @memberof google.api.DocumentationRule + * @instance + */ + DocumentationRule.prototype.deprecationDescription = ""; + + /** + * Creates a new DocumentationRule instance using the specified properties. * @function create - * @memberof google.api.Context + * @memberof google.api.DocumentationRule * @static - * @param {google.api.IContext=} [properties] Properties to set - * @returns {google.api.Context} Context instance + * @param {google.api.IDocumentationRule=} [properties] Properties to set + * @returns {google.api.DocumentationRule} DocumentationRule instance */ - Context.create = function create(properties) { - return new Context(properties); + DocumentationRule.create = function create(properties) { + return new DocumentationRule(properties); }; /** - * Encodes the specified Context message. Does not implicitly {@link google.api.Context.verify|verify} messages. + * Encodes the specified DocumentationRule message. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. * @function encode - * @memberof google.api.Context + * @memberof google.api.DocumentationRule * @static - * @param {google.api.IContext} message Context message or plain object to encode + * @param {google.api.IDocumentationRule} message DocumentationRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Context.encode = function encode(message, writer) { + DocumentationRule.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.ContextRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Context message, length delimited. Does not implicitly {@link google.api.Context.verify|verify} messages. + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.deprecationDescription != null && Object.hasOwnProperty.call(message, "deprecationDescription")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationDescription); + return writer; + }; + + /** + * Encodes the specified DocumentationRule message, length delimited. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Context + * @memberof google.api.DocumentationRule * @static - * @param {google.api.IContext} message Context message or plain object to encode + * @param {google.api.IDocumentationRule} message DocumentationRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Context.encodeDelimited = function encodeDelimited(message, writer) { + DocumentationRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Context message from the specified reader or buffer. + * Decodes a DocumentationRule message from the specified reader or buffer. * @function decode - * @memberof google.api.Context + * @memberof google.api.DocumentationRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Context} Context + * @returns {google.api.DocumentationRule} DocumentationRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Context.decode = function decode(reader, length) { + DocumentationRule.decode = function 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.Context(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DocumentationRule(); 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.ContextRule.decode(reader, reader.uint32())); + message.selector = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.deprecationDescription = reader.string(); break; default: reader.skipType(tag & 7); @@ -15797,132 +15918,127 @@ }; /** - * Decodes a Context message from the specified reader or buffer, length delimited. + * Decodes a DocumentationRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Context + * @memberof google.api.DocumentationRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Context} Context + * @returns {google.api.DocumentationRule} DocumentationRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Context.decodeDelimited = function decodeDelimited(reader) { + DocumentationRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Context message. + * Verifies a DocumentationRule message. * @function verify - * @memberof google.api.Context + * @memberof google.api.DocumentationRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Context.verify = function verify(message) { + DocumentationRule.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.ContextRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.deprecationDescription != null && message.hasOwnProperty("deprecationDescription")) + if (!$util.isString(message.deprecationDescription)) + return "deprecationDescription: string expected"; return null; }; /** - * Creates a Context message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentationRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Context + * @memberof google.api.DocumentationRule * @static * @param {Object.} object Plain object - * @returns {google.api.Context} Context + * @returns {google.api.DocumentationRule} DocumentationRule */ - Context.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Context) + DocumentationRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DocumentationRule) return object; - var message = new $root.google.api.Context(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Context.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Context.rules: object expected"); - message.rules[i] = $root.google.api.ContextRule.fromObject(object.rules[i]); - } - } + var message = new $root.google.api.DocumentationRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.description != null) + message.description = String(object.description); + if (object.deprecationDescription != null) + message.deprecationDescription = String(object.deprecationDescription); return message; }; /** - * Creates a plain object from a Context message. Also converts values to other types if specified. + * Creates a plain object from a DocumentationRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Context + * @memberof google.api.DocumentationRule * @static - * @param {google.api.Context} message Context + * @param {google.api.DocumentationRule} message DocumentationRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Context.toObject = function toObject(message, options) { + DocumentationRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.ContextRule.toObject(message.rules[j], options); + if (options.defaults) { + object.selector = ""; + object.description = ""; + object.deprecationDescription = ""; } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.deprecationDescription != null && message.hasOwnProperty("deprecationDescription")) + object.deprecationDescription = message.deprecationDescription; return object; }; /** - * Converts this Context to JSON. + * Converts this DocumentationRule to JSON. * @function toJSON - * @memberof google.api.Context + * @memberof google.api.DocumentationRule * @instance * @returns {Object.} JSON object */ - Context.prototype.toJSON = function toJSON() { + DocumentationRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Context; + return DocumentationRule; })(); - api.ContextRule = (function() { + api.Page = (function() { /** - * Properties of a ContextRule. + * Properties of a Page. * @memberof google.api - * @interface IContextRule - * @property {string|null} [selector] ContextRule selector - * @property {Array.|null} [requested] ContextRule requested - * @property {Array.|null} [provided] ContextRule provided - * @property {Array.|null} [allowedRequestExtensions] ContextRule allowedRequestExtensions - * @property {Array.|null} [allowedResponseExtensions] ContextRule allowedResponseExtensions + * @interface IPage + * @property {string|null} [name] Page name + * @property {string|null} [content] Page content + * @property {Array.|null} [subpages] Page subpages */ /** - * Constructs a new ContextRule. + * Constructs a new Page. * @memberof google.api - * @classdesc Represents a ContextRule. - * @implements IContextRule + * @classdesc Represents a Page. + * @implements IPage * @constructor - * @param {google.api.IContextRule=} [properties] Properties to set + * @param {google.api.IPage=} [properties] Properties to set */ - function ContextRule(properties) { - this.requested = []; - this.provided = []; - this.allowedRequestExtensions = []; - this.allowedResponseExtensions = []; + function Page(properties) { + this.subpages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15930,139 +16046,104 @@ } /** - * ContextRule selector. - * @member {string} selector - * @memberof google.api.ContextRule - * @instance - */ - ContextRule.prototype.selector = ""; - - /** - * ContextRule requested. - * @member {Array.} requested - * @memberof google.api.ContextRule - * @instance - */ - ContextRule.prototype.requested = $util.emptyArray; - - /** - * ContextRule provided. - * @member {Array.} provided - * @memberof google.api.ContextRule + * Page name. + * @member {string} name + * @memberof google.api.Page * @instance */ - ContextRule.prototype.provided = $util.emptyArray; + Page.prototype.name = ""; /** - * ContextRule allowedRequestExtensions. - * @member {Array.} allowedRequestExtensions - * @memberof google.api.ContextRule + * Page content. + * @member {string} content + * @memberof google.api.Page * @instance */ - ContextRule.prototype.allowedRequestExtensions = $util.emptyArray; + Page.prototype.content = ""; /** - * ContextRule allowedResponseExtensions. - * @member {Array.} allowedResponseExtensions - * @memberof google.api.ContextRule + * Page subpages. + * @member {Array.} subpages + * @memberof google.api.Page * @instance */ - ContextRule.prototype.allowedResponseExtensions = $util.emptyArray; + Page.prototype.subpages = $util.emptyArray; /** - * Creates a new ContextRule instance using the specified properties. + * Creates a new Page instance using the specified properties. * @function create - * @memberof google.api.ContextRule + * @memberof google.api.Page * @static - * @param {google.api.IContextRule=} [properties] Properties to set - * @returns {google.api.ContextRule} ContextRule instance + * @param {google.api.IPage=} [properties] Properties to set + * @returns {google.api.Page} Page instance */ - ContextRule.create = function create(properties) { - return new ContextRule(properties); + Page.create = function create(properties) { + return new Page(properties); }; /** - * Encodes the specified ContextRule message. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. + * Encodes the specified Page message. Does not implicitly {@link google.api.Page.verify|verify} messages. * @function encode - * @memberof google.api.ContextRule + * @memberof google.api.Page * @static - * @param {google.api.IContextRule} message ContextRule message or plain object to encode + * @param {google.api.IPage} message Page message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContextRule.encode = function encode(message, writer) { + Page.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.requested != null && message.requested.length) - for (var i = 0; i < message.requested.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requested[i]); - if (message.provided != null && message.provided.length) - for (var i = 0; i < message.provided.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.provided[i]); - if (message.allowedRequestExtensions != null && message.allowedRequestExtensions.length) - for (var i = 0; i < message.allowedRequestExtensions.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.allowedRequestExtensions[i]); - if (message.allowedResponseExtensions != null && message.allowedResponseExtensions.length) - for (var i = 0; i < message.allowedResponseExtensions.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.allowedResponseExtensions[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + if (message.subpages != null && message.subpages.length) + for (var i = 0; i < message.subpages.length; ++i) + $root.google.api.Page.encode(message.subpages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ContextRule message, length delimited. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.api.Page.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ContextRule + * @memberof google.api.Page * @static - * @param {google.api.IContextRule} message ContextRule message or plain object to encode + * @param {google.api.IPage} message Page message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContextRule.encodeDelimited = function encodeDelimited(message, writer) { + Page.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ContextRule message from the specified reader or buffer. + * Decodes a Page message from the specified reader or buffer. * @function decode - * @memberof google.api.ContextRule + * @memberof google.api.Page * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ContextRule} ContextRule + * @returns {google.api.Page} Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContextRule.decode = function decode(reader, length) { + Page.decode = function 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.ContextRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Page(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.name = reader.string(); break; case 2: - if (!(message.requested && message.requested.length)) - message.requested = []; - message.requested.push(reader.string()); + message.content = reader.string(); break; case 3: - if (!(message.provided && message.provided.length)) - message.provided = []; - message.provided.push(reader.string()); - break; - case 4: - if (!(message.allowedRequestExtensions && message.allowedRequestExtensions.length)) - message.allowedRequestExtensions = []; - message.allowedRequestExtensions.push(reader.string()); - break; - case 5: - if (!(message.allowedResponseExtensions && message.allowedResponseExtensions.length)) - message.allowedResponseExtensions = []; - message.allowedResponseExtensions.push(reader.string()); + if (!(message.subpages && message.subpages.length)) + message.subpages = []; + message.subpages.push($root.google.api.Page.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -16073,189 +16154,146 @@ }; /** - * Decodes a ContextRule message from the specified reader or buffer, length delimited. + * Decodes a Page message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ContextRule + * @memberof google.api.Page * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ContextRule} ContextRule + * @returns {google.api.Page} Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContextRule.decodeDelimited = function decodeDelimited(reader) { + Page.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ContextRule message. + * Verifies a Page message. * @function verify - * @memberof google.api.ContextRule + * @memberof google.api.Page * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ContextRule.verify = function verify(message) { + Page.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.requested != null && message.hasOwnProperty("requested")) { - if (!Array.isArray(message.requested)) - return "requested: array expected"; - for (var i = 0; i < message.requested.length; ++i) - if (!$util.isString(message.requested[i])) - return "requested: string[] expected"; - } - if (message.provided != null && message.hasOwnProperty("provided")) { - if (!Array.isArray(message.provided)) - return "provided: array expected"; - for (var i = 0; i < message.provided.length; ++i) - if (!$util.isString(message.provided[i])) - return "provided: string[] expected"; - } - if (message.allowedRequestExtensions != null && message.hasOwnProperty("allowedRequestExtensions")) { - if (!Array.isArray(message.allowedRequestExtensions)) - return "allowedRequestExtensions: array expected"; - for (var i = 0; i < message.allowedRequestExtensions.length; ++i) - if (!$util.isString(message.allowedRequestExtensions[i])) - return "allowedRequestExtensions: string[] expected"; - } - if (message.allowedResponseExtensions != null && message.hasOwnProperty("allowedResponseExtensions")) { - if (!Array.isArray(message.allowedResponseExtensions)) - return "allowedResponseExtensions: array expected"; - for (var i = 0; i < message.allowedResponseExtensions.length; ++i) - if (!$util.isString(message.allowedResponseExtensions[i])) - return "allowedResponseExtensions: string[] expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.subpages != null && message.hasOwnProperty("subpages")) { + if (!Array.isArray(message.subpages)) + return "subpages: array expected"; + for (var i = 0; i < message.subpages.length; ++i) { + var error = $root.google.api.Page.verify(message.subpages[i]); + if (error) + return "subpages." + error; + } } return null; }; /** - * Creates a ContextRule message from a plain object. Also converts values to their respective internal types. + * Creates a Page message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ContextRule + * @memberof google.api.Page * @static * @param {Object.} object Plain object - * @returns {google.api.ContextRule} ContextRule + * @returns {google.api.Page} Page */ - ContextRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ContextRule) + Page.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Page) return object; - var message = new $root.google.api.ContextRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.requested) { - if (!Array.isArray(object.requested)) - throw TypeError(".google.api.ContextRule.requested: array expected"); - message.requested = []; - for (var i = 0; i < object.requested.length; ++i) - message.requested[i] = String(object.requested[i]); - } - if (object.provided) { - if (!Array.isArray(object.provided)) - throw TypeError(".google.api.ContextRule.provided: array expected"); - message.provided = []; - for (var i = 0; i < object.provided.length; ++i) - message.provided[i] = String(object.provided[i]); - } - if (object.allowedRequestExtensions) { - if (!Array.isArray(object.allowedRequestExtensions)) - throw TypeError(".google.api.ContextRule.allowedRequestExtensions: array expected"); - message.allowedRequestExtensions = []; - for (var i = 0; i < object.allowedRequestExtensions.length; ++i) - message.allowedRequestExtensions[i] = String(object.allowedRequestExtensions[i]); - } - if (object.allowedResponseExtensions) { - if (!Array.isArray(object.allowedResponseExtensions)) - throw TypeError(".google.api.ContextRule.allowedResponseExtensions: array expected"); - message.allowedResponseExtensions = []; - for (var i = 0; i < object.allowedResponseExtensions.length; ++i) - message.allowedResponseExtensions[i] = String(object.allowedResponseExtensions[i]); + var message = new $root.google.api.Page(); + if (object.name != null) + message.name = String(object.name); + if (object.content != null) + message.content = String(object.content); + if (object.subpages) { + if (!Array.isArray(object.subpages)) + throw TypeError(".google.api.Page.subpages: array expected"); + message.subpages = []; + for (var i = 0; i < object.subpages.length; ++i) { + if (typeof object.subpages[i] !== "object") + throw TypeError(".google.api.Page.subpages: object expected"); + message.subpages[i] = $root.google.api.Page.fromObject(object.subpages[i]); + } } return message; }; /** - * Creates a plain object from a ContextRule message. Also converts values to other types if specified. + * Creates a plain object from a Page message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ContextRule + * @memberof google.api.Page * @static - * @param {google.api.ContextRule} message ContextRule + * @param {google.api.Page} message Page * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ContextRule.toObject = function toObject(message, options) { + Page.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.requested = []; - object.provided = []; - object.allowedRequestExtensions = []; - object.allowedResponseExtensions = []; - } - if (options.defaults) - object.selector = ""; - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.requested && message.requested.length) { - object.requested = []; - for (var j = 0; j < message.requested.length; ++j) - object.requested[j] = message.requested[j]; - } - if (message.provided && message.provided.length) { - object.provided = []; - for (var j = 0; j < message.provided.length; ++j) - object.provided[j] = message.provided[j]; - } - if (message.allowedRequestExtensions && message.allowedRequestExtensions.length) { - object.allowedRequestExtensions = []; - for (var j = 0; j < message.allowedRequestExtensions.length; ++j) - object.allowedRequestExtensions[j] = message.allowedRequestExtensions[j]; + if (options.arrays || options.defaults) + object.subpages = []; + if (options.defaults) { + object.name = ""; + object.content = ""; } - if (message.allowedResponseExtensions && message.allowedResponseExtensions.length) { - object.allowedResponseExtensions = []; - for (var j = 0; j < message.allowedResponseExtensions.length; ++j) - object.allowedResponseExtensions[j] = message.allowedResponseExtensions[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.subpages && message.subpages.length) { + object.subpages = []; + for (var j = 0; j < message.subpages.length; ++j) + object.subpages[j] = $root.google.api.Page.toObject(message.subpages[j], options); } return object; }; /** - * Converts this ContextRule to JSON. + * Converts this Page to JSON. * @function toJSON - * @memberof google.api.ContextRule + * @memberof google.api.Page * @instance * @returns {Object.} JSON object */ - ContextRule.prototype.toJSON = function toJSON() { + Page.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ContextRule; + return Page; })(); - api.Control = (function() { + api.Endpoint = (function() { /** - * Properties of a Control. + * Properties of an Endpoint. * @memberof google.api - * @interface IControl - * @property {string|null} [environment] Control environment + * @interface IEndpoint + * @property {string|null} [name] Endpoint name + * @property {Array.|null} [aliases] Endpoint aliases + * @property {string|null} [target] Endpoint target + * @property {boolean|null} [allowCors] Endpoint allowCors */ /** - * Constructs a new Control. + * Constructs a new Endpoint. * @memberof google.api - * @classdesc Represents a Control. - * @implements IControl + * @classdesc Represents an Endpoint. + * @implements IEndpoint * @constructor - * @param {google.api.IControl=} [properties] Properties to set + * @param {google.api.IEndpoint=} [properties] Properties to set */ - function Control(properties) { + function Endpoint(properties) { + this.aliases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16263,75 +16301,117 @@ } /** - * Control environment. - * @member {string} environment - * @memberof google.api.Control + * Endpoint name. + * @member {string} name + * @memberof google.api.Endpoint * @instance */ - Control.prototype.environment = ""; + Endpoint.prototype.name = ""; /** - * Creates a new Control instance using the specified properties. - * @function create - * @memberof google.api.Control - * @static - * @param {google.api.IControl=} [properties] Properties to set - * @returns {google.api.Control} Control instance + * Endpoint aliases. + * @member {Array.} aliases + * @memberof google.api.Endpoint + * @instance */ - Control.create = function create(properties) { - return new Control(properties); - }; + Endpoint.prototype.aliases = $util.emptyArray; /** - * Encodes the specified Control message. Does not implicitly {@link google.api.Control.verify|verify} messages. - * @function encode - * @memberof google.api.Control - * @static - * @param {google.api.IControl} message Control message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Endpoint target. + * @member {string} target + * @memberof google.api.Endpoint + * @instance */ - Control.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - return writer; - }; + Endpoint.prototype.target = ""; /** - * Encodes the specified Control message, length delimited. Does not implicitly {@link google.api.Control.verify|verify} messages. + * Endpoint allowCors. + * @member {boolean} allowCors + * @memberof google.api.Endpoint + * @instance + */ + Endpoint.prototype.allowCors = false; + + /** + * Creates a new Endpoint instance using the specified properties. + * @function create + * @memberof google.api.Endpoint + * @static + * @param {google.api.IEndpoint=} [properties] Properties to set + * @returns {google.api.Endpoint} Endpoint instance + */ + Endpoint.create = function create(properties) { + return new Endpoint(properties); + }; + + /** + * Encodes the specified Endpoint message. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. + * @function encode + * @memberof google.api.Endpoint + * @static + * @param {google.api.IEndpoint} message Endpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoint.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.aliases != null && message.aliases.length) + for (var i = 0; i < message.aliases.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.aliases[i]); + if (message.allowCors != null && Object.hasOwnProperty.call(message, "allowCors")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowCors); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.target); + return writer; + }; + + /** + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Control + * @memberof google.api.Endpoint * @static - * @param {google.api.IControl} message Control message or plain object to encode + * @param {google.api.IEndpoint} message Endpoint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Control.encodeDelimited = function encodeDelimited(message, writer) { + Endpoint.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Control message from the specified reader or buffer. + * Decodes an Endpoint message from the specified reader or buffer. * @function decode - * @memberof google.api.Control + * @memberof google.api.Endpoint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Control} Control + * @returns {google.api.Endpoint} Endpoint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Control.decode = function decode(reader, length) { + Endpoint.decode = function 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.Control(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Endpoint(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.environment = reader.string(); + message.name = reader.string(); + break; + case 2: + if (!(message.aliases && message.aliases.length)) + message.aliases = []; + message.aliases.push(reader.string()); + break; + case 101: + message.target = reader.string(); + break; + case 5: + message.allowCors = reader.bool(); break; default: reader.skipType(tag & 7); @@ -16342,114 +16422,149 @@ }; /** - * Decodes a Control message from the specified reader or buffer, length delimited. + * Decodes an Endpoint message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Control + * @memberof google.api.Endpoint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Control} Control + * @returns {google.api.Endpoint} Endpoint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Control.decodeDelimited = function decodeDelimited(reader) { + Endpoint.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Control message. + * Verifies an Endpoint message. * @function verify - * @memberof google.api.Control + * @memberof google.api.Endpoint * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Control.verify = function verify(message) { + Endpoint.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.aliases != null && message.hasOwnProperty("aliases")) { + if (!Array.isArray(message.aliases)) + return "aliases: array expected"; + for (var i = 0; i < message.aliases.length; ++i) + if (!$util.isString(message.aliases[i])) + return "aliases: string[] expected"; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.allowCors != null && message.hasOwnProperty("allowCors")) + if (typeof message.allowCors !== "boolean") + return "allowCors: boolean expected"; return null; }; /** - * Creates a Control message from a plain object. Also converts values to their respective internal types. + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Control + * @memberof google.api.Endpoint * @static * @param {Object.} object Plain object - * @returns {google.api.Control} Control + * @returns {google.api.Endpoint} Endpoint */ - Control.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Control) + Endpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Endpoint) return object; - var message = new $root.google.api.Control(); - if (object.environment != null) - message.environment = String(object.environment); + var message = new $root.google.api.Endpoint(); + if (object.name != null) + message.name = String(object.name); + if (object.aliases) { + if (!Array.isArray(object.aliases)) + throw TypeError(".google.api.Endpoint.aliases: array expected"); + message.aliases = []; + for (var i = 0; i < object.aliases.length; ++i) + message.aliases[i] = String(object.aliases[i]); + } + if (object.target != null) + message.target = String(object.target); + if (object.allowCors != null) + message.allowCors = Boolean(object.allowCors); return message; }; /** - * Creates a plain object from a Control message. Also converts values to other types if specified. + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Control + * @memberof google.api.Endpoint * @static - * @param {google.api.Control} message Control + * @param {google.api.Endpoint} message Endpoint * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Control.toObject = function toObject(message, options) { + Endpoint.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.environment = ""; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; + if (options.arrays || options.defaults) + object.aliases = []; + if (options.defaults) { + object.name = ""; + object.allowCors = false; + object.target = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.aliases && message.aliases.length) { + object.aliases = []; + for (var j = 0; j < message.aliases.length; ++j) + object.aliases[j] = message.aliases[j]; + } + if (message.allowCors != null && message.hasOwnProperty("allowCors")) + object.allowCors = message.allowCors; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; return object; }; /** - * Converts this Control to JSON. + * Converts this Endpoint to JSON. * @function toJSON - * @memberof google.api.Control + * @memberof google.api.Endpoint * @instance * @returns {Object.} JSON object */ - Control.prototype.toJSON = function toJSON() { + Endpoint.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Control; + return Endpoint; })(); - api.Documentation = (function() { + api.LogDescriptor = (function() { /** - * Properties of a Documentation. + * Properties of a LogDescriptor. * @memberof google.api - * @interface IDocumentation - * @property {string|null} [summary] Documentation summary - * @property {Array.|null} [pages] Documentation pages - * @property {Array.|null} [rules] Documentation rules - * @property {string|null} [documentationRootUrl] Documentation documentationRootUrl - * @property {string|null} [serviceRootUrl] Documentation serviceRootUrl - * @property {string|null} [overview] Documentation overview + * @interface ILogDescriptor + * @property {string|null} [name] LogDescriptor name + * @property {Array.|null} [labels] LogDescriptor labels + * @property {string|null} [description] LogDescriptor description + * @property {string|null} [displayName] LogDescriptor displayName */ /** - * Constructs a new Documentation. + * Constructs a new LogDescriptor. * @memberof google.api - * @classdesc Represents a Documentation. - * @implements IDocumentation + * @classdesc Represents a LogDescriptor. + * @implements ILogDescriptor * @constructor - * @param {google.api.IDocumentation=} [properties] Properties to set + * @param {google.api.ILogDescriptor=} [properties] Properties to set */ - function Documentation(properties) { - this.pages = []; - this.rules = []; + function LogDescriptor(properties) { + this.labels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16457,146 +16572,117 @@ } /** - * Documentation summary. - * @member {string} summary - * @memberof google.api.Documentation - * @instance - */ - Documentation.prototype.summary = ""; - - /** - * Documentation pages. - * @member {Array.} pages - * @memberof google.api.Documentation + * LogDescriptor name. + * @member {string} name + * @memberof google.api.LogDescriptor * @instance */ - Documentation.prototype.pages = $util.emptyArray; + LogDescriptor.prototype.name = ""; /** - * Documentation rules. - * @member {Array.} rules - * @memberof google.api.Documentation + * LogDescriptor labels. + * @member {Array.} labels + * @memberof google.api.LogDescriptor * @instance */ - Documentation.prototype.rules = $util.emptyArray; + LogDescriptor.prototype.labels = $util.emptyArray; /** - * Documentation documentationRootUrl. - * @member {string} documentationRootUrl - * @memberof google.api.Documentation + * LogDescriptor description. + * @member {string} description + * @memberof google.api.LogDescriptor * @instance */ - Documentation.prototype.documentationRootUrl = ""; + LogDescriptor.prototype.description = ""; /** - * Documentation serviceRootUrl. - * @member {string} serviceRootUrl - * @memberof google.api.Documentation + * LogDescriptor displayName. + * @member {string} displayName + * @memberof google.api.LogDescriptor * @instance */ - Documentation.prototype.serviceRootUrl = ""; + LogDescriptor.prototype.displayName = ""; /** - * Documentation overview. - * @member {string} overview - * @memberof google.api.Documentation - * @instance + * Creates a new LogDescriptor instance using the specified properties. + * @function create + * @memberof google.api.LogDescriptor + * @static + * @param {google.api.ILogDescriptor=} [properties] Properties to set + * @returns {google.api.LogDescriptor} LogDescriptor instance */ - Documentation.prototype.overview = ""; + LogDescriptor.create = function create(properties) { + return new LogDescriptor(properties); + }; /** - * Creates a new Documentation instance using the specified properties. - * @function create - * @memberof google.api.Documentation - * @static - * @param {google.api.IDocumentation=} [properties] Properties to set - * @returns {google.api.Documentation} Documentation instance - */ - Documentation.create = function create(properties) { - return new Documentation(properties); - }; - - /** - * Encodes the specified Documentation message. Does not implicitly {@link google.api.Documentation.verify|verify} messages. + * Encodes the specified LogDescriptor message. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Documentation + * @memberof google.api.LogDescriptor * @static - * @param {google.api.IDocumentation} message Documentation message or plain object to encode + * @param {google.api.ILogDescriptor} message LogDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Documentation.encode = function encode(message, writer) { + LogDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.summary); - if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.overview); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.DocumentationRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.documentationRootUrl != null && Object.hasOwnProperty.call(message, "documentationRootUrl")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.documentationRootUrl); - if (message.pages != null && message.pages.length) - for (var i = 0; i < message.pages.length; ++i) - $root.google.api.Page.encode(message.pages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.serviceRootUrl != null && Object.hasOwnProperty.call(message, "serviceRootUrl")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.serviceRootUrl); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); return writer; }; /** - * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.api.Documentation.verify|verify} messages. + * Encodes the specified LogDescriptor message, length delimited. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Documentation + * @memberof google.api.LogDescriptor * @static - * @param {google.api.IDocumentation} message Documentation message or plain object to encode + * @param {google.api.ILogDescriptor} message LogDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Documentation.encodeDelimited = function encodeDelimited(message, writer) { + LogDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Documentation message from the specified reader or buffer. + * Decodes a LogDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Documentation + * @memberof google.api.LogDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Documentation} Documentation + * @returns {google.api.LogDescriptor} LogDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Documentation.decode = function decode(reader, length) { + LogDescriptor.decode = function 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.Documentation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LogDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.summary = reader.string(); + message.name = reader.string(); break; - case 5: - if (!(message.pages && message.pages.length)) - message.pages = []; - message.pages.push($root.google.api.Page.decode(reader, reader.uint32())); + case 2: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); break; case 3: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.DocumentationRule.decode(reader, reader.uint32())); + message.description = reader.string(); break; case 4: - message.documentationRootUrl = reader.string(); - break; - case 6: - message.serviceRootUrl = reader.string(); - break; - case 2: - message.overview = reader.string(); + message.displayName = reader.string(); break; default: reader.skipType(tag & 7); @@ -16607,186 +16693,153 @@ }; /** - * Decodes a Documentation message from the specified reader or buffer, length delimited. + * Decodes a LogDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Documentation + * @memberof google.api.LogDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Documentation} Documentation + * @returns {google.api.LogDescriptor} LogDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Documentation.decodeDelimited = function decodeDelimited(reader) { + LogDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Documentation message. + * Verifies a LogDescriptor message. * @function verify - * @memberof google.api.Documentation + * @memberof google.api.LogDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Documentation.verify = function verify(message) { + LogDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.summary != null && message.hasOwnProperty("summary")) - if (!$util.isString(message.summary)) - return "summary: string expected"; - if (message.pages != null && message.hasOwnProperty("pages")) { - if (!Array.isArray(message.pages)) - return "pages: array expected"; - for (var i = 0; i < message.pages.length; ++i) { - var error = $root.google.api.Page.verify(message.pages[i]); - if (error) - return "pages." + error; - } - } - 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.DocumentationRule.verify(message.rules[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); if (error) - return "rules." + error; + return "labels." + error; } } - if (message.documentationRootUrl != null && message.hasOwnProperty("documentationRootUrl")) - if (!$util.isString(message.documentationRootUrl)) - return "documentationRootUrl: string expected"; - if (message.serviceRootUrl != null && message.hasOwnProperty("serviceRootUrl")) - if (!$util.isString(message.serviceRootUrl)) - return "serviceRootUrl: string expected"; - if (message.overview != null && message.hasOwnProperty("overview")) - if (!$util.isString(message.overview)) - return "overview: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a Documentation message from a plain object. Also converts values to their respective internal types. + * Creates a LogDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Documentation + * @memberof google.api.LogDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Documentation} Documentation + * @returns {google.api.LogDescriptor} LogDescriptor */ - Documentation.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Documentation) + LogDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LogDescriptor) return object; - var message = new $root.google.api.Documentation(); - if (object.summary != null) - message.summary = String(object.summary); - if (object.pages) { - if (!Array.isArray(object.pages)) - throw TypeError(".google.api.Documentation.pages: array expected"); - message.pages = []; - for (var i = 0; i < object.pages.length; ++i) { - if (typeof object.pages[i] !== "object") - throw TypeError(".google.api.Documentation.pages: object expected"); - message.pages[i] = $root.google.api.Page.fromObject(object.pages[i]); - } - } - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Documentation.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Documentation.rules: object expected"); - message.rules[i] = $root.google.api.DocumentationRule.fromObject(object.rules[i]); + var message = new $root.google.api.LogDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.LogDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.LogDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); } } - if (object.documentationRootUrl != null) - message.documentationRootUrl = String(object.documentationRootUrl); - if (object.serviceRootUrl != null) - message.serviceRootUrl = String(object.serviceRootUrl); - if (object.overview != null) - message.overview = String(object.overview); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * Creates a plain object from a LogDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Documentation + * @memberof google.api.LogDescriptor * @static - * @param {google.api.Documentation} message Documentation + * @param {google.api.LogDescriptor} message LogDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Documentation.toObject = function toObject(message, options) { + LogDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.rules = []; - object.pages = []; - } + if (options.arrays || options.defaults) + object.labels = []; if (options.defaults) { - object.summary = ""; - object.overview = ""; - object.documentationRootUrl = ""; - object.serviceRootUrl = ""; - } - if (message.summary != null && message.hasOwnProperty("summary")) - object.summary = message.summary; - if (message.overview != null && message.hasOwnProperty("overview")) - object.overview = message.overview; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.DocumentationRule.toObject(message.rules[j], options); + object.name = ""; + object.description = ""; + object.displayName = ""; } - if (message.documentationRootUrl != null && message.hasOwnProperty("documentationRootUrl")) - object.documentationRootUrl = message.documentationRootUrl; - if (message.pages && message.pages.length) { - object.pages = []; - for (var j = 0; j < message.pages.length; ++j) - object.pages[j] = $root.google.api.Page.toObject(message.pages[j], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); } - if (message.serviceRootUrl != null && message.hasOwnProperty("serviceRootUrl")) - object.serviceRootUrl = message.serviceRootUrl; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this Documentation to JSON. + * Converts this LogDescriptor to JSON. * @function toJSON - * @memberof google.api.Documentation + * @memberof google.api.LogDescriptor * @instance * @returns {Object.} JSON object */ - Documentation.prototype.toJSON = function toJSON() { + LogDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Documentation; + return LogDescriptor; })(); - api.DocumentationRule = (function() { + api.Logging = (function() { /** - * Properties of a DocumentationRule. + * Properties of a Logging. * @memberof google.api - * @interface IDocumentationRule - * @property {string|null} [selector] DocumentationRule selector - * @property {string|null} [description] DocumentationRule description - * @property {string|null} [deprecationDescription] DocumentationRule deprecationDescription - */ - + * @interface ILogging + * @property {Array.|null} [producerDestinations] Logging producerDestinations + * @property {Array.|null} [consumerDestinations] Logging consumerDestinations + */ + /** - * Constructs a new DocumentationRule. + * Constructs a new Logging. * @memberof google.api - * @classdesc Represents a DocumentationRule. - * @implements IDocumentationRule + * @classdesc Represents a Logging. + * @implements ILogging * @constructor - * @param {google.api.IDocumentationRule=} [properties] Properties to set + * @param {google.api.ILogging=} [properties] Properties to set */ - function DocumentationRule(properties) { + function Logging(properties) { + this.producerDestinations = []; + this.consumerDestinations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16794,101 +16847,94 @@ } /** - * DocumentationRule selector. - * @member {string} selector - * @memberof google.api.DocumentationRule - * @instance - */ - DocumentationRule.prototype.selector = ""; - - /** - * DocumentationRule description. - * @member {string} description - * @memberof google.api.DocumentationRule + * Logging producerDestinations. + * @member {Array.} producerDestinations + * @memberof google.api.Logging * @instance */ - DocumentationRule.prototype.description = ""; + Logging.prototype.producerDestinations = $util.emptyArray; /** - * DocumentationRule deprecationDescription. - * @member {string} deprecationDescription - * @memberof google.api.DocumentationRule + * Logging consumerDestinations. + * @member {Array.} consumerDestinations + * @memberof google.api.Logging * @instance */ - DocumentationRule.prototype.deprecationDescription = ""; + Logging.prototype.consumerDestinations = $util.emptyArray; /** - * Creates a new DocumentationRule instance using the specified properties. + * Creates a new Logging instance using the specified properties. * @function create - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static - * @param {google.api.IDocumentationRule=} [properties] Properties to set - * @returns {google.api.DocumentationRule} DocumentationRule instance + * @param {google.api.ILogging=} [properties] Properties to set + * @returns {google.api.Logging} Logging instance */ - DocumentationRule.create = function create(properties) { - return new DocumentationRule(properties); + Logging.create = function create(properties) { + return new Logging(properties); }; /** - * Encodes the specified DocumentationRule message. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. + * Encodes the specified Logging message. Does not implicitly {@link google.api.Logging.verify|verify} messages. * @function encode - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static - * @param {google.api.IDocumentationRule} message DocumentationRule message or plain object to encode + * @param {google.api.ILogging} message Logging message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentationRule.encode = function encode(message, writer) { + Logging.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.deprecationDescription != null && Object.hasOwnProperty.call(message, "deprecationDescription")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationDescription); + if (message.producerDestinations != null && message.producerDestinations.length) + for (var i = 0; i < message.producerDestinations.length; ++i) + $root.google.api.Logging.LoggingDestination.encode(message.producerDestinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consumerDestinations != null && message.consumerDestinations.length) + for (var i = 0; i < message.consumerDestinations.length; ++i) + $root.google.api.Logging.LoggingDestination.encode(message.consumerDestinations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DocumentationRule message, length delimited. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. + * Encodes the specified Logging message, length delimited. Does not implicitly {@link google.api.Logging.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static - * @param {google.api.IDocumentationRule} message DocumentationRule message or plain object to encode + * @param {google.api.ILogging} message Logging message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentationRule.encodeDelimited = function encodeDelimited(message, writer) { + Logging.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DocumentationRule message from the specified reader or buffer. + * Decodes a Logging message from the specified reader or buffer. * @function decode - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.DocumentationRule} DocumentationRule + * @returns {google.api.Logging} Logging * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentationRule.decode = function decode(reader, length) { + Logging.decode = function 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.DocumentationRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Logging(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + if (!(message.producerDestinations && message.producerDestinations.length)) + message.producerDestinations = []; + message.producerDestinations.push($root.google.api.Logging.LoggingDestination.decode(reader, reader.uint32())); break; case 2: - message.description = reader.string(); - break; - case 3: - message.deprecationDescription = reader.string(); + if (!(message.consumerDestinations && message.consumerDestinations.length)) + message.consumerDestinations = []; + message.consumerDestinations.push($root.google.api.Logging.LoggingDestination.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -16899,127 +16945,382 @@ }; /** - * Decodes a DocumentationRule message from the specified reader or buffer, length delimited. + * Decodes a Logging message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DocumentationRule} DocumentationRule + * @returns {google.api.Logging} Logging * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentationRule.decodeDelimited = function decodeDelimited(reader) { + Logging.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DocumentationRule message. + * Verifies a Logging message. * @function verify - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DocumentationRule.verify = function verify(message) { + Logging.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.deprecationDescription != null && message.hasOwnProperty("deprecationDescription")) - if (!$util.isString(message.deprecationDescription)) - return "deprecationDescription: string expected"; + if (message.producerDestinations != null && message.hasOwnProperty("producerDestinations")) { + if (!Array.isArray(message.producerDestinations)) + return "producerDestinations: array expected"; + for (var i = 0; i < message.producerDestinations.length; ++i) { + var error = $root.google.api.Logging.LoggingDestination.verify(message.producerDestinations[i]); + if (error) + return "producerDestinations." + error; + } + } + if (message.consumerDestinations != null && message.hasOwnProperty("consumerDestinations")) { + if (!Array.isArray(message.consumerDestinations)) + return "consumerDestinations: array expected"; + for (var i = 0; i < message.consumerDestinations.length; ++i) { + var error = $root.google.api.Logging.LoggingDestination.verify(message.consumerDestinations[i]); + if (error) + return "consumerDestinations." + error; + } + } return null; }; /** - * Creates a DocumentationRule message from a plain object. Also converts values to their respective internal types. + * Creates a Logging message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static * @param {Object.} object Plain object - * @returns {google.api.DocumentationRule} DocumentationRule + * @returns {google.api.Logging} Logging */ - DocumentationRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DocumentationRule) + Logging.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Logging) return object; - var message = new $root.google.api.DocumentationRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.description != null) - message.description = String(object.description); - if (object.deprecationDescription != null) - message.deprecationDescription = String(object.deprecationDescription); + var message = new $root.google.api.Logging(); + if (object.producerDestinations) { + if (!Array.isArray(object.producerDestinations)) + throw TypeError(".google.api.Logging.producerDestinations: array expected"); + message.producerDestinations = []; + for (var i = 0; i < object.producerDestinations.length; ++i) { + if (typeof object.producerDestinations[i] !== "object") + throw TypeError(".google.api.Logging.producerDestinations: object expected"); + message.producerDestinations[i] = $root.google.api.Logging.LoggingDestination.fromObject(object.producerDestinations[i]); + } + } + if (object.consumerDestinations) { + if (!Array.isArray(object.consumerDestinations)) + throw TypeError(".google.api.Logging.consumerDestinations: array expected"); + message.consumerDestinations = []; + for (var i = 0; i < object.consumerDestinations.length; ++i) { + if (typeof object.consumerDestinations[i] !== "object") + throw TypeError(".google.api.Logging.consumerDestinations: object expected"); + message.consumerDestinations[i] = $root.google.api.Logging.LoggingDestination.fromObject(object.consumerDestinations[i]); + } + } return message; }; /** - * Creates a plain object from a DocumentationRule message. Also converts values to other types if specified. + * Creates a plain object from a Logging message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static - * @param {google.api.DocumentationRule} message DocumentationRule + * @param {google.api.Logging} message Logging * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DocumentationRule.toObject = function toObject(message, options) { + Logging.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.selector = ""; - object.description = ""; - object.deprecationDescription = ""; + if (options.arrays || options.defaults) { + object.producerDestinations = []; + object.consumerDestinations = []; + } + if (message.producerDestinations && message.producerDestinations.length) { + object.producerDestinations = []; + for (var j = 0; j < message.producerDestinations.length; ++j) + object.producerDestinations[j] = $root.google.api.Logging.LoggingDestination.toObject(message.producerDestinations[j], options); + } + if (message.consumerDestinations && message.consumerDestinations.length) { + object.consumerDestinations = []; + for (var j = 0; j < message.consumerDestinations.length; ++j) + object.consumerDestinations[j] = $root.google.api.Logging.LoggingDestination.toObject(message.consumerDestinations[j], options); } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.deprecationDescription != null && message.hasOwnProperty("deprecationDescription")) - object.deprecationDescription = message.deprecationDescription; return object; }; /** - * Converts this DocumentationRule to JSON. + * Converts this Logging to JSON. * @function toJSON - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @instance * @returns {Object.} JSON object */ - DocumentationRule.prototype.toJSON = function toJSON() { + Logging.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DocumentationRule; - })(); + Logging.LoggingDestination = (function() { - api.Page = (function() { + /** + * Properties of a LoggingDestination. + * @memberof google.api.Logging + * @interface ILoggingDestination + * @property {string|null} [monitoredResource] LoggingDestination monitoredResource + * @property {Array.|null} [logs] LoggingDestination logs + */ - /** - * Properties of a Page. - * @memberof google.api - * @interface IPage - * @property {string|null} [name] Page name - * @property {string|null} [content] Page content - * @property {Array.|null} [subpages] Page subpages - */ + /** + * Constructs a new LoggingDestination. + * @memberof google.api.Logging + * @classdesc Represents a LoggingDestination. + * @implements ILoggingDestination + * @constructor + * @param {google.api.Logging.ILoggingDestination=} [properties] Properties to set + */ + function LoggingDestination(properties) { + this.logs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new Page. - * @memberof google.api - * @classdesc Represents a Page. - * @implements IPage + /** + * LoggingDestination monitoredResource. + * @member {string} monitoredResource + * @memberof google.api.Logging.LoggingDestination + * @instance + */ + LoggingDestination.prototype.monitoredResource = ""; + + /** + * LoggingDestination logs. + * @member {Array.} logs + * @memberof google.api.Logging.LoggingDestination + * @instance + */ + LoggingDestination.prototype.logs = $util.emptyArray; + + /** + * Creates a new LoggingDestination instance using the specified properties. + * @function create + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.ILoggingDestination=} [properties] Properties to set + * @returns {google.api.Logging.LoggingDestination} LoggingDestination instance + */ + LoggingDestination.create = function create(properties) { + return new LoggingDestination(properties); + }; + + /** + * Encodes the specified LoggingDestination message. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * @function encode + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.ILoggingDestination} message LoggingDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logs != null && message.logs.length) + for (var i = 0; i < message.logs.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logs[i]); + if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.monitoredResource); + return writer; + }; + + /** + * Encodes the specified LoggingDestination message, length delimited. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.ILoggingDestination} message LoggingDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoggingDestination message from the specified reader or buffer. + * @function decode + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Logging.LoggingDestination} LoggingDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingDestination.decode = function 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.Logging.LoggingDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.monitoredResource = reader.string(); + break; + case 1: + if (!(message.logs && message.logs.length)) + message.logs = []; + message.logs.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoggingDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Logging.LoggingDestination} LoggingDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoggingDestination message. + * @function verify + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoggingDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + if (!$util.isString(message.monitoredResource)) + return "monitoredResource: string expected"; + if (message.logs != null && message.hasOwnProperty("logs")) { + if (!Array.isArray(message.logs)) + return "logs: array expected"; + for (var i = 0; i < message.logs.length; ++i) + if (!$util.isString(message.logs[i])) + return "logs: string[] expected"; + } + return null; + }; + + /** + * Creates a LoggingDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {Object.} object Plain object + * @returns {google.api.Logging.LoggingDestination} LoggingDestination + */ + LoggingDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Logging.LoggingDestination) + return object; + var message = new $root.google.api.Logging.LoggingDestination(); + if (object.monitoredResource != null) + message.monitoredResource = String(object.monitoredResource); + if (object.logs) { + if (!Array.isArray(object.logs)) + throw TypeError(".google.api.Logging.LoggingDestination.logs: array expected"); + message.logs = []; + for (var i = 0; i < object.logs.length; ++i) + message.logs[i] = String(object.logs[i]); + } + return message; + }; + + /** + * Creates a plain object from a LoggingDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.LoggingDestination} message LoggingDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoggingDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.logs = []; + if (options.defaults) + object.monitoredResource = ""; + if (message.logs && message.logs.length) { + object.logs = []; + for (var j = 0; j < message.logs.length; ++j) + object.logs[j] = message.logs[j]; + } + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + object.monitoredResource = message.monitoredResource; + return object; + }; + + /** + * Converts this LoggingDestination to JSON. + * @function toJSON + * @memberof google.api.Logging.LoggingDestination + * @instance + * @returns {Object.} JSON object + */ + LoggingDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LoggingDestination; + })(); + + return Logging; + })(); + + api.MonitoredResourceDescriptor = (function() { + + /** + * Properties of a MonitoredResourceDescriptor. + * @memberof google.api + * @interface IMonitoredResourceDescriptor + * @property {string|null} [name] MonitoredResourceDescriptor name + * @property {string|null} [type] MonitoredResourceDescriptor type + * @property {string|null} [displayName] MonitoredResourceDescriptor displayName + * @property {string|null} [description] MonitoredResourceDescriptor description + * @property {Array.|null} [labels] MonitoredResourceDescriptor labels + * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage + */ + + /** + * Constructs a new MonitoredResourceDescriptor. + * @memberof google.api + * @classdesc Represents a MonitoredResourceDescriptor. + * @implements IMonitoredResourceDescriptor * @constructor - * @param {google.api.IPage=} [properties] Properties to set + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set */ - function Page(properties) { - this.subpages = []; + function MonitoredResourceDescriptor(properties) { + this.labels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17027,104 +17328,143 @@ } /** - * Page name. + * MonitoredResourceDescriptor name. * @member {string} name - * @memberof google.api.Page + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - Page.prototype.name = ""; + MonitoredResourceDescriptor.prototype.name = ""; /** - * Page content. - * @member {string} content - * @memberof google.api.Page + * MonitoredResourceDescriptor type. + * @member {string} type + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - Page.prototype.content = ""; + MonitoredResourceDescriptor.prototype.type = ""; /** - * Page subpages. - * @member {Array.} subpages - * @memberof google.api.Page + * MonitoredResourceDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MonitoredResourceDescriptor * @instance */ - Page.prototype.subpages = $util.emptyArray; + MonitoredResourceDescriptor.prototype.displayName = ""; /** - * Creates a new Page instance using the specified properties. - * @function create - * @memberof google.api.Page - * @static - * @param {google.api.IPage=} [properties] Properties to set - * @returns {google.api.Page} Page instance + * MonitoredResourceDescriptor description. + * @member {string} description + * @memberof google.api.MonitoredResourceDescriptor + * @instance */ - Page.create = function create(properties) { - return new Page(properties); + MonitoredResourceDescriptor.prototype.description = ""; + + /** + * MonitoredResourceDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + + /** + * MonitoredResourceDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MonitoredResourceDescriptor + * @instance + */ + MonitoredResourceDescriptor.prototype.launchStage = 0; + + /** + * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance + */ + MonitoredResourceDescriptor.create = function create(properties) { + return new MonitoredResourceDescriptor(properties); }; /** - * Encodes the specified Page message. Does not implicitly {@link google.api.Page.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Page + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.IPage} message Page message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Page.encode = function encode(message, writer) { + MonitoredResourceDescriptor.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.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.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); - if (message.subpages != null && message.subpages.length) - for (var i = 0; i < message.subpages.length; ++i) - $root.google.api.Page.encode(message.subpages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); return writer; }; /** - * Encodes the specified Page message, length delimited. Does not implicitly {@link google.api.Page.verify|verify} messages. + * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Page + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.IPage} message Page message or plain object to encode + * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Page.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Page message from the specified reader or buffer. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Page + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Page} Page + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Page.decode = function decode(reader, length) { + MonitoredResourceDescriptor.decode = function 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.Page(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 5: message.name = reader.string(); break; + case 1: + message.type = reader.string(); + break; case 2: - message.content = reader.string(); + message.displayName = reader.string(); break; case 3: - if (!(message.subpages && message.subpages.length)) - message.subpages = []; - message.subpages.push($root.google.api.Page.decode(reader, reader.uint32())); + message.description = reader.string(); + break; + case 4: + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 7: + message.launchStage = reader.int32(); break; default: reader.skipType(tag & 7); @@ -17135,146 +17475,211 @@ }; /** - * Decodes a Page message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Page + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Page} Page + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Page.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Page message. + * Verifies a MonitoredResourceDescriptor message. * @function verify - * @memberof google.api.Page + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Page.verify = function verify(message) { + MonitoredResourceDescriptor.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.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.subpages != null && message.hasOwnProperty("subpages")) { - if (!Array.isArray(message.subpages)) - return "subpages: array expected"; - for (var i = 0; i < message.subpages.length; ++i) { - var error = $root.google.api.Page.verify(message.subpages[i]); + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: 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.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); if (error) - return "subpages." + error; + return "labels." + error; } } + 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; + } return null; }; /** - * Creates a Page message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Page + * @memberof google.api.MonitoredResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Page} Page + * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor */ - Page.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Page) + MonitoredResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceDescriptor) return object; - var message = new $root.google.api.Page(); + var message = new $root.google.api.MonitoredResourceDescriptor(); if (object.name != null) message.name = String(object.name); - if (object.content != null) - message.content = String(object.content); - if (object.subpages) { - if (!Array.isArray(object.subpages)) - throw TypeError(".google.api.Page.subpages: array expected"); - message.subpages = []; - for (var i = 0; i < object.subpages.length; ++i) { - if (typeof object.subpages[i] !== "object") - throw TypeError(".google.api.Page.subpages: object expected"); - message.subpages[i] = $root.google.api.Page.fromObject(object.subpages[i]); + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); } } + switch (object.launchStage) { + 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; + } return message; }; /** - * Creates a plain object from a Page message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Page + * @memberof google.api.MonitoredResourceDescriptor * @static - * @param {google.api.Page} message Page + * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Page.toObject = function toObject(message, options) { + MonitoredResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.subpages = []; + object.labels = []; if (options.defaults) { + object.type = ""; + object.displayName = ""; + object.description = ""; object.name = ""; - object.content = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.subpages && message.subpages.length) { - object.subpages = []; - for (var j = 0; j < message.subpages.length; ++j) - object.subpages[j] = $root.google.api.Page.toObject(message.subpages[j], options); - } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this Page to JSON. + * Converts this MonitoredResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.Page + * @memberof google.api.MonitoredResourceDescriptor * @instance * @returns {Object.} JSON object */ - Page.prototype.toJSON = function toJSON() { + MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Page; + return MonitoredResourceDescriptor; })(); - api.Endpoint = (function() { + api.MonitoredResource = (function() { /** - * Properties of an Endpoint. + * Properties of a MonitoredResource. * @memberof google.api - * @interface IEndpoint - * @property {string|null} [name] Endpoint name - * @property {Array.|null} [aliases] Endpoint aliases - * @property {string|null} [target] Endpoint target - * @property {boolean|null} [allowCors] Endpoint allowCors + * @interface IMonitoredResource + * @property {string|null} [type] MonitoredResource type + * @property {Object.|null} [labels] MonitoredResource labels */ /** - * Constructs a new Endpoint. + * Constructs a new MonitoredResource. * @memberof google.api - * @classdesc Represents an Endpoint. - * @implements IEndpoint + * @classdesc Represents a MonitoredResource. + * @implements IMonitoredResource * @constructor - * @param {google.api.IEndpoint=} [properties] Properties to set + * @param {google.api.IMonitoredResource=} [properties] Properties to set */ - function Endpoint(properties) { - this.aliases = []; + function MonitoredResource(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17282,117 +17687,108 @@ } /** - * Endpoint name. - * @member {string} name - * @memberof google.api.Endpoint - * @instance - */ - Endpoint.prototype.name = ""; - - /** - * Endpoint aliases. - * @member {Array.} aliases - * @memberof google.api.Endpoint - * @instance - */ - Endpoint.prototype.aliases = $util.emptyArray; - - /** - * Endpoint target. - * @member {string} target - * @memberof google.api.Endpoint + * MonitoredResource type. + * @member {string} type + * @memberof google.api.MonitoredResource * @instance */ - Endpoint.prototype.target = ""; + MonitoredResource.prototype.type = ""; /** - * Endpoint allowCors. - * @member {boolean} allowCors - * @memberof google.api.Endpoint + * MonitoredResource labels. + * @member {Object.} labels + * @memberof google.api.MonitoredResource * @instance */ - Endpoint.prototype.allowCors = false; + MonitoredResource.prototype.labels = $util.emptyObject; /** - * Creates a new Endpoint instance using the specified properties. + * Creates a new MonitoredResource instance using the specified properties. * @function create - * @memberof google.api.Endpoint + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IEndpoint=} [properties] Properties to set - * @returns {google.api.Endpoint} Endpoint instance + * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @returns {google.api.MonitoredResource} MonitoredResource instance */ - Endpoint.create = function create(properties) { - return new Endpoint(properties); + MonitoredResource.create = function create(properties) { + return new MonitoredResource(properties); }; /** - * Encodes the specified Endpoint message. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. + * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. * @function encode - * @memberof google.api.Endpoint + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IEndpoint} message Endpoint message or plain object to encode + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Endpoint.encode = function encode(message, writer) { + MonitoredResource.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.aliases != null && message.aliases.length) - for (var i = 0; i < message.aliases.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.aliases[i]); - if (message.allowCors != null && Object.hasOwnProperty.call(message, "allowCors")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowCors); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.target); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + 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 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. + * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Endpoint + * @memberof google.api.MonitoredResource * @static - * @param {google.api.IEndpoint} message Endpoint message or plain object to encode + * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Endpoint.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Endpoint message from the specified reader or buffer. + * Decodes a MonitoredResource message from the specified reader or buffer. * @function decode - * @memberof google.api.Endpoint + * @memberof google.api.MonitoredResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Endpoint} Endpoint + * @returns {google.api.MonitoredResource} MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Endpoint.decode = function decode(reader, length) { + MonitoredResource.decode = function 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.Endpoint(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResource(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.type = reader.string(); break; case 2: - if (!(message.aliases && message.aliases.length)) - message.aliases = []; - message.aliases.push(reader.string()); - break; - case 101: - message.target = reader.string(); - break; - case 5: - message.allowCors = reader.bool(); + 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; default: reader.skipType(tag & 7); @@ -17403,149 +17799,132 @@ }; /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Endpoint + * @memberof google.api.MonitoredResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Endpoint} Endpoint + * @returns {google.api.MonitoredResource} MonitoredResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Endpoint.decodeDelimited = function decodeDelimited(reader) { + MonitoredResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Endpoint message. + * Verifies a MonitoredResource message. * @function verify - * @memberof google.api.Endpoint + * @memberof google.api.MonitoredResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Endpoint.verify = function verify(message) { + MonitoredResource.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.aliases != null && message.hasOwnProperty("aliases")) { - if (!Array.isArray(message.aliases)) - return "aliases: array expected"; - for (var i = 0; i < message.aliases.length; ++i) - if (!$util.isString(message.aliases[i])) - return "aliases: string[] expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: 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.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.allowCors != null && message.hasOwnProperty("allowCors")) - if (typeof message.allowCors !== "boolean") - return "allowCors: boolean expected"; return null; }; /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Endpoint + * @memberof google.api.MonitoredResource * @static * @param {Object.} object Plain object - * @returns {google.api.Endpoint} Endpoint + * @returns {google.api.MonitoredResource} MonitoredResource */ - Endpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Endpoint) + MonitoredResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResource) return object; - var message = new $root.google.api.Endpoint(); - if (object.name != null) - message.name = String(object.name); - if (object.aliases) { - if (!Array.isArray(object.aliases)) - throw TypeError(".google.api.Endpoint.aliases: array expected"); - message.aliases = []; - for (var i = 0; i < object.aliases.length; ++i) - message.aliases[i] = String(object.aliases[i]); + var message = new $root.google.api.MonitoredResource(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.MonitoredResource.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.target != null) - message.target = String(object.target); - if (object.allowCors != null) - message.allowCors = Boolean(object.allowCors); return message; }; /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Endpoint + * @memberof google.api.MonitoredResource * @static - * @param {google.api.Endpoint} message Endpoint + * @param {google.api.MonitoredResource} message MonitoredResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Endpoint.toObject = function toObject(message, options) { + MonitoredResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.aliases = []; - if (options.defaults) { - object.name = ""; - object.allowCors = false; - object.target = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.aliases && message.aliases.length) { - object.aliases = []; - for (var j = 0; j < message.aliases.length; ++j) - object.aliases[j] = message.aliases[j]; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + 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.allowCors != null && message.hasOwnProperty("allowCors")) - object.allowCors = message.allowCors; - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; return object; }; /** - * Converts this Endpoint to JSON. + * Converts this MonitoredResource to JSON. * @function toJSON - * @memberof google.api.Endpoint + * @memberof google.api.MonitoredResource * @instance * @returns {Object.} JSON object */ - Endpoint.prototype.toJSON = function toJSON() { + MonitoredResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Endpoint; + return MonitoredResource; })(); - api.LogDescriptor = (function() { + api.MonitoredResourceMetadata = (function() { /** - * Properties of a LogDescriptor. + * Properties of a MonitoredResourceMetadata. * @memberof google.api - * @interface ILogDescriptor - * @property {string|null} [name] LogDescriptor name - * @property {Array.|null} [labels] LogDescriptor labels - * @property {string|null} [description] LogDescriptor description - * @property {string|null} [displayName] LogDescriptor displayName + * @interface IMonitoredResourceMetadata + * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels + * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels */ /** - * Constructs a new LogDescriptor. + * Constructs a new MonitoredResourceMetadata. * @memberof google.api - * @classdesc Represents a LogDescriptor. - * @implements ILogDescriptor + * @classdesc Represents a MonitoredResourceMetadata. + * @implements IMonitoredResourceMetadata * @constructor - * @param {google.api.ILogDescriptor=} [properties] Properties to set + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set */ - function LogDescriptor(properties) { - this.labels = []; + function MonitoredResourceMetadata(properties) { + this.userLabels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17553,117 +17932,108 @@ } /** - * LogDescriptor name. - * @member {string} name - * @memberof google.api.LogDescriptor - * @instance - */ - LogDescriptor.prototype.name = ""; - - /** - * LogDescriptor labels. - * @member {Array.} labels - * @memberof google.api.LogDescriptor - * @instance - */ - LogDescriptor.prototype.labels = $util.emptyArray; - - /** - * LogDescriptor description. - * @member {string} description - * @memberof google.api.LogDescriptor + * MonitoredResourceMetadata systemLabels. + * @member {google.protobuf.IStruct|null|undefined} systemLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - LogDescriptor.prototype.description = ""; + MonitoredResourceMetadata.prototype.systemLabels = null; /** - * LogDescriptor displayName. - * @member {string} displayName - * @memberof google.api.LogDescriptor + * MonitoredResourceMetadata userLabels. + * @member {Object.} userLabels + * @memberof google.api.MonitoredResourceMetadata * @instance */ - LogDescriptor.prototype.displayName = ""; + MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; /** - * Creates a new LogDescriptor instance using the specified properties. + * Creates a new MonitoredResourceMetadata instance using the specified properties. * @function create - * @memberof google.api.LogDescriptor + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.ILogDescriptor=} [properties] Properties to set - * @returns {google.api.LogDescriptor} LogDescriptor instance + * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance */ - LogDescriptor.create = function create(properties) { - return new LogDescriptor(properties); + MonitoredResourceMetadata.create = function create(properties) { + return new MonitoredResourceMetadata(properties); }; /** - * Encodes the specified LogDescriptor message. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encode - * @memberof google.api.LogDescriptor + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.ILogDescriptor} message LogDescriptor message or plain object to encode + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogDescriptor.encode = function encode(message, writer) { + MonitoredResourceMetadata.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.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.systemLabels != null && Object.hasOwnProperty.call(message, "systemLabels")) + $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) + for (var keys = Object.keys(message.userLabels), 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.userLabels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified LogDescriptor message, length delimited. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. + * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.LogDescriptor + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.ILogDescriptor} message LogDescriptor message or plain object to encode + * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogDescriptor message from the specified reader or buffer. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. * @function decode - * @memberof google.api.LogDescriptor + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.LogDescriptor} LogDescriptor + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogDescriptor.decode = function decode(reader, length) { + MonitoredResourceMetadata.decode = function 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.LogDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MonitoredResourceMetadata(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; case 2: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.displayName = reader.string(); + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + 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.userLabels[key] = value; break; default: reader.skipType(tag & 7); @@ -17674,151 +18044,136 @@ }; /** - * Decodes a LogDescriptor message from the specified reader or buffer, length delimited. + * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.LogDescriptor + * @memberof google.api.MonitoredResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LogDescriptor} LogDescriptor + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogDescriptor.decodeDelimited = function decodeDelimited(reader) { + MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogDescriptor message. + * Verifies a MonitoredResourceMetadata message. * @function verify - * @memberof google.api.LogDescriptor + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogDescriptor.verify = function verify(message) { + MonitoredResourceMetadata.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.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); - if (error) - return "labels." + error; - } + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { + var error = $root.google.protobuf.Struct.verify(message.systemLabels); + if (error) + return "systemLabels." + error; + } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; return null; }; /** - * Creates a LogDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.LogDescriptor + * @memberof google.api.MonitoredResourceMetadata * @static * @param {Object.} object Plain object - * @returns {google.api.LogDescriptor} LogDescriptor + * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata */ - LogDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LogDescriptor) + MonitoredResourceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MonitoredResourceMetadata) return object; - var message = new $root.google.api.LogDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.LogDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.LogDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); - } + var message = new $root.google.api.MonitoredResourceMetadata(); + if (object.systemLabels != null) { + if (typeof object.systemLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); + message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); } - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a LogDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.LogDescriptor + * @memberof google.api.MonitoredResourceMetadata * @static - * @param {google.api.LogDescriptor} message LogDescriptor + * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogDescriptor.toObject = function toObject(message, options) { + MonitoredResourceMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.labels = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.displayName = ""; + if (options.objects || options.defaults) + object.userLabels = {}; + if (options.defaults) + object.systemLabels = null; + if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) + object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; return object; }; /** - * Converts this LogDescriptor to JSON. + * Converts this MonitoredResourceMetadata to JSON. * @function toJSON - * @memberof google.api.LogDescriptor + * @memberof google.api.MonitoredResourceMetadata * @instance * @returns {Object.} JSON object */ - LogDescriptor.prototype.toJSON = function toJSON() { + MonitoredResourceMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LogDescriptor; + return MonitoredResourceMetadata; })(); - api.Logging = (function() { + api.Monitoring = (function() { /** - * Properties of a Logging. + * Properties of a Monitoring. * @memberof google.api - * @interface ILogging - * @property {Array.|null} [producerDestinations] Logging producerDestinations - * @property {Array.|null} [consumerDestinations] Logging consumerDestinations + * @interface IMonitoring + * @property {Array.|null} [producerDestinations] Monitoring producerDestinations + * @property {Array.|null} [consumerDestinations] Monitoring consumerDestinations */ /** - * Constructs a new Logging. + * Constructs a new Monitoring. * @memberof google.api - * @classdesc Represents a Logging. - * @implements ILogging + * @classdesc Represents a Monitoring. + * @implements IMonitoring * @constructor - * @param {google.api.ILogging=} [properties] Properties to set + * @param {google.api.IMonitoring=} [properties] Properties to set */ - function Logging(properties) { + function Monitoring(properties) { this.producerDestinations = []; this.consumerDestinations = []; if (properties) @@ -17828,94 +18183,94 @@ } /** - * Logging producerDestinations. - * @member {Array.} producerDestinations - * @memberof google.api.Logging + * Monitoring producerDestinations. + * @member {Array.} producerDestinations + * @memberof google.api.Monitoring * @instance */ - Logging.prototype.producerDestinations = $util.emptyArray; + Monitoring.prototype.producerDestinations = $util.emptyArray; /** - * Logging consumerDestinations. - * @member {Array.} consumerDestinations - * @memberof google.api.Logging + * Monitoring consumerDestinations. + * @member {Array.} consumerDestinations + * @memberof google.api.Monitoring * @instance */ - Logging.prototype.consumerDestinations = $util.emptyArray; + Monitoring.prototype.consumerDestinations = $util.emptyArray; /** - * Creates a new Logging instance using the specified properties. + * Creates a new Monitoring instance using the specified properties. * @function create - * @memberof google.api.Logging + * @memberof google.api.Monitoring * @static - * @param {google.api.ILogging=} [properties] Properties to set - * @returns {google.api.Logging} Logging instance + * @param {google.api.IMonitoring=} [properties] Properties to set + * @returns {google.api.Monitoring} Monitoring instance */ - Logging.create = function create(properties) { - return new Logging(properties); + Monitoring.create = function create(properties) { + return new Monitoring(properties); }; /** - * Encodes the specified Logging message. Does not implicitly {@link google.api.Logging.verify|verify} messages. + * Encodes the specified Monitoring message. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. * @function encode - * @memberof google.api.Logging + * @memberof google.api.Monitoring * @static - * @param {google.api.ILogging} message Logging message or plain object to encode + * @param {google.api.IMonitoring} message Monitoring message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Logging.encode = function encode(message, writer) { + Monitoring.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.producerDestinations != null && message.producerDestinations.length) for (var i = 0; i < message.producerDestinations.length; ++i) - $root.google.api.Logging.LoggingDestination.encode(message.producerDestinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.Monitoring.MonitoringDestination.encode(message.producerDestinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.consumerDestinations != null && message.consumerDestinations.length) for (var i = 0; i < message.consumerDestinations.length; ++i) - $root.google.api.Logging.LoggingDestination.encode(message.consumerDestinations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.api.Monitoring.MonitoringDestination.encode(message.consumerDestinations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Logging message, length delimited. Does not implicitly {@link google.api.Logging.verify|verify} messages. + * Encodes the specified Monitoring message, length delimited. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Logging + * @memberof google.api.Monitoring * @static - * @param {google.api.ILogging} message Logging message or plain object to encode + * @param {google.api.IMonitoring} message Monitoring message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Logging.encodeDelimited = function encodeDelimited(message, writer) { + Monitoring.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Logging message from the specified reader or buffer. + * Decodes a Monitoring message from the specified reader or buffer. * @function decode - * @memberof google.api.Logging + * @memberof google.api.Monitoring * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Logging} Logging + * @returns {google.api.Monitoring} Monitoring * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Logging.decode = function decode(reader, length) { + Monitoring.decode = function 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.Logging(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Monitoring(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.producerDestinations && message.producerDestinations.length)) message.producerDestinations = []; - message.producerDestinations.push($root.google.api.Logging.LoggingDestination.decode(reader, reader.uint32())); + message.producerDestinations.push($root.google.api.Monitoring.MonitoringDestination.decode(reader, reader.uint32())); break; case 2: if (!(message.consumerDestinations && message.consumerDestinations.length)) message.consumerDestinations = []; - message.consumerDestinations.push($root.google.api.Logging.LoggingDestination.decode(reader, reader.uint32())); + message.consumerDestinations.push($root.google.api.Monitoring.MonitoringDestination.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -17926,37 +18281,37 @@ }; /** - * Decodes a Logging message from the specified reader or buffer, length delimited. + * Decodes a Monitoring message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Logging + * @memberof google.api.Monitoring * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Logging} Logging + * @returns {google.api.Monitoring} Monitoring * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Logging.decodeDelimited = function decodeDelimited(reader) { + Monitoring.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Logging message. + * Verifies a Monitoring message. * @function verify - * @memberof google.api.Logging + * @memberof google.api.Monitoring * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Logging.verify = function verify(message) { + Monitoring.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.producerDestinations != null && message.hasOwnProperty("producerDestinations")) { if (!Array.isArray(message.producerDestinations)) return "producerDestinations: array expected"; for (var i = 0; i < message.producerDestinations.length; ++i) { - var error = $root.google.api.Logging.LoggingDestination.verify(message.producerDestinations[i]); + var error = $root.google.api.Monitoring.MonitoringDestination.verify(message.producerDestinations[i]); if (error) return "producerDestinations." + error; } @@ -17965,7 +18320,7 @@ if (!Array.isArray(message.consumerDestinations)) return "consumerDestinations: array expected"; for (var i = 0; i < message.consumerDestinations.length; ++i) { - var error = $root.google.api.Logging.LoggingDestination.verify(message.consumerDestinations[i]); + var error = $root.google.api.Monitoring.MonitoringDestination.verify(message.consumerDestinations[i]); if (error) return "consumerDestinations." + error; } @@ -17974,50 +18329,50 @@ }; /** - * Creates a Logging message from a plain object. Also converts values to their respective internal types. + * Creates a Monitoring message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Logging + * @memberof google.api.Monitoring * @static * @param {Object.} object Plain object - * @returns {google.api.Logging} Logging + * @returns {google.api.Monitoring} Monitoring */ - Logging.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Logging) + Monitoring.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Monitoring) return object; - var message = new $root.google.api.Logging(); + var message = new $root.google.api.Monitoring(); if (object.producerDestinations) { if (!Array.isArray(object.producerDestinations)) - throw TypeError(".google.api.Logging.producerDestinations: array expected"); + throw TypeError(".google.api.Monitoring.producerDestinations: array expected"); message.producerDestinations = []; for (var i = 0; i < object.producerDestinations.length; ++i) { if (typeof object.producerDestinations[i] !== "object") - throw TypeError(".google.api.Logging.producerDestinations: object expected"); - message.producerDestinations[i] = $root.google.api.Logging.LoggingDestination.fromObject(object.producerDestinations[i]); + throw TypeError(".google.api.Monitoring.producerDestinations: object expected"); + message.producerDestinations[i] = $root.google.api.Monitoring.MonitoringDestination.fromObject(object.producerDestinations[i]); } } if (object.consumerDestinations) { if (!Array.isArray(object.consumerDestinations)) - throw TypeError(".google.api.Logging.consumerDestinations: array expected"); + throw TypeError(".google.api.Monitoring.consumerDestinations: array expected"); message.consumerDestinations = []; for (var i = 0; i < object.consumerDestinations.length; ++i) { if (typeof object.consumerDestinations[i] !== "object") - throw TypeError(".google.api.Logging.consumerDestinations: object expected"); - message.consumerDestinations[i] = $root.google.api.Logging.LoggingDestination.fromObject(object.consumerDestinations[i]); + throw TypeError(".google.api.Monitoring.consumerDestinations: object expected"); + message.consumerDestinations[i] = $root.google.api.Monitoring.MonitoringDestination.fromObject(object.consumerDestinations[i]); } } return message; }; /** - * Creates a plain object from a Logging message. Also converts values to other types if specified. + * Creates a plain object from a Monitoring message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Logging + * @memberof google.api.Monitoring * @static - * @param {google.api.Logging} message Logging + * @param {google.api.Monitoring} message Monitoring * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Logging.toObject = function toObject(message, options) { + Monitoring.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -18028,47 +18383,47 @@ if (message.producerDestinations && message.producerDestinations.length) { object.producerDestinations = []; for (var j = 0; j < message.producerDestinations.length; ++j) - object.producerDestinations[j] = $root.google.api.Logging.LoggingDestination.toObject(message.producerDestinations[j], options); + object.producerDestinations[j] = $root.google.api.Monitoring.MonitoringDestination.toObject(message.producerDestinations[j], options); } if (message.consumerDestinations && message.consumerDestinations.length) { object.consumerDestinations = []; for (var j = 0; j < message.consumerDestinations.length; ++j) - object.consumerDestinations[j] = $root.google.api.Logging.LoggingDestination.toObject(message.consumerDestinations[j], options); + object.consumerDestinations[j] = $root.google.api.Monitoring.MonitoringDestination.toObject(message.consumerDestinations[j], options); } return object; }; /** - * Converts this Logging to JSON. + * Converts this Monitoring to JSON. * @function toJSON - * @memberof google.api.Logging + * @memberof google.api.Monitoring * @instance * @returns {Object.} JSON object */ - Logging.prototype.toJSON = function toJSON() { + Monitoring.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Logging.LoggingDestination = (function() { + Monitoring.MonitoringDestination = (function() { /** - * Properties of a LoggingDestination. - * @memberof google.api.Logging - * @interface ILoggingDestination - * @property {string|null} [monitoredResource] LoggingDestination monitoredResource - * @property {Array.|null} [logs] LoggingDestination logs + * Properties of a MonitoringDestination. + * @memberof google.api.Monitoring + * @interface IMonitoringDestination + * @property {string|null} [monitoredResource] MonitoringDestination monitoredResource + * @property {Array.|null} [metrics] MonitoringDestination metrics */ /** - * Constructs a new LoggingDestination. - * @memberof google.api.Logging - * @classdesc Represents a LoggingDestination. - * @implements ILoggingDestination + * Constructs a new MonitoringDestination. + * @memberof google.api.Monitoring + * @classdesc Represents a MonitoringDestination. + * @implements IMonitoringDestination * @constructor - * @param {google.api.Logging.ILoggingDestination=} [properties] Properties to set + * @param {google.api.Monitoring.IMonitoringDestination=} [properties] Properties to set */ - function LoggingDestination(properties) { - this.logs = []; + function MonitoringDestination(properties) { + this.metrics = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18076,91 +18431,91 @@ } /** - * LoggingDestination monitoredResource. + * MonitoringDestination monitoredResource. * @member {string} monitoredResource - * @memberof google.api.Logging.LoggingDestination + * @memberof google.api.Monitoring.MonitoringDestination * @instance */ - LoggingDestination.prototype.monitoredResource = ""; + MonitoringDestination.prototype.monitoredResource = ""; /** - * LoggingDestination logs. - * @member {Array.} logs - * @memberof google.api.Logging.LoggingDestination + * MonitoringDestination metrics. + * @member {Array.} metrics + * @memberof google.api.Monitoring.MonitoringDestination * @instance */ - LoggingDestination.prototype.logs = $util.emptyArray; + MonitoringDestination.prototype.metrics = $util.emptyArray; /** - * Creates a new LoggingDestination instance using the specified properties. + * Creates a new MonitoringDestination instance using the specified properties. * @function create - * @memberof google.api.Logging.LoggingDestination + * @memberof google.api.Monitoring.MonitoringDestination * @static - * @param {google.api.Logging.ILoggingDestination=} [properties] Properties to set - * @returns {google.api.Logging.LoggingDestination} LoggingDestination instance + * @param {google.api.Monitoring.IMonitoringDestination=} [properties] Properties to set + * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination instance */ - LoggingDestination.create = function create(properties) { - return new LoggingDestination(properties); + MonitoringDestination.create = function create(properties) { + return new MonitoringDestination(properties); }; /** - * Encodes the specified LoggingDestination message. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * Encodes the specified MonitoringDestination message. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. * @function encode - * @memberof google.api.Logging.LoggingDestination + * @memberof google.api.Monitoring.MonitoringDestination * @static - * @param {google.api.Logging.ILoggingDestination} message LoggingDestination message or plain object to encode + * @param {google.api.Monitoring.IMonitoringDestination} message MonitoringDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoggingDestination.encode = function encode(message, writer) { + MonitoringDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.logs != null && message.logs.length) - for (var i = 0; i < message.logs.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logs[i]); if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.monitoredResource); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.monitoredResource); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metrics[i]); return writer; }; /** - * Encodes the specified LoggingDestination message, length delimited. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * Encodes the specified MonitoringDestination message, length delimited. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Logging.LoggingDestination + * @memberof google.api.Monitoring.MonitoringDestination * @static - * @param {google.api.Logging.ILoggingDestination} message LoggingDestination message or plain object to encode + * @param {google.api.Monitoring.IMonitoringDestination} message MonitoringDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoggingDestination.encodeDelimited = function encodeDelimited(message, writer) { + MonitoringDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LoggingDestination message from the specified reader or buffer. + * Decodes a MonitoringDestination message from the specified reader or buffer. * @function decode - * @memberof google.api.Logging.LoggingDestination + * @memberof google.api.Monitoring.MonitoringDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Logging.LoggingDestination} LoggingDestination + * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoggingDestination.decode = function decode(reader, length) { + MonitoringDestination.decode = function 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.Logging.LoggingDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Monitoring.MonitoringDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: + case 1: message.monitoredResource = reader.string(); break; - case 1: - if (!(message.logs && message.logs.length)) - message.logs = []; - message.logs.push(reader.string()); + case 2: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -18171,137 +18526,134 @@ }; /** - * Decodes a LoggingDestination message from the specified reader or buffer, length delimited. + * Decodes a MonitoringDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Logging.LoggingDestination + * @memberof google.api.Monitoring.MonitoringDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Logging.LoggingDestination} LoggingDestination + * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoggingDestination.decodeDelimited = function decodeDelimited(reader) { + MonitoringDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LoggingDestination message. + * Verifies a MonitoringDestination message. * @function verify - * @memberof google.api.Logging.LoggingDestination + * @memberof google.api.Monitoring.MonitoringDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LoggingDestination.verify = function verify(message) { + MonitoringDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) if (!$util.isString(message.monitoredResource)) return "monitoredResource: string expected"; - if (message.logs != null && message.hasOwnProperty("logs")) { - if (!Array.isArray(message.logs)) - return "logs: array expected"; - for (var i = 0; i < message.logs.length; ++i) - if (!$util.isString(message.logs[i])) - return "logs: string[] expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) + if (!$util.isString(message.metrics[i])) + return "metrics: string[] expected"; } return null; }; /** - * Creates a LoggingDestination message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoringDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Logging.LoggingDestination + * @memberof google.api.Monitoring.MonitoringDestination * @static * @param {Object.} object Plain object - * @returns {google.api.Logging.LoggingDestination} LoggingDestination + * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination */ - LoggingDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Logging.LoggingDestination) + MonitoringDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Monitoring.MonitoringDestination) return object; - var message = new $root.google.api.Logging.LoggingDestination(); + var message = new $root.google.api.Monitoring.MonitoringDestination(); if (object.monitoredResource != null) message.monitoredResource = String(object.monitoredResource); - if (object.logs) { - if (!Array.isArray(object.logs)) - throw TypeError(".google.api.Logging.LoggingDestination.logs: array expected"); - message.logs = []; - for (var i = 0; i < object.logs.length; ++i) - message.logs[i] = String(object.logs[i]); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.api.Monitoring.MonitoringDestination.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) + message.metrics[i] = String(object.metrics[i]); } return message; }; /** - * Creates a plain object from a LoggingDestination message. Also converts values to other types if specified. + * Creates a plain object from a MonitoringDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Logging.LoggingDestination + * @memberof google.api.Monitoring.MonitoringDestination * @static - * @param {google.api.Logging.LoggingDestination} message LoggingDestination + * @param {google.api.Monitoring.MonitoringDestination} message MonitoringDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LoggingDestination.toObject = function toObject(message, options) { + MonitoringDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.logs = []; + object.metrics = []; if (options.defaults) object.monitoredResource = ""; - if (message.logs && message.logs.length) { - object.logs = []; - for (var j = 0; j < message.logs.length; ++j) - object.logs[j] = message.logs[j]; - } if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) object.monitoredResource = message.monitoredResource; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = message.metrics[j]; + } return object; }; /** - * Converts this LoggingDestination to JSON. + * Converts this MonitoringDestination to JSON. * @function toJSON - * @memberof google.api.Logging.LoggingDestination + * @memberof google.api.Monitoring.MonitoringDestination * @instance * @returns {Object.} JSON object */ - LoggingDestination.prototype.toJSON = function toJSON() { + MonitoringDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LoggingDestination; + return MonitoringDestination; })(); - return Logging; + return Monitoring; })(); - api.MonitoredResourceDescriptor = (function() { + api.Quota = (function() { /** - * Properties of a MonitoredResourceDescriptor. + * Properties of a Quota. * @memberof google.api - * @interface IMonitoredResourceDescriptor - * @property {string|null} [name] MonitoredResourceDescriptor name - * @property {string|null} [type] MonitoredResourceDescriptor type - * @property {string|null} [displayName] MonitoredResourceDescriptor displayName - * @property {string|null} [description] MonitoredResourceDescriptor description - * @property {Array.|null} [labels] MonitoredResourceDescriptor labels - * @property {google.api.LaunchStage|null} [launchStage] MonitoredResourceDescriptor launchStage + * @interface IQuota + * @property {Array.|null} [limits] Quota limits + * @property {Array.|null} [metricRules] Quota metricRules */ /** - * Constructs a new MonitoredResourceDescriptor. + * Constructs a new Quota. * @memberof google.api - * @classdesc Represents a MonitoredResourceDescriptor. - * @implements IMonitoredResourceDescriptor + * @classdesc Represents a Quota. + * @implements IQuota * @constructor - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set + * @param {google.api.IQuota=} [properties] Properties to set */ - function MonitoredResourceDescriptor(properties) { - this.labels = []; + function Quota(properties) { + this.limits = []; + this.metricRules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18309,143 +18661,94 @@ } /** - * MonitoredResourceDescriptor name. - * @member {string} name - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.name = ""; - - /** - * MonitoredResourceDescriptor type. - * @member {string} type - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.type = ""; - - /** - * MonitoredResourceDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.displayName = ""; - - /** - * MonitoredResourceDescriptor description. - * @member {string} description - * @memberof google.api.MonitoredResourceDescriptor - * @instance - */ - MonitoredResourceDescriptor.prototype.description = ""; - - /** - * MonitoredResourceDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MonitoredResourceDescriptor + * Quota limits. + * @member {Array.} limits + * @memberof google.api.Quota * @instance */ - MonitoredResourceDescriptor.prototype.labels = $util.emptyArray; + Quota.prototype.limits = $util.emptyArray; /** - * MonitoredResourceDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MonitoredResourceDescriptor + * Quota metricRules. + * @member {Array.} metricRules + * @memberof google.api.Quota * @instance */ - MonitoredResourceDescriptor.prototype.launchStage = 0; + Quota.prototype.metricRules = $util.emptyArray; /** - * Creates a new MonitoredResourceDescriptor instance using the specified properties. + * Creates a new Quota instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Quota * @static - * @param {google.api.IMonitoredResourceDescriptor=} [properties] Properties to set - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor instance + * @param {google.api.IQuota=} [properties] Properties to set + * @returns {google.api.Quota} Quota instance */ - MonitoredResourceDescriptor.create = function create(properties) { - return new MonitoredResourceDescriptor(properties); + Quota.create = function create(properties) { + return new Quota(properties); }; /** - * Encodes the specified MonitoredResourceDescriptor message. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified Quota message. Does not implicitly {@link google.api.Quota.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Quota * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.api.IQuota} message Quota message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encode = function encode(message, writer) { + Quota.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.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.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); + if (message.limits != null && message.limits.length) + for (var i = 0; i < message.limits.length; ++i) + $root.google.api.QuotaLimit.encode(message.limits[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.metricRules != null && message.metricRules.length) + for (var i = 0; i < message.metricRules.length; ++i) + $root.google.api.MetricRule.encode(message.metricRules[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified MonitoredResourceDescriptor message, length delimited. Does not implicitly {@link google.api.MonitoredResourceDescriptor.verify|verify} messages. + * Encodes the specified Quota message, length delimited. Does not implicitly {@link google.api.Quota.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Quota * @static - * @param {google.api.IMonitoredResourceDescriptor} message MonitoredResourceDescriptor message or plain object to encode + * @param {google.api.IQuota} message Quota message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + Quota.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer. + * Decodes a Quota message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Quota * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.Quota} Quota * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decode = function decode(reader, length) { + Quota.decode = function 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.MonitoredResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Quota(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; - case 1: - message.type = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; case 3: - message.description = reader.string(); + if (!(message.limits && message.limits.length)) + message.limits = []; + message.limits.push($root.google.api.QuotaLimit.decode(reader, reader.uint32())); break; case 4: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 7: - message.launchStage = reader.int32(); + if (!(message.metricRules && message.metricRules.length)) + message.metricRules = []; + message.metricRules.push($root.google.api.MetricRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -18456,211 +18759,152 @@ }; /** - * Decodes a MonitoredResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Quota message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Quota * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.Quota} Quota * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + Quota.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceDescriptor message. + * Verifies a Quota message. * @function verify - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Quota * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResourceDescriptor.verify = function verify(message) { + Quota.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: 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.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (message.limits != null && message.hasOwnProperty("limits")) { + if (!Array.isArray(message.limits)) + return "limits: array expected"; + for (var i = 0; i < message.limits.length; ++i) { + var error = $root.google.api.QuotaLimit.verify(message.limits[i]); if (error) - return "labels." + error; + return "limits." + error; } } - 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.metricRules != null && message.hasOwnProperty("metricRules")) { + if (!Array.isArray(message.metricRules)) + return "metricRules: array expected"; + for (var i = 0; i < message.metricRules.length; ++i) { + var error = $root.google.api.MetricRule.verify(message.metricRules[i]); + if (error) + return "metricRules." + error; } + } return null; }; /** - * Creates a MonitoredResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Quota message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Quota * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceDescriptor} MonitoredResourceDescriptor + * @returns {google.api.Quota} Quota */ - MonitoredResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceDescriptor) + Quota.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Quota) return object; - var message = new $root.google.api.MonitoredResourceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MonitoredResourceDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + var message = new $root.google.api.Quota(); + if (object.limits) { + if (!Array.isArray(object.limits)) + throw TypeError(".google.api.Quota.limits: array expected"); + message.limits = []; + for (var i = 0; i < object.limits.length; ++i) { + if (typeof object.limits[i] !== "object") + throw TypeError(".google.api.Quota.limits: object expected"); + message.limits[i] = $root.google.api.QuotaLimit.fromObject(object.limits[i]); } } - switch (object.launchStage) { - 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.metricRules) { + if (!Array.isArray(object.metricRules)) + throw TypeError(".google.api.Quota.metricRules: array expected"); + message.metricRules = []; + for (var i = 0; i < object.metricRules.length; ++i) { + if (typeof object.metricRules[i] !== "object") + throw TypeError(".google.api.Quota.metricRules: object expected"); + message.metricRules[i] = $root.google.api.MetricRule.fromObject(object.metricRules[i]); + } } return message; }; /** - * Creates a plain object from a MonitoredResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a Quota message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Quota * @static - * @param {google.api.MonitoredResourceDescriptor} message MonitoredResourceDescriptor + * @param {google.api.Quota} message Quota * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceDescriptor.toObject = function toObject(message, options) { + Quota.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.labels = []; - if (options.defaults) { - object.type = ""; - object.displayName = ""; - object.description = ""; - object.name = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) { + object.limits = []; + object.metricRules = []; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + if (message.limits && message.limits.length) { + object.limits = []; + for (var j = 0; j < message.limits.length; ++j) + object.limits[j] = $root.google.api.QuotaLimit.toObject(message.limits[j], options); + } + if (message.metricRules && message.metricRules.length) { + object.metricRules = []; + for (var j = 0; j < message.metricRules.length; ++j) + object.metricRules[j] = $root.google.api.MetricRule.toObject(message.metricRules[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this MonitoredResourceDescriptor to JSON. + * Converts this Quota to JSON. * @function toJSON - * @memberof google.api.MonitoredResourceDescriptor + * @memberof google.api.Quota * @instance * @returns {Object.} JSON object */ - MonitoredResourceDescriptor.prototype.toJSON = function toJSON() { + Quota.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResourceDescriptor; + return Quota; })(); - api.MonitoredResource = (function() { + api.MetricRule = (function() { /** - * Properties of a MonitoredResource. + * Properties of a MetricRule. * @memberof google.api - * @interface IMonitoredResource - * @property {string|null} [type] MonitoredResource type - * @property {Object.|null} [labels] MonitoredResource labels + * @interface IMetricRule + * @property {string|null} [selector] MetricRule selector + * @property {Object.|null} [metricCosts] MetricRule metricCosts */ /** - * Constructs a new MonitoredResource. + * Constructs a new MetricRule. * @memberof google.api - * @classdesc Represents a MonitoredResource. - * @implements IMonitoredResource + * @classdesc Represents a MetricRule. + * @implements IMetricRule * @constructor - * @param {google.api.IMonitoredResource=} [properties] Properties to set + * @param {google.api.IMetricRule=} [properties] Properties to set */ - function MonitoredResource(properties) { - this.labels = {}; + function MetricRule(properties) { + this.metricCosts = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18668,93 +18912,93 @@ } /** - * MonitoredResource type. - * @member {string} type - * @memberof google.api.MonitoredResource + * MetricRule selector. + * @member {string} selector + * @memberof google.api.MetricRule * @instance */ - MonitoredResource.prototype.type = ""; + MetricRule.prototype.selector = ""; /** - * MonitoredResource labels. - * @member {Object.} labels - * @memberof google.api.MonitoredResource + * MetricRule metricCosts. + * @member {Object.} metricCosts + * @memberof google.api.MetricRule * @instance */ - MonitoredResource.prototype.labels = $util.emptyObject; + MetricRule.prototype.metricCosts = $util.emptyObject; /** - * Creates a new MonitoredResource instance using the specified properties. + * Creates a new MetricRule instance using the specified properties. * @function create - * @memberof google.api.MonitoredResource + * @memberof google.api.MetricRule * @static - * @param {google.api.IMonitoredResource=} [properties] Properties to set - * @returns {google.api.MonitoredResource} MonitoredResource instance + * @param {google.api.IMetricRule=} [properties] Properties to set + * @returns {google.api.MetricRule} MetricRule instance */ - MonitoredResource.create = function create(properties) { - return new MonitoredResource(properties); + MetricRule.create = function create(properties) { + return new MetricRule(properties); }; /** - * Encodes the specified MonitoredResource message. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified MetricRule message. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResource + * @memberof google.api.MetricRule * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.api.IMetricRule} message MetricRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encode = function encode(message, writer) { + MetricRule.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.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), 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.labels[keys[i]]).ldelim(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.metricCosts != null && Object.hasOwnProperty.call(message, "metricCosts")) + for (var keys = Object.keys(message.metricCosts), 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 0 =*/16).int64(message.metricCosts[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified MonitoredResource message, length delimited. Does not implicitly {@link google.api.MonitoredResource.verify|verify} messages. + * Encodes the specified MetricRule message, length delimited. Does not implicitly {@link google.api.MetricRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.MetricRule * @static - * @param {google.api.IMonitoredResource} message MonitoredResource message or plain object to encode + * @param {google.api.IMetricRule} message MetricRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResource.encodeDelimited = function encodeDelimited(message, writer) { + MetricRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoredResource message from the specified reader or buffer. + * Decodes a MetricRule message from the specified reader or buffer. * @function decode - * @memberof google.api.MonitoredResource + * @memberof google.api.MetricRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.MetricRule} MetricRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decode = function decode(reader, length) { + MetricRule.decode = function 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.MonitoredResource(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricRule(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.selector = reader.string(); break; case 2: - if (message.labels === $util.emptyObject) - message.labels = {}; + if (message.metricCosts === $util.emptyObject) + message.metricCosts = {}; var end2 = reader.uint32() + reader.pos; key = ""; - value = ""; + value = 0; while (reader.pos < end2) { var tag2 = reader.uint32(); switch (tag2 >>> 3) { @@ -18762,14 +19006,14 @@ key = reader.string(); break; case 2: - value = reader.string(); + value = reader.int64(); break; default: reader.skipType(tag2 & 7); break; } } - message.labels[key] = value; + message.metricCosts[key] = value; break; default: reader.skipType(tag & 7); @@ -18780,132 +19024,150 @@ }; /** - * Decodes a MonitoredResource message from the specified reader or buffer, length delimited. + * Decodes a MetricRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResource + * @memberof google.api.MetricRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.MetricRule} MetricRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResource.decodeDelimited = function decodeDelimited(reader) { + MetricRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResource message. + * Verifies a MetricRule message. * @function verify - * @memberof google.api.MonitoredResource + * @memberof google.api.MetricRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResource.verify = function verify(message) { + MetricRule.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.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.metricCosts != null && message.hasOwnProperty("metricCosts")) { + if (!$util.isObject(message.metricCosts)) + return "metricCosts: object expected"; + var key = Object.keys(message.metricCosts); for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (!$util.isInteger(message.metricCosts[key[i]]) && !(message.metricCosts[key[i]] && $util.isInteger(message.metricCosts[key[i]].low) && $util.isInteger(message.metricCosts[key[i]].high))) + return "metricCosts: integer|Long{k:string} expected"; } return null; }; /** - * Creates a MonitoredResource message from a plain object. Also converts values to their respective internal types. + * Creates a MetricRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResource + * @memberof google.api.MetricRule * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResource} MonitoredResource + * @returns {google.api.MetricRule} MetricRule */ - MonitoredResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResource) + MetricRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricRule) return object; - var message = new $root.google.api.MonitoredResource(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.MonitoredResource.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]]); + var message = new $root.google.api.MetricRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.metricCosts) { + if (typeof object.metricCosts !== "object") + throw TypeError(".google.api.MetricRule.metricCosts: object expected"); + message.metricCosts = {}; + for (var keys = Object.keys(object.metricCosts), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.metricCosts[keys[i]] = $util.Long.fromValue(object.metricCosts[keys[i]])).unsigned = false; + else if (typeof object.metricCosts[keys[i]] === "string") + message.metricCosts[keys[i]] = parseInt(object.metricCosts[keys[i]], 10); + else if (typeof object.metricCosts[keys[i]] === "number") + message.metricCosts[keys[i]] = object.metricCosts[keys[i]]; + else if (typeof object.metricCosts[keys[i]] === "object") + message.metricCosts[keys[i]] = new $util.LongBits(object.metricCosts[keys[i]].low >>> 0, object.metricCosts[keys[i]].high >>> 0).toNumber(); } return message; }; /** - * Creates a plain object from a MonitoredResource message. Also converts values to other types if specified. + * Creates a plain object from a MetricRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResource + * @memberof google.api.MetricRule * @static - * @param {google.api.MonitoredResource} message MonitoredResource + * @param {google.api.MetricRule} message MetricRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResource.toObject = function toObject(message, options) { + MetricRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.objects || options.defaults) - object.labels = {}; + object.metricCosts = {}; if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; + object.selector = ""; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; + if (message.metricCosts && (keys2 = Object.keys(message.metricCosts)).length) { + object.metricCosts = {}; for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (typeof message.metricCosts[keys2[j]] === "number") + object.metricCosts[keys2[j]] = options.longs === String ? String(message.metricCosts[keys2[j]]) : message.metricCosts[keys2[j]]; + else + object.metricCosts[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.metricCosts[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.metricCosts[keys2[j]].low >>> 0, message.metricCosts[keys2[j]].high >>> 0).toNumber() : message.metricCosts[keys2[j]]; } return object; }; /** - * Converts this MonitoredResource to JSON. + * Converts this MetricRule to JSON. * @function toJSON - * @memberof google.api.MonitoredResource + * @memberof google.api.MetricRule * @instance * @returns {Object.} JSON object */ - MonitoredResource.prototype.toJSON = function toJSON() { + MetricRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonitoredResource; + return MetricRule; })(); - api.MonitoredResourceMetadata = (function() { + api.QuotaLimit = (function() { /** - * Properties of a MonitoredResourceMetadata. + * Properties of a QuotaLimit. * @memberof google.api - * @interface IMonitoredResourceMetadata - * @property {google.protobuf.IStruct|null} [systemLabels] MonitoredResourceMetadata systemLabels - * @property {Object.|null} [userLabels] MonitoredResourceMetadata userLabels + * @interface IQuotaLimit + * @property {string|null} [name] QuotaLimit name + * @property {string|null} [description] QuotaLimit description + * @property {number|Long|null} [defaultLimit] QuotaLimit defaultLimit + * @property {number|Long|null} [maxLimit] QuotaLimit maxLimit + * @property {number|Long|null} [freeTier] QuotaLimit freeTier + * @property {string|null} [duration] QuotaLimit duration + * @property {string|null} [metric] QuotaLimit metric + * @property {string|null} [unit] QuotaLimit unit + * @property {Object.|null} [values] QuotaLimit values + * @property {string|null} [displayName] QuotaLimit displayName */ /** - * Constructs a new MonitoredResourceMetadata. + * Constructs a new QuotaLimit. * @memberof google.api - * @classdesc Represents a MonitoredResourceMetadata. - * @implements IMonitoredResourceMetadata + * @classdesc Represents a QuotaLimit. + * @implements IQuotaLimit * @constructor - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set + * @param {google.api.IQuotaLimit=} [properties] Properties to set */ - function MonitoredResourceMetadata(properties) { - this.userLabels = {}; + function QuotaLimit(properties) { + this.values = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18913,93 +19175,194 @@ } /** - * MonitoredResourceMetadata systemLabels. - * @member {google.protobuf.IStruct|null|undefined} systemLabels - * @memberof google.api.MonitoredResourceMetadata + * QuotaLimit name. + * @member {string} name + * @memberof google.api.QuotaLimit * @instance */ - MonitoredResourceMetadata.prototype.systemLabels = null; + QuotaLimit.prototype.name = ""; /** - * MonitoredResourceMetadata userLabels. - * @member {Object.} userLabels - * @memberof google.api.MonitoredResourceMetadata + * QuotaLimit description. + * @member {string} description + * @memberof google.api.QuotaLimit * @instance */ - MonitoredResourceMetadata.prototype.userLabels = $util.emptyObject; + QuotaLimit.prototype.description = ""; /** - * Creates a new MonitoredResourceMetadata instance using the specified properties. + * QuotaLimit defaultLimit. + * @member {number|Long} defaultLimit + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.defaultLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QuotaLimit maxLimit. + * @member {number|Long} maxLimit + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.maxLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QuotaLimit freeTier. + * @member {number|Long} freeTier + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.freeTier = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QuotaLimit duration. + * @member {string} duration + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.duration = ""; + + /** + * QuotaLimit metric. + * @member {string} metric + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.metric = ""; + + /** + * QuotaLimit unit. + * @member {string} unit + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.unit = ""; + + /** + * QuotaLimit values. + * @member {Object.} values + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.values = $util.emptyObject; + + /** + * QuotaLimit displayName. + * @member {string} displayName + * @memberof google.api.QuotaLimit + * @instance + */ + QuotaLimit.prototype.displayName = ""; + + /** + * Creates a new QuotaLimit instance using the specified properties. * @function create - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.QuotaLimit * @static - * @param {google.api.IMonitoredResourceMetadata=} [properties] Properties to set - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata instance + * @param {google.api.IQuotaLimit=} [properties] Properties to set + * @returns {google.api.QuotaLimit} QuotaLimit instance */ - MonitoredResourceMetadata.create = function create(properties) { - return new MonitoredResourceMetadata(properties); + QuotaLimit.create = function create(properties) { + return new QuotaLimit(properties); }; /** - * Encodes the specified MonitoredResourceMetadata message. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. + * Encodes the specified QuotaLimit message. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. * @function encode - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.QuotaLimit * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode + * @param {google.api.IQuotaLimit} message QuotaLimit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoredResourceMetadata.encode = function encode(message, writer) { + QuotaLimit.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.systemLabels != null && Object.hasOwnProperty.call(message, "systemLabels")) - $root.google.protobuf.Struct.encode(message.systemLabels, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) - for (var keys = Object.keys(message.userLabels), 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.userLabels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified MonitoredResourceMetadata message, length delimited. Does not implicitly {@link google.api.MonitoredResourceMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MonitoredResourceMetadata - * @static - * @param {google.api.IMonitoredResourceMetadata} message MonitoredResourceMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoredResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.api.MonitoredResourceMetadata + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.defaultLimit != null && Object.hasOwnProperty.call(message, "defaultLimit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.defaultLimit); + if (message.maxLimit != null && Object.hasOwnProperty.call(message, "maxLimit")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.maxLimit); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.duration); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.freeTier != null && Object.hasOwnProperty.call(message, "freeTier")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.freeTier); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.metric); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.unit); + if (message.values != null && Object.hasOwnProperty.call(message, "values")) + for (var keys = Object.keys(message.values), 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 0 =*/16).int64(message.values[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified QuotaLimit message, length delimited. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.QuotaLimit + * @static + * @param {google.api.IQuotaLimit} message QuotaLimit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaLimit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuotaLimit message from the specified reader or buffer. + * @function decode + * @memberof google.api.QuotaLimit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.QuotaLimit} QuotaLimit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decode = function decode(reader, length) { + QuotaLimit.decode = function 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.MonitoredResourceMetadata(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.QuotaLimit(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + case 6: + message.name = reader.string(); break; case 2: - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; + message.description = reader.string(); + break; + case 3: + message.defaultLimit = reader.int64(); + break; + case 4: + message.maxLimit = reader.int64(); + break; + case 7: + message.freeTier = reader.int64(); + break; + case 5: + message.duration = reader.string(); + break; + case 8: + message.metric = reader.string(); + break; + case 9: + message.unit = reader.string(); + break; + case 10: + if (message.values === $util.emptyObject) + message.values = {}; var end2 = reader.uint32() + reader.pos; key = ""; - value = ""; + value = 0; while (reader.pos < end2) { var tag2 = reader.uint32(); switch (tag2 >>> 3) { @@ -19007,14 +19370,17 @@ key = reader.string(); break; case 2: - value = reader.string(); + value = reader.int64(); break; default: reader.skipType(tag2 & 7); break; } } - message.userLabels[key] = value; + message.values[key] = value; + break; + case 12: + message.displayName = reader.string(); break; default: reader.skipType(tag & 7); @@ -19025,593 +19391,227 @@ }; /** - * Decodes a MonitoredResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a QuotaLimit message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.QuotaLimit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.QuotaLimit} QuotaLimit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoredResourceMetadata.decodeDelimited = function decodeDelimited(reader) { + QuotaLimit.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoredResourceMetadata message. + * Verifies a QuotaLimit message. * @function verify - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.QuotaLimit * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoredResourceMetadata.verify = function verify(message) { + QuotaLimit.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) { - var error = $root.google.protobuf.Struct.verify(message.systemLabels); - if (error) - return "systemLabels." + error; - } - if (message.userLabels != null && message.hasOwnProperty("userLabels")) { - if (!$util.isObject(message.userLabels)) - return "userLabels: object expected"; - var key = Object.keys(message.userLabels); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.defaultLimit != null && message.hasOwnProperty("defaultLimit")) + if (!$util.isInteger(message.defaultLimit) && !(message.defaultLimit && $util.isInteger(message.defaultLimit.low) && $util.isInteger(message.defaultLimit.high))) + return "defaultLimit: integer|Long expected"; + if (message.maxLimit != null && message.hasOwnProperty("maxLimit")) + if (!$util.isInteger(message.maxLimit) && !(message.maxLimit && $util.isInteger(message.maxLimit.low) && $util.isInteger(message.maxLimit.high))) + return "maxLimit: integer|Long expected"; + if (message.freeTier != null && message.hasOwnProperty("freeTier")) + if (!$util.isInteger(message.freeTier) && !(message.freeTier && $util.isInteger(message.freeTier.low) && $util.isInteger(message.freeTier.high))) + return "freeTier: integer|Long expected"; + if (message.duration != null && message.hasOwnProperty("duration")) + if (!$util.isString(message.duration)) + return "duration: string expected"; + if (message.metric != null && message.hasOwnProperty("metric")) + if (!$util.isString(message.metric)) + return "metric: string expected"; + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!$util.isObject(message.values)) + return "values: object expected"; + var key = Object.keys(message.values); for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.userLabels[key[i]])) - return "userLabels: string{k:string} expected"; + if (!$util.isInteger(message.values[key[i]]) && !(message.values[key[i]] && $util.isInteger(message.values[key[i]].low) && $util.isInteger(message.values[key[i]].high))) + return "values: integer|Long{k:string} expected"; } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a MonitoredResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a QuotaLimit message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.QuotaLimit * @static * @param {Object.} object Plain object - * @returns {google.api.MonitoredResourceMetadata} MonitoredResourceMetadata + * @returns {google.api.QuotaLimit} QuotaLimit */ - MonitoredResourceMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MonitoredResourceMetadata) + QuotaLimit.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.QuotaLimit) return object; - var message = new $root.google.api.MonitoredResourceMetadata(); - if (object.systemLabels != null) { - if (typeof object.systemLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.systemLabels: object expected"); - message.systemLabels = $root.google.protobuf.Struct.fromObject(object.systemLabels); - } - if (object.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.api.MonitoredResourceMetadata.userLabels: object expected"); - message.userLabels = {}; - for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) - message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + var message = new $root.google.api.QuotaLimit(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.defaultLimit != null) + if ($util.Long) + (message.defaultLimit = $util.Long.fromValue(object.defaultLimit)).unsigned = false; + else if (typeof object.defaultLimit === "string") + message.defaultLimit = parseInt(object.defaultLimit, 10); + else if (typeof object.defaultLimit === "number") + message.defaultLimit = object.defaultLimit; + else if (typeof object.defaultLimit === "object") + message.defaultLimit = new $util.LongBits(object.defaultLimit.low >>> 0, object.defaultLimit.high >>> 0).toNumber(); + if (object.maxLimit != null) + if ($util.Long) + (message.maxLimit = $util.Long.fromValue(object.maxLimit)).unsigned = false; + else if (typeof object.maxLimit === "string") + message.maxLimit = parseInt(object.maxLimit, 10); + else if (typeof object.maxLimit === "number") + message.maxLimit = object.maxLimit; + else if (typeof object.maxLimit === "object") + message.maxLimit = new $util.LongBits(object.maxLimit.low >>> 0, object.maxLimit.high >>> 0).toNumber(); + if (object.freeTier != null) + if ($util.Long) + (message.freeTier = $util.Long.fromValue(object.freeTier)).unsigned = false; + else if (typeof object.freeTier === "string") + message.freeTier = parseInt(object.freeTier, 10); + else if (typeof object.freeTier === "number") + message.freeTier = object.freeTier; + else if (typeof object.freeTier === "object") + message.freeTier = new $util.LongBits(object.freeTier.low >>> 0, object.freeTier.high >>> 0).toNumber(); + if (object.duration != null) + message.duration = String(object.duration); + if (object.metric != null) + message.metric = String(object.metric); + if (object.unit != null) + message.unit = String(object.unit); + if (object.values) { + if (typeof object.values !== "object") + throw TypeError(".google.api.QuotaLimit.values: object expected"); + message.values = {}; + for (var keys = Object.keys(object.values), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.values[keys[i]] = $util.Long.fromValue(object.values[keys[i]])).unsigned = false; + else if (typeof object.values[keys[i]] === "string") + message.values[keys[i]] = parseInt(object.values[keys[i]], 10); + else if (typeof object.values[keys[i]] === "number") + message.values[keys[i]] = object.values[keys[i]]; + else if (typeof object.values[keys[i]] === "object") + message.values[keys[i]] = new $util.LongBits(object.values[keys[i]].low >>> 0, object.values[keys[i]].high >>> 0).toNumber(); } + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a MonitoredResourceMetadata message. Also converts values to other types if specified. + * Creates a plain object from a QuotaLimit message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MonitoredResourceMetadata + * @memberof google.api.QuotaLimit * @static - * @param {google.api.MonitoredResourceMetadata} message MonitoredResourceMetadata + * @param {google.api.QuotaLimit} message QuotaLimit * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoredResourceMetadata.toObject = function toObject(message, options) { + QuotaLimit.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.objects || options.defaults) - object.userLabels = {}; - if (options.defaults) - object.systemLabels = null; - if (message.systemLabels != null && message.hasOwnProperty("systemLabels")) - object.systemLabels = $root.google.protobuf.Struct.toObject(message.systemLabels, options); - var keys2; - if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { - object.userLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; - } - return object; - }; - - /** - * Converts this MonitoredResourceMetadata to JSON. - * @function toJSON - * @memberof google.api.MonitoredResourceMetadata - * @instance - * @returns {Object.} JSON object - */ - MonitoredResourceMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MonitoredResourceMetadata; - })(); - - api.Monitoring = (function() { - - /** - * Properties of a Monitoring. - * @memberof google.api - * @interface IMonitoring - * @property {Array.|null} [producerDestinations] Monitoring producerDestinations - * @property {Array.|null} [consumerDestinations] Monitoring consumerDestinations - */ - - /** - * Constructs a new Monitoring. - * @memberof google.api - * @classdesc Represents a Monitoring. - * @implements IMonitoring - * @constructor - * @param {google.api.IMonitoring=} [properties] Properties to set - */ - function Monitoring(properties) { - this.producerDestinations = []; - this.consumerDestinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Monitoring producerDestinations. - * @member {Array.} producerDestinations - * @memberof google.api.Monitoring - * @instance - */ - Monitoring.prototype.producerDestinations = $util.emptyArray; - - /** - * Monitoring consumerDestinations. - * @member {Array.} consumerDestinations - * @memberof google.api.Monitoring - * @instance - */ - Monitoring.prototype.consumerDestinations = $util.emptyArray; - - /** - * Creates a new Monitoring instance using the specified properties. - * @function create - * @memberof google.api.Monitoring - * @static - * @param {google.api.IMonitoring=} [properties] Properties to set - * @returns {google.api.Monitoring} Monitoring instance - */ - Monitoring.create = function create(properties) { - return new Monitoring(properties); - }; - - /** - * Encodes the specified Monitoring message. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. - * @function encode - * @memberof google.api.Monitoring - * @static - * @param {google.api.IMonitoring} message Monitoring message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Monitoring.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.producerDestinations != null && message.producerDestinations.length) - for (var i = 0; i < message.producerDestinations.length; ++i) - $root.google.api.Monitoring.MonitoringDestination.encode(message.producerDestinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.consumerDestinations != null && message.consumerDestinations.length) - for (var i = 0; i < message.consumerDestinations.length; ++i) - $root.google.api.Monitoring.MonitoringDestination.encode(message.consumerDestinations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Monitoring message, length delimited. Does not implicitly {@link google.api.Monitoring.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Monitoring - * @static - * @param {google.api.IMonitoring} message Monitoring message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Monitoring.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Monitoring message from the specified reader or buffer. - * @function decode - * @memberof google.api.Monitoring - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Monitoring} Monitoring - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Monitoring.decode = function 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.Monitoring(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.producerDestinations && message.producerDestinations.length)) - message.producerDestinations = []; - message.producerDestinations.push($root.google.api.Monitoring.MonitoringDestination.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.consumerDestinations && message.consumerDestinations.length)) - message.consumerDestinations = []; - message.consumerDestinations.push($root.google.api.Monitoring.MonitoringDestination.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Monitoring message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Monitoring - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Monitoring} Monitoring - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Monitoring.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Monitoring message. - * @function verify - * @memberof google.api.Monitoring - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Monitoring.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.producerDestinations != null && message.hasOwnProperty("producerDestinations")) { - if (!Array.isArray(message.producerDestinations)) - return "producerDestinations: array expected"; - for (var i = 0; i < message.producerDestinations.length; ++i) { - var error = $root.google.api.Monitoring.MonitoringDestination.verify(message.producerDestinations[i]); - if (error) - return "producerDestinations." + error; - } - } - if (message.consumerDestinations != null && message.hasOwnProperty("consumerDestinations")) { - if (!Array.isArray(message.consumerDestinations)) - return "consumerDestinations: array expected"; - for (var i = 0; i < message.consumerDestinations.length; ++i) { - var error = $root.google.api.Monitoring.MonitoringDestination.verify(message.consumerDestinations[i]); - if (error) - return "consumerDestinations." + error; - } - } - return null; - }; - - /** - * Creates a Monitoring message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Monitoring - * @static - * @param {Object.} object Plain object - * @returns {google.api.Monitoring} Monitoring - */ - Monitoring.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Monitoring) - return object; - var message = new $root.google.api.Monitoring(); - if (object.producerDestinations) { - if (!Array.isArray(object.producerDestinations)) - throw TypeError(".google.api.Monitoring.producerDestinations: array expected"); - message.producerDestinations = []; - for (var i = 0; i < object.producerDestinations.length; ++i) { - if (typeof object.producerDestinations[i] !== "object") - throw TypeError(".google.api.Monitoring.producerDestinations: object expected"); - message.producerDestinations[i] = $root.google.api.Monitoring.MonitoringDestination.fromObject(object.producerDestinations[i]); - } - } - if (object.consumerDestinations) { - if (!Array.isArray(object.consumerDestinations)) - throw TypeError(".google.api.Monitoring.consumerDestinations: array expected"); - message.consumerDestinations = []; - for (var i = 0; i < object.consumerDestinations.length; ++i) { - if (typeof object.consumerDestinations[i] !== "object") - throw TypeError(".google.api.Monitoring.consumerDestinations: object expected"); - message.consumerDestinations[i] = $root.google.api.Monitoring.MonitoringDestination.fromObject(object.consumerDestinations[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Monitoring message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Monitoring - * @static - * @param {google.api.Monitoring} message Monitoring - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Monitoring.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.producerDestinations = []; - object.consumerDestinations = []; - } - if (message.producerDestinations && message.producerDestinations.length) { - object.producerDestinations = []; - for (var j = 0; j < message.producerDestinations.length; ++j) - object.producerDestinations[j] = $root.google.api.Monitoring.MonitoringDestination.toObject(message.producerDestinations[j], options); - } - if (message.consumerDestinations && message.consumerDestinations.length) { - object.consumerDestinations = []; - for (var j = 0; j < message.consumerDestinations.length; ++j) - object.consumerDestinations[j] = $root.google.api.Monitoring.MonitoringDestination.toObject(message.consumerDestinations[j], options); - } - return object; - }; - - /** - * Converts this Monitoring to JSON. - * @function toJSON - * @memberof google.api.Monitoring - * @instance - * @returns {Object.} JSON object - */ - Monitoring.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Monitoring.MonitoringDestination = (function() { - - /** - * Properties of a MonitoringDestination. - * @memberof google.api.Monitoring - * @interface IMonitoringDestination - * @property {string|null} [monitoredResource] MonitoringDestination monitoredResource - * @property {Array.|null} [metrics] MonitoringDestination metrics - */ - - /** - * Constructs a new MonitoringDestination. - * @memberof google.api.Monitoring - * @classdesc Represents a MonitoringDestination. - * @implements IMonitoringDestination - * @constructor - * @param {google.api.Monitoring.IMonitoringDestination=} [properties] Properties to set - */ - function MonitoringDestination(properties) { - this.metrics = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MonitoringDestination monitoredResource. - * @member {string} monitoredResource - * @memberof google.api.Monitoring.MonitoringDestination - * @instance - */ - MonitoringDestination.prototype.monitoredResource = ""; - - /** - * MonitoringDestination metrics. - * @member {Array.} metrics - * @memberof google.api.Monitoring.MonitoringDestination - * @instance - */ - MonitoringDestination.prototype.metrics = $util.emptyArray; - - /** - * Creates a new MonitoringDestination instance using the specified properties. - * @function create - * @memberof google.api.Monitoring.MonitoringDestination - * @static - * @param {google.api.Monitoring.IMonitoringDestination=} [properties] Properties to set - * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination instance - */ - MonitoringDestination.create = function create(properties) { - return new MonitoringDestination(properties); - }; - - /** - * Encodes the specified MonitoringDestination message. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. - * @function encode - * @memberof google.api.Monitoring.MonitoringDestination - * @static - * @param {google.api.Monitoring.IMonitoringDestination} message MonitoringDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoringDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.monitoredResource); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metrics[i]); - return writer; - }; - - /** - * Encodes the specified MonitoringDestination message, length delimited. Does not implicitly {@link google.api.Monitoring.MonitoringDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Monitoring.MonitoringDestination - * @static - * @param {google.api.Monitoring.IMonitoringDestination} message MonitoringDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonitoringDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MonitoringDestination message from the specified reader or buffer. - * @function decode - * @memberof google.api.Monitoring.MonitoringDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoringDestination.decode = function 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.Monitoring.MonitoringDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.monitoredResource = reader.string(); - break; - case 2: - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MonitoringDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Monitoring.MonitoringDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonitoringDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MonitoringDestination message. - * @function verify - * @memberof google.api.Monitoring.MonitoringDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonitoringDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) - if (!$util.isString(message.monitoredResource)) - return "monitoredResource: string expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) - if (!$util.isString(message.metrics[i])) - return "metrics: string[] expected"; - } - return null; - }; - - /** - * Creates a MonitoringDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Monitoring.MonitoringDestination - * @static - * @param {Object.} object Plain object - * @returns {google.api.Monitoring.MonitoringDestination} MonitoringDestination - */ - MonitoringDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Monitoring.MonitoringDestination) - return object; - var message = new $root.google.api.Monitoring.MonitoringDestination(); - if (object.monitoredResource != null) - message.monitoredResource = String(object.monitoredResource); - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.api.Monitoring.MonitoringDestination.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) - message.metrics[i] = String(object.metrics[i]); - } - return message; - }; - - /** - * Creates a plain object from a MonitoringDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Monitoring.MonitoringDestination - * @static - * @param {google.api.Monitoring.MonitoringDestination} message MonitoringDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonitoringDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.metrics = []; - if (options.defaults) - object.monitoredResource = ""; - if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) - object.monitoredResource = message.monitoredResource; - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = message.metrics[j]; - } - return object; - }; - - /** - * Converts this MonitoringDestination to JSON. - * @function toJSON - * @memberof google.api.Monitoring.MonitoringDestination - * @instance - * @returns {Object.} JSON object - */ - MonitoringDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + object.values = {}; + if (options.defaults) { + object.description = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.defaultLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.defaultLimit = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxLimit = options.longs === String ? "0" : 0; + object.duration = ""; + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.freeTier = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.freeTier = options.longs === String ? "0" : 0; + object.metric = ""; + object.unit = ""; + object.displayName = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.defaultLimit != null && message.hasOwnProperty("defaultLimit")) + if (typeof message.defaultLimit === "number") + object.defaultLimit = options.longs === String ? String(message.defaultLimit) : message.defaultLimit; + else + object.defaultLimit = options.longs === String ? $util.Long.prototype.toString.call(message.defaultLimit) : options.longs === Number ? new $util.LongBits(message.defaultLimit.low >>> 0, message.defaultLimit.high >>> 0).toNumber() : message.defaultLimit; + if (message.maxLimit != null && message.hasOwnProperty("maxLimit")) + if (typeof message.maxLimit === "number") + object.maxLimit = options.longs === String ? String(message.maxLimit) : message.maxLimit; + else + object.maxLimit = options.longs === String ? $util.Long.prototype.toString.call(message.maxLimit) : options.longs === Number ? new $util.LongBits(message.maxLimit.low >>> 0, message.maxLimit.high >>> 0).toNumber() : message.maxLimit; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = message.duration; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.freeTier != null && message.hasOwnProperty("freeTier")) + if (typeof message.freeTier === "number") + object.freeTier = options.longs === String ? String(message.freeTier) : message.freeTier; + else + object.freeTier = options.longs === String ? $util.Long.prototype.toString.call(message.freeTier) : options.longs === Number ? new $util.LongBits(message.freeTier.low >>> 0, message.freeTier.high >>> 0).toNumber() : message.freeTier; + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = message.metric; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + var keys2; + if (message.values && (keys2 = Object.keys(message.values)).length) { + object.values = {}; + for (var j = 0; j < keys2.length; ++j) + if (typeof message.values[keys2[j]] === "number") + object.values[keys2[j]] = options.longs === String ? String(message.values[keys2[j]]) : message.values[keys2[j]]; + else + object.values[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.values[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.values[keys2[j]].low >>> 0, message.values[keys2[j]].high >>> 0).toNumber() : message.values[keys2[j]]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; - return MonitoringDestination; - })(); + /** + * Converts this QuotaLimit to JSON. + * @function toJSON + * @memberof google.api.QuotaLimit + * @instance + * @returns {Object.} JSON object + */ + QuotaLimit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Monitoring; + return QuotaLimit; })(); api.ResourceDescriptor = (function() { @@ -30348,10 +30348,234 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Annotation; - })(); + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + 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 GeneratedCodeInfo; + return Timestamp; })(); protobuf.Duration = (function() { @@ -36641,230 +36865,6 @@ return FieldMask; })(); - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Timestamp; - })(); - return protobuf; })(); diff --git a/packages/google-api-servicemanagement/protos/protos.json b/packages/google-api-servicemanagement/protos/protos.json index b9b92cd7f55..16a390646f6 100644 --- a/packages/google-api-servicemanagement/protos/protos.json +++ b/packages/google-api-servicemanagement/protos/protos.json @@ -4,9 +4,9 @@ "nested": { "api": { "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "go_package": "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig", "java_multiple_files": true, - "java_outer_classname": "ClientProto", + "java_outer_classname": "UsageProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -956,93 +956,6 @@ } } }, - "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 - } - } - }, "ConfigChange": { "fields": { "element": { @@ -1102,217 +1015,108 @@ "NON_EMPTY_DEFAULT": 7 } }, - "MetricDescriptor": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { "fields": { - "name": { - "type": "string", + "rules": { + "rule": "repeated", + "type": "HttpRule", "id": 1 }, - "type": { + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { "type": "string", - "id": 8 + "id": 1 }, - "labels": { - "rule": "repeated", - "type": "LabelDescriptor", + "get": { + "type": "string", "id": 2 }, - "metricKind": { - "type": "MetricKind", + "put": { + "type": "string", "id": 3 }, - "valueType": { - "type": "ValueType", + "post": { + "type": "string", "id": 4 }, - "unit": { + "delete": { "type": "string", "id": 5 }, - "description": { + "patch": { "type": "string", "id": 6 }, - "displayName": { + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { "type": "string", "id": 7 }, - "metadata": { - "type": "MetricDescriptorMetadata", - "id": 10 - }, - "launchStage": { - "type": "LaunchStage", + "responseBody": { + "type": "string", "id": 12 }, - "monitoredResourceTypes": { + "additionalBindings": { "rule": "repeated", - "type": "string", - "id": 13 - } - }, - "nested": { - "MetricDescriptorMetadata": { - "fields": { - "launchStage": { - "type": "LaunchStage", - "id": 1, - "options": { - "deprecated": true - } - }, - "samplePeriod": { - "type": "google.protobuf.Duration", - "id": 2 - }, - "ingestDelay": { - "type": "google.protobuf.Duration", - "id": 3 - } - } - }, - "MetricKind": { - "values": { - "METRIC_KIND_UNSPECIFIED": 0, - "GAUGE": 1, - "DELTA": 2, - "CUMULATIVE": 3 - } - }, - "ValueType": { - "values": { - "VALUE_TYPE_UNSPECIFIED": 0, - "BOOL": 1, - "INT64": 2, - "DOUBLE": 3, - "STRING": 4, - "DISTRIBUTION": 5, - "MONEY": 6 - } - } - } - }, - "Metric": { - "fields": { - "type": { - "type": "string", - "id": 3 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 2 + "type": "HttpRule", + "id": 11 } } }, - "LabelDescriptor": { + "CustomHttpPattern": { "fields": { - "key": { + "kind": { "type": "string", "id": 1 }, - "valueType": { - "type": "ValueType", - "id": 2 - }, - "description": { + "path": { "type": "string", - "id": 3 - } - }, - "nested": { - "ValueType": { - "values": { - "STRING": 0, - "BOOL": 1, - "INT64": 2 - } + "id": 2 } } }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "Quota": { - "fields": { - "limits": { - "rule": "repeated", - "type": "QuotaLimit", - "id": 3 - }, - "metricRules": { - "rule": "repeated", - "type": "MetricRule", - "id": 4 - } - } + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" }, - "MetricRule": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "metricCosts": { - "keyType": "string", - "type": "int64", - "id": 2 - } - } + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" }, - "QuotaLimit": { - "fields": { - "name": { - "type": "string", - "id": 6 - }, - "description": { - "type": "string", - "id": 2 - }, - "defaultLimit": { - "type": "int64", - "id": 3 - }, - "maxLimit": { - "type": "int64", - "id": 4 - }, - "freeTier": { - "type": "int64", - "id": 7 - }, - "duration": { - "type": "string", - "id": 5 - }, - "metric": { - "type": "string", - "id": 8 - }, - "unit": { - "type": "string", - "id": 9 - }, - "values": { - "keyType": "string", - "type": "int64", - "id": 10 - }, - "displayName": { - "type": "string", - "id": 12 - } - } + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" }, "Service": { "fields": { @@ -1626,6 +1430,146 @@ } } }, + "MetricDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "string", + "id": 8 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 2 + }, + "metricKind": { + "type": "MetricKind", + "id": 3 + }, + "valueType": { + "type": "ValueType", + "id": 4 + }, + "unit": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 7 + }, + "metadata": { + "type": "MetricDescriptorMetadata", + "id": 10 + }, + "launchStage": { + "type": "LaunchStage", + "id": 12 + }, + "monitoredResourceTypes": { + "rule": "repeated", + "type": "string", + "id": 13 + } + }, + "nested": { + "MetricDescriptorMetadata": { + "fields": { + "launchStage": { + "type": "LaunchStage", + "id": 1, + "options": { + "deprecated": true + } + }, + "samplePeriod": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "ingestDelay": { + "type": "google.protobuf.Duration", + "id": 3 + } + } + }, + "MetricKind": { + "values": { + "METRIC_KIND_UNSPECIFIED": 0, + "GAUGE": 1, + "DELTA": 2, + "CUMULATIVE": 3 + } + }, + "ValueType": { + "values": { + "VALUE_TYPE_UNSPECIFIED": 0, + "BOOL": 1, + "INT64": 2, + "DOUBLE": 3, + "STRING": 4, + "DISTRIBUTION": 5, + "MONEY": 6 + } + } + } + }, + "Metric": { + "fields": { + "type": { + "type": "string", + "id": 3 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "LabelDescriptor": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "valueType": { + "type": "ValueType", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + }, + "nested": { + "ValueType": { + "values": { + "STRING": 0, + "BOOL": 1, + "INT64": 2 + } + } + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, "Context": { "fields": { "rules": { @@ -1892,6 +1836,78 @@ } } }, + "Quota": { + "fields": { + "limits": { + "rule": "repeated", + "type": "QuotaLimit", + "id": 3 + }, + "metricRules": { + "rule": "repeated", + "type": "MetricRule", + "id": 4 + } + } + }, + "MetricRule": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "metricCosts": { + "keyType": "string", + "type": "int64", + "id": 2 + } + } + }, + "QuotaLimit": { + "fields": { + "name": { + "type": "string", + "id": 6 + }, + "description": { + "type": "string", + "id": 2 + }, + "defaultLimit": { + "type": "int64", + "id": 3 + }, + "maxLimit": { + "type": "int64", + "id": 4 + }, + "freeTier": { + "type": "int64", + "id": 7 + }, + "duration": { + "type": "string", + "id": 5 + }, + "metric": { + "type": "string", + "id": 8 + }, + "unit": { + "type": "string", + "id": 9 + }, + "values": { + "keyType": "string", + "type": "int64", + "id": 10 + }, + "displayName": { + "type": "string", + "id": 12 + } + } + }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -2049,22 +2065,6 @@ "id": 3 } } - }, - "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" } } }, @@ -2976,6 +2976,18 @@ } } }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, "Duration": { "fields": { "seconds": { @@ -3404,18 +3416,6 @@ "id": 1 } } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } } } }, From 8325a83d34ee66b66e2f48d72b4a1266509280a1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 15 Feb 2022 10:13:31 -0800 Subject: [PATCH 53/85] feat!: Remove EnableService and DisableService RPC methods and related protos from service management API (#116) * fix!: Remove EnableService and DisableService RPC methods and related protos from service management API BREAKING CHANGE: Remove EnableService and DisableService RPC methods. These backend methods were disabled long ago Co-authored-by: Owl Bot --- .../api/servicemanagement/v1/resources.proto | 5 +- .../servicemanagement/v1/servicemanager.proto | 124 +- .../protos/protos.d.ts | 492 -------- .../protos/protos.js | 1009 ----------------- .../protos/protos.json | 115 -- .../service_manager.create_service_config.js | 2 +- .../service_manager.create_service_rollout.js | 2 +- .../v1/service_manager.delete_service.js | 2 +- .../v1/service_manager.get_service_config.js | 2 +- .../v1/service_manager.get_service_rollout.js | 2 +- .../service_manager.list_service_configs.js | 2 +- .../service_manager.list_service_rollouts.js | 2 +- .../service_manager.submit_config_source.js | 2 +- .../v1/service_manager.undelete_service.js | 2 +- .../src/v1/gapic_metadata.json | 20 - .../src/v1/service_manager_client.ts | 406 +------ .../src/v1/service_manager_client_config.json | 10 - .../test/gapic_service_manager_v1.ts | 412 ------- 18 files changed, 60 insertions(+), 2551 deletions(-) diff --git a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto index 26fc67564b9..f18fd187805 100644 --- a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto +++ b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT 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"; @@ -33,7 +32,7 @@ option ruby_package = "Google::Cloud::ServiceManagement::V1"; // The full representation of a Service that is managed by // Google Service Management. message ManagedService { - // The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + // The name of the service. See the [overview](/service-management/overview) // for naming requirements. string service_name = 2; diff --git a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto index c12f7748b30..aea0d1a9dad 100644 --- a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto +++ b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,8 +23,6 @@ import "google/api/service.proto"; import "google/api/servicemanagement/v1/resources.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/any.proto"; -import "google/protobuf/field_mask.proto"; -import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.ServiceManagement.V1"; option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement"; @@ -35,7 +33,7 @@ option objc_class_prefix = "GASM"; option php_namespace = "Google\\Cloud\\ServiceManagement\\V1"; option ruby_package = "Google::Cloud::ServiceManagement::V1"; -// [Google Service Management API](https://cloud.google.com/service-management/overview) +// [Google Service Management API](/service-management/overview) service ServiceManager { option (google.api.default_host) = "servicemanagement.googleapis.com"; option (google.api.oauth_scopes) = @@ -49,10 +47,6 @@ service ServiceManager { // Returns all public services. For authenticated users, also returns all // services the calling user has "servicemanagement.services.get" permission // for. - // - // **BETA:** If the caller specifies the `consumer_id`, it returns only the - // services enabled on the consumer. The `consumer_id` must have the format - // of "project:{PROJECT-ID}". rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { option (google.api.http) = { get: "/v1/services" @@ -70,7 +64,14 @@ service ServiceManager { } // Creates a new managed service. - // Please note one producer project can own no more than 20 services. + // + // A managed service is immutable, and is subject to mandatory 30-day + // data retention. You cannot move a service or recreate it within 30 days + // after deletion. + // + // One producer project can own no more than 500 services. For security and + // reliability purposes, a production service should be hosted in a + // dedicated producer project. // // Operation rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) { @@ -241,43 +242,6 @@ service ServiceManager { }; option (google.api.method_signature) = "new_config,old_config"; } - - // Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used - // for the project. See - // [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for - // more information. - // - // Operation - rpc EnableService(EnableServiceRequest) returns (google.longrunning.Operation) { - option deprecated = true; - option (google.api.http) = { - post: "/v1/services/{service_name}:enable" - body: "*" - }; - option (google.api.method_signature) = "service_name,consumer_id"; - option (google.longrunning.operation_info) = { - response_type: "google.api.servicemanagement.v1.EnableServiceResponse" - metadata_type: "google.api.servicemanagement.v1.OperationMetadata" - }; - } - - // Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be - // be used for the project. It prevents accidental usage that may cause - // unexpected billing charges or security leaks. - // - // Operation - rpc DisableService(DisableServiceRequest) returns (google.longrunning.Operation) { - option deprecated = true; - option (google.api.http) = { - post: "/v1/services/{service_name}:disable" - body: "*" - }; - option (google.api.method_signature) = "service_name,consumer_id"; - option (google.longrunning.operation_info) = { - response_type: "google.api.servicemanagement.v1.DisableServiceResponse" - metadata_type: "google.api.servicemanagement.v1.OperationMetadata" - }; - } } // Request message for `ListServices` method. @@ -325,14 +289,14 @@ message CreateServiceRequest { // Request message for DeleteService method. message DeleteServiceRequest { - // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for UndeleteService method. message UndeleteServiceRequest { - // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -356,7 +320,7 @@ message GetServiceConfigRequest { FULL = 1; } - // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -373,7 +337,7 @@ message GetServiceConfigRequest { // Request message for ListServiceConfigs method. message ListServiceConfigsRequest { - // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -396,7 +360,7 @@ message ListServiceConfigsResponse { // Request message for CreateServiceConfig method. message CreateServiceConfigRequest { - // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -406,7 +370,7 @@ message CreateServiceConfigRequest { // Request message for SubmitConfigSource method. message SubmitConfigSourceRequest { - // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -427,7 +391,7 @@ message SubmitConfigSourceResponse { // Request message for 'CreateServiceRollout' message CreateServiceRolloutRequest { - // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -437,7 +401,7 @@ message CreateServiceRolloutRequest { // Request message for 'ListServiceRollouts' message ListServiceRolloutsRequest { - // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -451,10 +415,10 @@ message ListServiceRolloutsRequest { // Required. Use `filter` to return subset of rollouts. // The following filters are supported: // -- To limit the results to only those in - // status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + // [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', // use filter='status=SUCCESS' // -- To limit the results to those in - // status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + // [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' // or 'FAILED', use filter='status=CANCELLED OR status=FAILED' string filter = 4 [(google.api.field_behavior) = REQUIRED]; } @@ -470,7 +434,7 @@ message ListServiceRolloutsResponse { // Request message for GetServiceRollout method. message GetServiceRolloutRequest { - // Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -478,52 +442,6 @@ message GetServiceRolloutRequest { string rollout_id = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request message for EnableService method. -message EnableServiceRequest { - // Required. Name of the service to enable. Specifying an unknown service name will - // cause the request to fail. - string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The identity of consumer resource which service enablement will be - // applied to. - // - // The Google Service Management implementation accepts the following - // forms: - // - "project:" - // - // Note: this is made compatible with - // google.api.servicecontrol.v1.Operation.consumer_id. - string consumer_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Operation payload for EnableService method. -message EnableServiceResponse { - -} - -// Request message for DisableService method. -message DisableServiceRequest { - // Required. Name of the service to disable. Specifying an unknown service name - // will cause the request to fail. - string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The identity of consumer resource which service disablement will be - // applied to. - // - // The Google Service Management implementation accepts the following - // forms: - // - "project:" - // - // Note: this is made compatible with - // google.api.servicecontrol.v1.Operation.consumer_id. - string consumer_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Operation payload for DisableService method. -message DisableServiceResponse { - -} - // Request message for GenerateConfigReport method. message GenerateConfigReportRequest { // Required. Service configuration for which we want to generate the report. diff --git a/packages/google-api-servicemanagement/protos/protos.d.ts b/packages/google-api-servicemanagement/protos/protos.d.ts index 33f1fabb52a..9ae5927b271 100644 --- a/packages/google-api-servicemanagement/protos/protos.d.ts +++ b/packages/google-api-servicemanagement/protos/protos.d.ts @@ -1359,34 +1359,6 @@ export namespace google { * @returns Promise */ public generateConfigReport(request: google.api.servicemanagement.v1.IGenerateConfigReportRequest): Promise; - - /** - * Calls EnableService. - * @param request EnableServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public enableService(request: google.api.servicemanagement.v1.IEnableServiceRequest, callback: google.api.servicemanagement.v1.ServiceManager.EnableServiceCallback): void; - - /** - * Calls EnableService. - * @param request EnableServiceRequest message or plain object - * @returns Promise - */ - public enableService(request: google.api.servicemanagement.v1.IEnableServiceRequest): Promise; - - /** - * Calls DisableService. - * @param request DisableServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public disableService(request: google.api.servicemanagement.v1.IDisableServiceRequest, callback: google.api.servicemanagement.v1.ServiceManager.DisableServiceCallback): void; - - /** - * Calls DisableService. - * @param request DisableServiceRequest message or plain object - * @returns Promise - */ - public disableService(request: google.api.servicemanagement.v1.IDisableServiceRequest): Promise; } namespace ServiceManager { @@ -1481,20 +1453,6 @@ export namespace google { * @param [response] GenerateConfigReportResponse */ type GenerateConfigReportCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.GenerateConfigReportResponse) => void; - - /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#enableService}. - * @param error Error, if any - * @param [response] Operation - */ - type EnableServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#disableService}. - * @param error Error, if any - * @param [response] Operation - */ - type DisableServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** Properties of a ListServicesRequest. */ @@ -3144,366 +3102,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of an EnableServiceRequest. */ - interface IEnableServiceRequest { - - /** EnableServiceRequest serviceName */ - serviceName?: (string|null); - - /** EnableServiceRequest consumerId */ - consumerId?: (string|null); - } - - /** Represents an EnableServiceRequest. */ - class EnableServiceRequest implements IEnableServiceRequest { - - /** - * Constructs a new EnableServiceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.servicemanagement.v1.IEnableServiceRequest); - - /** EnableServiceRequest serviceName. */ - public serviceName: string; - - /** EnableServiceRequest consumerId. */ - public consumerId: string; - - /** - * Creates a new EnableServiceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns EnableServiceRequest instance - */ - public static create(properties?: google.api.servicemanagement.v1.IEnableServiceRequest): google.api.servicemanagement.v1.EnableServiceRequest; - - /** - * Encodes the specified EnableServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceRequest.verify|verify} messages. - * @param message EnableServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.servicemanagement.v1.IEnableServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnableServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceRequest.verify|verify} messages. - * @param message EnableServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.servicemanagement.v1.IEnableServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnableServiceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnableServiceRequest - * @throws {Error} If the payload is not 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.servicemanagement.v1.EnableServiceRequest; - - /** - * Decodes an EnableServiceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnableServiceRequest - * @throws {Error} If the payload 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.servicemanagement.v1.EnableServiceRequest; - - /** - * Verifies an EnableServiceRequest message. - * @param message Plain 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 EnableServiceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnableServiceRequest - */ - public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.EnableServiceRequest; - - /** - * Creates a plain object from an EnableServiceRequest message. Also converts values to other types if specified. - * @param message EnableServiceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.servicemanagement.v1.EnableServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnableServiceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnableServiceResponse. */ - interface IEnableServiceResponse { - } - - /** Represents an EnableServiceResponse. */ - class EnableServiceResponse implements IEnableServiceResponse { - - /** - * Constructs a new EnableServiceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.servicemanagement.v1.IEnableServiceResponse); - - /** - * Creates a new EnableServiceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns EnableServiceResponse instance - */ - public static create(properties?: google.api.servicemanagement.v1.IEnableServiceResponse): google.api.servicemanagement.v1.EnableServiceResponse; - - /** - * Encodes the specified EnableServiceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceResponse.verify|verify} messages. - * @param message EnableServiceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.servicemanagement.v1.IEnableServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnableServiceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceResponse.verify|verify} messages. - * @param message EnableServiceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.servicemanagement.v1.IEnableServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnableServiceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnableServiceResponse - * @throws {Error} If the payload is not 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.servicemanagement.v1.EnableServiceResponse; - - /** - * Decodes an EnableServiceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnableServiceResponse - * @throws {Error} If the payload 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.servicemanagement.v1.EnableServiceResponse; - - /** - * Verifies an EnableServiceResponse message. - * @param message Plain 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 EnableServiceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnableServiceResponse - */ - public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.EnableServiceResponse; - - /** - * Creates a plain object from an EnableServiceResponse message. Also converts values to other types if specified. - * @param message EnableServiceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.servicemanagement.v1.EnableServiceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnableServiceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DisableServiceRequest. */ - interface IDisableServiceRequest { - - /** DisableServiceRequest serviceName */ - serviceName?: (string|null); - - /** DisableServiceRequest consumerId */ - consumerId?: (string|null); - } - - /** Represents a DisableServiceRequest. */ - class DisableServiceRequest implements IDisableServiceRequest { - - /** - * Constructs a new DisableServiceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.servicemanagement.v1.IDisableServiceRequest); - - /** DisableServiceRequest serviceName. */ - public serviceName: string; - - /** DisableServiceRequest consumerId. */ - public consumerId: string; - - /** - * Creates a new DisableServiceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DisableServiceRequest instance - */ - public static create(properties?: google.api.servicemanagement.v1.IDisableServiceRequest): google.api.servicemanagement.v1.DisableServiceRequest; - - /** - * Encodes the specified DisableServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceRequest.verify|verify} messages. - * @param message DisableServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.servicemanagement.v1.IDisableServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DisableServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceRequest.verify|verify} messages. - * @param message DisableServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.servicemanagement.v1.IDisableServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DisableServiceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DisableServiceRequest - * @throws {Error} If the payload is not 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.servicemanagement.v1.DisableServiceRequest; - - /** - * Decodes a DisableServiceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DisableServiceRequest - * @throws {Error} If the payload 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.servicemanagement.v1.DisableServiceRequest; - - /** - * Verifies a DisableServiceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DisableServiceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DisableServiceRequest - */ - public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.DisableServiceRequest; - - /** - * Creates a plain object from a DisableServiceRequest message. Also converts values to other types if specified. - * @param message DisableServiceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.servicemanagement.v1.DisableServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DisableServiceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DisableServiceResponse. */ - interface IDisableServiceResponse { - } - - /** Represents a DisableServiceResponse. */ - class DisableServiceResponse implements IDisableServiceResponse { - - /** - * Constructs a new DisableServiceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.servicemanagement.v1.IDisableServiceResponse); - - /** - * Creates a new DisableServiceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DisableServiceResponse instance - */ - public static create(properties?: google.api.servicemanagement.v1.IDisableServiceResponse): google.api.servicemanagement.v1.DisableServiceResponse; - - /** - * Encodes the specified DisableServiceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceResponse.verify|verify} messages. - * @param message DisableServiceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.servicemanagement.v1.IDisableServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DisableServiceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceResponse.verify|verify} messages. - * @param message DisableServiceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.servicemanagement.v1.IDisableServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DisableServiceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DisableServiceResponse - * @throws {Error} If the payload is not 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.servicemanagement.v1.DisableServiceResponse; - - /** - * Decodes a DisableServiceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DisableServiceResponse - * @throws {Error} If the payload 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.servicemanagement.v1.DisableServiceResponse; - - /** - * Verifies a DisableServiceResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DisableServiceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DisableServiceResponse - */ - public static fromObject(object: { [k: string]: any }): google.api.servicemanagement.v1.DisableServiceResponse; - - /** - * Creates a plain object from a DisableServiceResponse message. Also converts values to other types if specified. - * @param message DisableServiceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.servicemanagement.v1.DisableServiceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DisableServiceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a GenerateConfigReportRequest. */ interface IGenerateConfigReportRequest { @@ -14414,96 +14012,6 @@ export namespace google { */ 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. */ diff --git a/packages/google-api-servicemanagement/protos/protos.js b/packages/google-api-servicemanagement/protos/protos.js index f2f8b42d168..dc6edba14d8 100644 --- a/packages/google-api-servicemanagement/protos/protos.js +++ b/packages/google-api-servicemanagement/protos/protos.js @@ -3287,72 +3287,6 @@ * @variation 2 */ - /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#enableService}. - * @memberof google.api.servicemanagement.v1.ServiceManager - * @typedef EnableServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls EnableService. - * @function enableService - * @memberof google.api.servicemanagement.v1.ServiceManager - * @instance - * @param {google.api.servicemanagement.v1.IEnableServiceRequest} request EnableServiceRequest message or plain object - * @param {google.api.servicemanagement.v1.ServiceManager.EnableServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ServiceManager.prototype.enableService = function enableService(request, callback) { - return this.rpcCall(enableService, $root.google.api.servicemanagement.v1.EnableServiceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "EnableService" }); - - /** - * Calls EnableService. - * @function enableService - * @memberof google.api.servicemanagement.v1.ServiceManager - * @instance - * @param {google.api.servicemanagement.v1.IEnableServiceRequest} request EnableServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#disableService}. - * @memberof google.api.servicemanagement.v1.ServiceManager - * @typedef DisableServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DisableService. - * @function disableService - * @memberof google.api.servicemanagement.v1.ServiceManager - * @instance - * @param {google.api.servicemanagement.v1.IDisableServiceRequest} request DisableServiceRequest message or plain object - * @param {google.api.servicemanagement.v1.ServiceManager.DisableServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ServiceManager.prototype.disableService = function disableService(request, callback) { - return this.rpcCall(disableService, $root.google.api.servicemanagement.v1.DisableServiceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DisableService" }); - - /** - * Calls DisableService. - * @function disableService - * @memberof google.api.servicemanagement.v1.ServiceManager - * @instance - * @param {google.api.servicemanagement.v1.IDisableServiceRequest} request DisableServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - return ServiceManager; })(); @@ -7062,746 +6996,6 @@ return GetServiceRolloutRequest; })(); - v1.EnableServiceRequest = (function() { - - /** - * Properties of an EnableServiceRequest. - * @memberof google.api.servicemanagement.v1 - * @interface IEnableServiceRequest - * @property {string|null} [serviceName] EnableServiceRequest serviceName - * @property {string|null} [consumerId] EnableServiceRequest consumerId - */ - - /** - * Constructs a new EnableServiceRequest. - * @memberof google.api.servicemanagement.v1 - * @classdesc Represents an EnableServiceRequest. - * @implements IEnableServiceRequest - * @constructor - * @param {google.api.servicemanagement.v1.IEnableServiceRequest=} [properties] Properties to set - */ - function EnableServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnableServiceRequest serviceName. - * @member {string} serviceName - * @memberof google.api.servicemanagement.v1.EnableServiceRequest - * @instance - */ - EnableServiceRequest.prototype.serviceName = ""; - - /** - * EnableServiceRequest consumerId. - * @member {string} consumerId - * @memberof google.api.servicemanagement.v1.EnableServiceRequest - * @instance - */ - EnableServiceRequest.prototype.consumerId = ""; - - /** - * Creates a new EnableServiceRequest instance using the specified properties. - * @function create - * @memberof google.api.servicemanagement.v1.EnableServiceRequest - * @static - * @param {google.api.servicemanagement.v1.IEnableServiceRequest=} [properties] Properties to set - * @returns {google.api.servicemanagement.v1.EnableServiceRequest} EnableServiceRequest instance - */ - EnableServiceRequest.create = function create(properties) { - return new EnableServiceRequest(properties); - }; - - /** - * Encodes the specified EnableServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceRequest.verify|verify} messages. - * @function encode - * @memberof google.api.servicemanagement.v1.EnableServiceRequest - * @static - * @param {google.api.servicemanagement.v1.IEnableServiceRequest} message EnableServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnableServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); - if (message.consumerId != null && Object.hasOwnProperty.call(message, "consumerId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.consumerId); - return writer; - }; - - /** - * Encodes the specified EnableServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.servicemanagement.v1.EnableServiceRequest - * @static - * @param {google.api.servicemanagement.v1.IEnableServiceRequest} message EnableServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnableServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnableServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.api.servicemanagement.v1.EnableServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.servicemanagement.v1.EnableServiceRequest} EnableServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnableServiceRequest.decode = function 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.servicemanagement.v1.EnableServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; - case 2: - message.consumerId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnableServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.servicemanagement.v1.EnableServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.servicemanagement.v1.EnableServiceRequest} EnableServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnableServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnableServiceRequest message. - * @function verify - * @memberof google.api.servicemanagement.v1.EnableServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnableServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.serviceName != null && message.hasOwnProperty("serviceName")) - if (!$util.isString(message.serviceName)) - return "serviceName: string expected"; - if (message.consumerId != null && message.hasOwnProperty("consumerId")) - if (!$util.isString(message.consumerId)) - return "consumerId: string expected"; - return null; - }; - - /** - * Creates an EnableServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.servicemanagement.v1.EnableServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.api.servicemanagement.v1.EnableServiceRequest} EnableServiceRequest - */ - EnableServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.servicemanagement.v1.EnableServiceRequest) - return object; - var message = new $root.google.api.servicemanagement.v1.EnableServiceRequest(); - if (object.serviceName != null) - message.serviceName = String(object.serviceName); - if (object.consumerId != null) - message.consumerId = String(object.consumerId); - return message; - }; - - /** - * Creates a plain object from an EnableServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.servicemanagement.v1.EnableServiceRequest - * @static - * @param {google.api.servicemanagement.v1.EnableServiceRequest} message EnableServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnableServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.serviceName = ""; - object.consumerId = ""; - } - if (message.serviceName != null && message.hasOwnProperty("serviceName")) - object.serviceName = message.serviceName; - if (message.consumerId != null && message.hasOwnProperty("consumerId")) - object.consumerId = message.consumerId; - return object; - }; - - /** - * Converts this EnableServiceRequest to JSON. - * @function toJSON - * @memberof google.api.servicemanagement.v1.EnableServiceRequest - * @instance - * @returns {Object.} JSON object - */ - EnableServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EnableServiceRequest; - })(); - - v1.EnableServiceResponse = (function() { - - /** - * Properties of an EnableServiceResponse. - * @memberof google.api.servicemanagement.v1 - * @interface IEnableServiceResponse - */ - - /** - * Constructs a new EnableServiceResponse. - * @memberof google.api.servicemanagement.v1 - * @classdesc Represents an EnableServiceResponse. - * @implements IEnableServiceResponse - * @constructor - * @param {google.api.servicemanagement.v1.IEnableServiceResponse=} [properties] Properties to set - */ - function EnableServiceResponse(properties) { - if (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 EnableServiceResponse instance using the specified properties. - * @function create - * @memberof google.api.servicemanagement.v1.EnableServiceResponse - * @static - * @param {google.api.servicemanagement.v1.IEnableServiceResponse=} [properties] Properties to set - * @returns {google.api.servicemanagement.v1.EnableServiceResponse} EnableServiceResponse instance - */ - EnableServiceResponse.create = function create(properties) { - return new EnableServiceResponse(properties); - }; - - /** - * Encodes the specified EnableServiceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceResponse.verify|verify} messages. - * @function encode - * @memberof google.api.servicemanagement.v1.EnableServiceResponse - * @static - * @param {google.api.servicemanagement.v1.IEnableServiceResponse} message EnableServiceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnableServiceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified EnableServiceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.EnableServiceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.servicemanagement.v1.EnableServiceResponse - * @static - * @param {google.api.servicemanagement.v1.IEnableServiceResponse} message EnableServiceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnableServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnableServiceResponse message from the specified reader or buffer. - * @function decode - * @memberof google.api.servicemanagement.v1.EnableServiceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.servicemanagement.v1.EnableServiceResponse} EnableServiceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnableServiceResponse.decode = function 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.servicemanagement.v1.EnableServiceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnableServiceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.servicemanagement.v1.EnableServiceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.servicemanagement.v1.EnableServiceResponse} EnableServiceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnableServiceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnableServiceResponse message. - * @function verify - * @memberof google.api.servicemanagement.v1.EnableServiceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnableServiceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an EnableServiceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.servicemanagement.v1.EnableServiceResponse - * @static - * @param {Object.} object Plain object - * @returns {google.api.servicemanagement.v1.EnableServiceResponse} EnableServiceResponse - */ - EnableServiceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.servicemanagement.v1.EnableServiceResponse) - return object; - return new $root.google.api.servicemanagement.v1.EnableServiceResponse(); - }; - - /** - * Creates a plain object from an EnableServiceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.servicemanagement.v1.EnableServiceResponse - * @static - * @param {google.api.servicemanagement.v1.EnableServiceResponse} message EnableServiceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnableServiceResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this EnableServiceResponse to JSON. - * @function toJSON - * @memberof google.api.servicemanagement.v1.EnableServiceResponse - * @instance - * @returns {Object.} JSON object - */ - EnableServiceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EnableServiceResponse; - })(); - - v1.DisableServiceRequest = (function() { - - /** - * Properties of a DisableServiceRequest. - * @memberof google.api.servicemanagement.v1 - * @interface IDisableServiceRequest - * @property {string|null} [serviceName] DisableServiceRequest serviceName - * @property {string|null} [consumerId] DisableServiceRequest consumerId - */ - - /** - * Constructs a new DisableServiceRequest. - * @memberof google.api.servicemanagement.v1 - * @classdesc Represents a DisableServiceRequest. - * @implements IDisableServiceRequest - * @constructor - * @param {google.api.servicemanagement.v1.IDisableServiceRequest=} [properties] Properties to set - */ - function DisableServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DisableServiceRequest serviceName. - * @member {string} serviceName - * @memberof google.api.servicemanagement.v1.DisableServiceRequest - * @instance - */ - DisableServiceRequest.prototype.serviceName = ""; - - /** - * DisableServiceRequest consumerId. - * @member {string} consumerId - * @memberof google.api.servicemanagement.v1.DisableServiceRequest - * @instance - */ - DisableServiceRequest.prototype.consumerId = ""; - - /** - * Creates a new DisableServiceRequest instance using the specified properties. - * @function create - * @memberof google.api.servicemanagement.v1.DisableServiceRequest - * @static - * @param {google.api.servicemanagement.v1.IDisableServiceRequest=} [properties] Properties to set - * @returns {google.api.servicemanagement.v1.DisableServiceRequest} DisableServiceRequest instance - */ - DisableServiceRequest.create = function create(properties) { - return new DisableServiceRequest(properties); - }; - - /** - * Encodes the specified DisableServiceRequest message. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceRequest.verify|verify} messages. - * @function encode - * @memberof google.api.servicemanagement.v1.DisableServiceRequest - * @static - * @param {google.api.servicemanagement.v1.IDisableServiceRequest} message DisableServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DisableServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceName); - if (message.consumerId != null && Object.hasOwnProperty.call(message, "consumerId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.consumerId); - return writer; - }; - - /** - * Encodes the specified DisableServiceRequest message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.servicemanagement.v1.DisableServiceRequest - * @static - * @param {google.api.servicemanagement.v1.IDisableServiceRequest} message DisableServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DisableServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DisableServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.api.servicemanagement.v1.DisableServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.servicemanagement.v1.DisableServiceRequest} DisableServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DisableServiceRequest.decode = function 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.servicemanagement.v1.DisableServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; - case 2: - message.consumerId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DisableServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.servicemanagement.v1.DisableServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.servicemanagement.v1.DisableServiceRequest} DisableServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DisableServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DisableServiceRequest message. - * @function verify - * @memberof google.api.servicemanagement.v1.DisableServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DisableServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.serviceName != null && message.hasOwnProperty("serviceName")) - if (!$util.isString(message.serviceName)) - return "serviceName: string expected"; - if (message.consumerId != null && message.hasOwnProperty("consumerId")) - if (!$util.isString(message.consumerId)) - return "consumerId: string expected"; - return null; - }; - - /** - * Creates a DisableServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.servicemanagement.v1.DisableServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.api.servicemanagement.v1.DisableServiceRequest} DisableServiceRequest - */ - DisableServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.servicemanagement.v1.DisableServiceRequest) - return object; - var message = new $root.google.api.servicemanagement.v1.DisableServiceRequest(); - if (object.serviceName != null) - message.serviceName = String(object.serviceName); - if (object.consumerId != null) - message.consumerId = String(object.consumerId); - return message; - }; - - /** - * Creates a plain object from a DisableServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.servicemanagement.v1.DisableServiceRequest - * @static - * @param {google.api.servicemanagement.v1.DisableServiceRequest} message DisableServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DisableServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.serviceName = ""; - object.consumerId = ""; - } - if (message.serviceName != null && message.hasOwnProperty("serviceName")) - object.serviceName = message.serviceName; - if (message.consumerId != null && message.hasOwnProperty("consumerId")) - object.consumerId = message.consumerId; - return object; - }; - - /** - * Converts this DisableServiceRequest to JSON. - * @function toJSON - * @memberof google.api.servicemanagement.v1.DisableServiceRequest - * @instance - * @returns {Object.} JSON object - */ - DisableServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DisableServiceRequest; - })(); - - v1.DisableServiceResponse = (function() { - - /** - * Properties of a DisableServiceResponse. - * @memberof google.api.servicemanagement.v1 - * @interface IDisableServiceResponse - */ - - /** - * Constructs a new DisableServiceResponse. - * @memberof google.api.servicemanagement.v1 - * @classdesc Represents a DisableServiceResponse. - * @implements IDisableServiceResponse - * @constructor - * @param {google.api.servicemanagement.v1.IDisableServiceResponse=} [properties] Properties to set - */ - function DisableServiceResponse(properties) { - if (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 DisableServiceResponse instance using the specified properties. - * @function create - * @memberof google.api.servicemanagement.v1.DisableServiceResponse - * @static - * @param {google.api.servicemanagement.v1.IDisableServiceResponse=} [properties] Properties to set - * @returns {google.api.servicemanagement.v1.DisableServiceResponse} DisableServiceResponse instance - */ - DisableServiceResponse.create = function create(properties) { - return new DisableServiceResponse(properties); - }; - - /** - * Encodes the specified DisableServiceResponse message. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceResponse.verify|verify} messages. - * @function encode - * @memberof google.api.servicemanagement.v1.DisableServiceResponse - * @static - * @param {google.api.servicemanagement.v1.IDisableServiceResponse} message DisableServiceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DisableServiceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified DisableServiceResponse message, length delimited. Does not implicitly {@link google.api.servicemanagement.v1.DisableServiceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.servicemanagement.v1.DisableServiceResponse - * @static - * @param {google.api.servicemanagement.v1.IDisableServiceResponse} message DisableServiceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DisableServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DisableServiceResponse message from the specified reader or buffer. - * @function decode - * @memberof google.api.servicemanagement.v1.DisableServiceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.servicemanagement.v1.DisableServiceResponse} DisableServiceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DisableServiceResponse.decode = function 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.servicemanagement.v1.DisableServiceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DisableServiceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.servicemanagement.v1.DisableServiceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.servicemanagement.v1.DisableServiceResponse} DisableServiceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DisableServiceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DisableServiceResponse message. - * @function verify - * @memberof google.api.servicemanagement.v1.DisableServiceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DisableServiceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a DisableServiceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.servicemanagement.v1.DisableServiceResponse - * @static - * @param {Object.} object Plain object - * @returns {google.api.servicemanagement.v1.DisableServiceResponse} DisableServiceResponse - */ - DisableServiceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.servicemanagement.v1.DisableServiceResponse) - return object; - return new $root.google.api.servicemanagement.v1.DisableServiceResponse(); - }; - - /** - * Creates a plain object from a DisableServiceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.servicemanagement.v1.DisableServiceResponse - * @static - * @param {google.api.servicemanagement.v1.DisableServiceResponse} message DisableServiceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DisableServiceResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DisableServiceResponse to JSON. - * @function toJSON - * @memberof google.api.servicemanagement.v1.DisableServiceResponse - * @instance - * @returns {Object.} JSON object - */ - DisableServiceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DisableServiceResponse; - })(); - v1.GenerateConfigReportRequest = (function() { /** @@ -36662,209 +35856,6 @@ return Empty; })(); - protobuf.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FieldMask; - })(); - return protobuf; })(); diff --git a/packages/google-api-servicemanagement/protos/protos.json b/packages/google-api-servicemanagement/protos/protos.json index 16a390646f6..2fa0eec8fe8 100644 --- a/packages/google-api-servicemanagement/protos/protos.json +++ b/packages/google-api-servicemanagement/protos/protos.json @@ -527,70 +527,6 @@ "(google.api.method_signature)": "new_config,old_config" } ] - }, - "EnableService": { - "requestType": "EnableServiceRequest", - "responseType": "google.longrunning.Operation", - "options": { - "deprecated": true, - "(google.api.http).post": "/v1/services/{service_name}:enable", - "(google.api.http).body": "*", - "(google.api.method_signature)": "service_name,consumer_id", - "(google.longrunning.operation_info).response_type": "google.api.servicemanagement.v1.EnableServiceResponse", - "(google.longrunning.operation_info).metadata_type": "google.api.servicemanagement.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "deprecated": true - }, - { - "(google.api.http)": { - "post": "/v1/services/{service_name}:enable", - "body": "*" - } - }, - { - "(google.api.method_signature)": "service_name,consumer_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.api.servicemanagement.v1.EnableServiceResponse", - "metadata_type": "google.api.servicemanagement.v1.OperationMetadata" - } - } - ] - }, - "DisableService": { - "requestType": "DisableServiceRequest", - "responseType": "google.longrunning.Operation", - "options": { - "deprecated": true, - "(google.api.http).post": "/v1/services/{service_name}:disable", - "(google.api.http).body": "*", - "(google.api.method_signature)": "service_name,consumer_id", - "(google.longrunning.operation_info).response_type": "google.api.servicemanagement.v1.DisableServiceResponse", - "(google.longrunning.operation_info).metadata_type": "google.api.servicemanagement.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "deprecated": true - }, - { - "(google.api.http)": { - "post": "/v1/services/{service_name}:disable", - "body": "*" - } - }, - { - "(google.api.method_signature)": "service_name,consumer_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.api.servicemanagement.v1.DisableServiceResponse", - "metadata_type": "google.api.servicemanagement.v1.OperationMetadata" - } - } - ] } } }, @@ -870,48 +806,6 @@ } } }, - "EnableServiceRequest": { - "fields": { - "serviceName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "consumerId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "EnableServiceResponse": { - "fields": {} - }, - "DisableServiceRequest": { - "fields": { - "serviceName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "consumerId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DisableServiceResponse": { - "fields": {} - }, "GenerateConfigReportRequest": { "fields": { "newConfig": { @@ -3407,15 +3301,6 @@ }, "Empty": { "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } } } }, diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js index b4ab38b3202..d5ca5953db8 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js @@ -21,7 +21,7 @@ function main(serviceName, serviceConfig) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the overview (/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js index 1798bff131d..5319bbc1642 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js @@ -21,7 +21,7 @@ function main(serviceName, rollout) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the overview (/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js index 598dc32e667..6273706958a 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js @@ -21,7 +21,7 @@ function main(serviceName) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the overview (/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js index 525bfe5e0f8..6329a1e410d 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js @@ -21,7 +21,7 @@ function main(serviceName, configId) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the overview (/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js index 301fa4b2f37..2fa2fe7e485 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js @@ -21,7 +21,7 @@ function main(serviceName, rolloutId) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the overview (/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js index e846f9c5fe8..3a04a24cbf3 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js @@ -21,7 +21,7 @@ function main(serviceName) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the overview (/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js index febf2047b51..b041e39bc32 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js @@ -21,7 +21,7 @@ function main(serviceName, filter) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the overview (/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js index 52c07413957..467bc4f2e80 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js @@ -21,7 +21,7 @@ function main(serviceName, configSource) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the overview (/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js index 3b0d8333b89..efa9a68ffc9 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js @@ -21,7 +21,7 @@ function main(serviceName) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the overview (/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/src/v1/gapic_metadata.json b/packages/google-api-servicemanagement/src/v1/gapic_metadata.json index 6dd503c264f..6ff3a512fa1 100644 --- a/packages/google-api-servicemanagement/src/v1/gapic_metadata.json +++ b/packages/google-api-servicemanagement/src/v1/gapic_metadata.json @@ -60,16 +60,6 @@ "createServiceRollout" ] }, - "EnableService": { - "methods": [ - "enableService" - ] - }, - "DisableService": { - "methods": [ - "disableService" - ] - }, "ListServices": { "methods": [ "listServices", @@ -146,16 +136,6 @@ "createServiceRollout" ] }, - "EnableService": { - "methods": [ - "enableService" - ] - }, - "DisableService": { - "methods": [ - "disableService" - ] - }, "ListServices": { "methods": [ "listServices", diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index 99388f14cc4..1a8f2ab77ab 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -42,7 +42,7 @@ import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** - * [Google Service Management API](https://cloud.google.com/service-management/overview) + * [Google Service Management API](/service-management/overview) * @class * @memberof v1 */ @@ -224,18 +224,6 @@ export class ServiceManagerClient { const createServiceRolloutMetadata = protoFilesRoot.lookup( '.google.api.servicemanagement.v1.OperationMetadata' ) as gax.protobuf.Type; - const enableServiceResponse = protoFilesRoot.lookup( - '.google.api.servicemanagement.v1.EnableServiceResponse' - ) as gax.protobuf.Type; - const enableServiceMetadata = protoFilesRoot.lookup( - '.google.api.servicemanagement.v1.OperationMetadata' - ) as gax.protobuf.Type; - const disableServiceResponse = protoFilesRoot.lookup( - '.google.api.servicemanagement.v1.DisableServiceResponse' - ) as gax.protobuf.Type; - const disableServiceMetadata = protoFilesRoot.lookup( - '.google.api.servicemanagement.v1.OperationMetadata' - ) as gax.protobuf.Type; this.descriptors.longrunning = { createService: new this._gaxModule.LongrunningDescriptor( @@ -263,16 +251,6 @@ export class ServiceManagerClient { createServiceRolloutResponse.decode.bind(createServiceRolloutResponse), createServiceRolloutMetadata.decode.bind(createServiceRolloutMetadata) ), - enableService: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - enableServiceResponse.decode.bind(enableServiceResponse), - enableServiceMetadata.decode.bind(enableServiceMetadata) - ), - disableService: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - disableServiceResponse.decode.bind(disableServiceResponse), - disableServiceMetadata.decode.bind(disableServiceMetadata) - ), }; // Put together the default options sent with requests. @@ -338,8 +316,6 @@ export class ServiceManagerClient { 'getServiceRollout', 'createServiceRollout', 'generateConfigReport', - 'enableService', - 'disableService', ]; for (const methodName of serviceManagerStubMethods) { const callPromise = this.serviceManagerStub.then( @@ -529,7 +505,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.configId * Required. The id of the service configuration resource. @@ -642,7 +618,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {google.api.Service} request.serviceConfig * Required. The service configuration resource. @@ -742,7 +718,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.rolloutId * Required. The id of the rollout resource. @@ -952,7 +928,14 @@ export class ServiceManagerClient { /** * Creates a new managed service. - * Please note one producer project can own no more than 20 services. + * + * A managed service is immutable, and is subject to mandatory 30-day + * data retention. You cannot move a service or recreate it within 30 days + * after deletion. + * + * One producer project can own no more than 500 services. For security and + * reliability purposes, a production service should be hosted in a + * dedicated producer project. * * Operation * @@ -1097,7 +1080,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1240,7 +1223,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1390,7 +1373,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {google.api.servicemanagement.v1.ConfigSource} request.configSource * Required. The source configuration for the service. @@ -1547,7 +1530,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {google.api.servicemanagement.v1.Rollout} request.rollout * Required. The rollout resource. The `service_name` field is output only. @@ -1681,335 +1664,6 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.v1.OperationMetadata >; } - /** - * Enables a {@link google.api.servicemanagement.v1.ManagedService|service} for a project, so it can be used - * for the project. See - * [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for - * more information. - * - * Operation - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.serviceName - * Required. Name of the service to enable. Specifying an unknown service name will - * cause the request to fail. - * @param {string} request.consumerId - * Required. The identity of consumer resource which service enablement will be - * applied to. - * - * The Google Service Management implementation accepts the following - * forms: - * - "project:" - * - * Note: this is made compatible with - * google.api.servicecontrol.v1.Operation.consumer_id. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/service_manager.enable_service.js - * region_tag:servicemanagement_v1_generated_ServiceManager_EnableService_async - * @deprecated EnableService is deprecated and may be removed in a future version. - */ - enableService( - request?: protos.google.api.servicemanagement.v1.IEnableServiceRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.api.servicemanagement.v1.IEnableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - enableService( - request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.api.servicemanagement.v1.IEnableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - enableService( - request: protos.google.api.servicemanagement.v1.IEnableServiceRequest, - callback: Callback< - LROperation< - protos.google.api.servicemanagement.v1.IEnableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - enableService( - request?: protos.google.api.servicemanagement.v1.IEnableServiceRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.api.servicemanagement.v1.IEnableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.api.servicemanagement.v1.IEnableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.api.servicemanagement.v1.IEnableServiceResponse, - protos.google.api.servicemanagement.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({ - service_name: request.serviceName || '', - }); - this.initialize(); - this.warn( - 'DEP$ServiceManager-$EnableService', - 'EnableService is deprecated and may be removed in a future version.', - 'DeprecationWarning' - ); - return this.innerApiCalls.enableService(request, options, callback); - } - /** - * Check the status of the long running operation returned by `enableService()`. - * @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/service_manager.enable_service.js - * region_tag:servicemanagement_v1_generated_ServiceManager_EnableService_async - * @deprecated EnableService is deprecated and may be removed in a future version. - */ - async checkEnableServiceProgress( - name: string - ): Promise< - LROperation< - protos.google.api.servicemanagement.v1.EnableServiceResponse, - protos.google.api.servicemanagement.v1.OperationMetadata - > - > { - this.warn( - 'DEP$ServiceManager-$checkEnableServiceProgress', - 'checkEnableServiceProgress is deprecated and may be removed in a future version.', - 'DeprecationWarning' - ); - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.enableService, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.api.servicemanagement.v1.EnableServiceResponse, - protos.google.api.servicemanagement.v1.OperationMetadata - >; - } - /** - * Disables a {@link google.api.servicemanagement.v1.ManagedService|service} for a project, so it can no longer be - * be used for the project. It prevents accidental usage that may cause - * unexpected billing charges or security leaks. - * - * Operation - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.serviceName - * Required. Name of the service to disable. Specifying an unknown service name - * will cause the request to fail. - * @param {string} request.consumerId - * Required. The identity of consumer resource which service disablement will be - * applied to. - * - * The Google Service Management implementation accepts the following - * forms: - * - "project:" - * - * Note: this is made compatible with - * google.api.servicecontrol.v1.Operation.consumer_id. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/service_manager.disable_service.js - * region_tag:servicemanagement_v1_generated_ServiceManager_DisableService_async - * @deprecated DisableService is deprecated and may be removed in a future version. - */ - disableService( - request?: protos.google.api.servicemanagement.v1.IDisableServiceRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.api.servicemanagement.v1.IDisableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - disableService( - request: protos.google.api.servicemanagement.v1.IDisableServiceRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.api.servicemanagement.v1.IDisableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - disableService( - request: protos.google.api.servicemanagement.v1.IDisableServiceRequest, - callback: Callback< - LROperation< - protos.google.api.servicemanagement.v1.IDisableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - disableService( - request?: protos.google.api.servicemanagement.v1.IDisableServiceRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.api.servicemanagement.v1.IDisableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.api.servicemanagement.v1.IDisableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.api.servicemanagement.v1.IDisableServiceResponse, - protos.google.api.servicemanagement.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({ - service_name: request.serviceName || '', - }); - this.initialize(); - this.warn( - 'DEP$ServiceManager-$DisableService', - 'DisableService is deprecated and may be removed in a future version.', - 'DeprecationWarning' - ); - return this.innerApiCalls.disableService(request, options, callback); - } - /** - * Check the status of the long running operation returned by `disableService()`. - * @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/service_manager.disable_service.js - * region_tag:servicemanagement_v1_generated_ServiceManager_DisableService_async - * @deprecated DisableService is deprecated and may be removed in a future version. - */ - async checkDisableServiceProgress( - name: string - ): Promise< - LROperation< - protos.google.api.servicemanagement.v1.DisableServiceResponse, - protos.google.api.servicemanagement.v1.OperationMetadata - > - > { - this.warn( - 'DEP$ServiceManager-$checkDisableServiceProgress', - 'checkDisableServiceProgress is deprecated and may be removed in a future version.', - 'DeprecationWarning' - ); - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.disableService, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.api.servicemanagement.v1.DisableServiceResponse, - protos.google.api.servicemanagement.v1.OperationMetadata - >; - } /** * Lists managed services. * @@ -2017,10 +1671,6 @@ export class ServiceManagerClient { * services the calling user has "servicemanagement.services.get" permission * for. * - * **BETA:** If the caller specifies the `consumer_id`, it returns only the - * services enabled on the consumer. The `consumer_id` must have the format - * of "project:{PROJECT-ID}". - * * @param {Object} request * The request object that will be sent. * @param {string} request.producerProjectId @@ -2226,7 +1876,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2326,7 +1976,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2374,7 +2024,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2422,7 +2072,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2433,10 +2083,10 @@ export class ServiceManagerClient { * Required. Use `filter` to return subset of rollouts. * The following filters are supported: * -- To limit the results to only those in - * status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', * use filter='status=SUCCESS' * -- To limit the results to those in - * status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -2531,7 +2181,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2542,10 +2192,10 @@ export class ServiceManagerClient { * Required. Use `filter` to return subset of rollouts. * The following filters are supported: * -- To limit the results to only those in - * status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', * use filter='status=SUCCESS' * -- To limit the results to those in - * status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -2588,7 +2238,7 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) + * Required. The name of the service. See the [overview](/service-management/overview) * for naming requirements. For example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. @@ -2599,10 +2249,10 @@ export class ServiceManagerClient { * Required. Use `filter` to return subset of rollouts. * The following filters are supported: * -- To limit the results to only those in - * status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', * use filter='status=SUCCESS' * -- To limit the results to those in - * status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client_config.json b/packages/google-api-servicemanagement/src/v1/service_manager_client_config.json index 63ee9787bc9..83bc47568b7 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client_config.json +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client_config.json @@ -84,16 +84,6 @@ "timeout_millis": 10000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" - }, - "EnableService": { - "timeout_millis": 10000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DisableService": { - "timeout_millis": 10000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" } } } diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index 7dea0ccda28..7cf7a848f8f 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -1692,418 +1692,6 @@ describe('v1.ServiceManagerClient', () => { }); }); - describe('enableService', () => { - it('invokes enableService without error', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.api.servicemanagement.v1.EnableServiceRequest() - ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.enableService = - stubLongRunningCall(expectedResponse); - const [operation] = await client.enableService(request); - const [response] = await operation.promise(); - assert(stub.calledOnce); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.enableService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes enableService without error using callback', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.api.servicemanagement.v1.EnableServiceRequest() - ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.enableService = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.enableService( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.api.servicemanagement.v1.IEnableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.api.servicemanagement.v1.IEnableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert(stub.calledOnce); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.enableService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes enableService with call error', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.api.servicemanagement.v1.EnableServiceRequest() - ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.enableService = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.enableService(request), expectedError); - assert(stub.calledOnce); - assert( - (client.innerApiCalls.enableService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes enableService with LRO error', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.api.servicemanagement.v1.EnableServiceRequest() - ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.enableService = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.enableService(request); - await assert.rejects(operation.promise(), expectedError); - assert(stub.calledOnce); - assert( - (client.innerApiCalls.enableService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes checkEnableServiceProgress without error', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - 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.checkEnableServiceProgress( - expectedResponse.name - ); - assert(stub.calledOnce); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkEnableServiceProgress with error', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkEnableServiceProgress(''), - expectedError - ); - assert(stub.calledOnce); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('disableService', () => { - it('invokes disableService without error', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.api.servicemanagement.v1.DisableServiceRequest() - ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.disableService = - stubLongRunningCall(expectedResponse); - const [operation] = await client.disableService(request); - const [response] = await operation.promise(); - assert(stub.calledOnce); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.disableService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes disableService without error using callback', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.api.servicemanagement.v1.DisableServiceRequest() - ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.disableService = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.disableService( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.api.servicemanagement.v1.IDisableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.api.servicemanagement.v1.IDisableServiceResponse, - protos.google.api.servicemanagement.v1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert(stub.calledOnce); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.disableService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes disableService with call error', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.api.servicemanagement.v1.DisableServiceRequest() - ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.disableService = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.disableService(request), expectedError); - assert(stub.calledOnce); - assert( - (client.innerApiCalls.disableService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes disableService with LRO error', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const request = generateSampleMessage( - new protos.google.api.servicemanagement.v1.DisableServiceRequest() - ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.disableService = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.disableService(request); - await assert.rejects(operation.promise(), expectedError); - assert(stub.calledOnce); - assert( - (client.innerApiCalls.disableService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes checkDisableServiceProgress without error', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - 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.checkDisableServiceProgress( - expectedResponse.name - ); - assert(stub.calledOnce); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDisableServiceProgress with error', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkDisableServiceProgress(''), - expectedError - ); - assert(stub.calledOnce); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - describe('listServices', () => { it('invokes listServices without error', async () => { const client = new servicemanagerModule.v1.ServiceManagerClient({ From 23388b99b20d2463f5ad34fefef4b5cd2f70a0ee Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 10:11:31 -0800 Subject: [PATCH 54/85] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#118) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): include metadata file, add exclusions for samples to handwritten libraries PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../v1/service_manager.create_service.js | 9 +- .../service_manager.create_service_config.js | 9 +- .../service_manager.create_service_rollout.js | 9 +- .../v1/service_manager.delete_service.js | 9 +- .../service_manager.generate_config_report.js | 9 +- .../v1/service_manager.get_service.js | 9 +- .../v1/service_manager.get_service_config.js | 9 +- .../v1/service_manager.get_service_rollout.js | 9 +- .../service_manager.list_service_configs.js | 9 +- .../service_manager.list_service_rollouts.js | 9 +- .../v1/service_manager.list_services.js | 9 +- .../service_manager.submit_config_source.js | 9 +- .../v1/service_manager.undelete_service.js | 9 +- ...adata.google.api.servicemanagement.v1.json | 599 ++++++++++++++++++ .../src/v1/service_manager_client.ts | 5 +- .../test/gapic_service_manager_v1.ts | 97 ++- 16 files changed, 787 insertions(+), 31 deletions(-) create mode 100644 packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js index 35c94909c6f..26c31d0abe4 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js index d5ca5953db8..aed8f8a2056 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js index 5319bbc1642..d15ce6a1a8e 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js index 6273706958a..12b4c1dae6a 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js index fbeeb9643ca..8b3b0db76c2 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js index af79dbac99a..1d535cdc6a0 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js index 6329a1e410d..c71641d944d 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js index 2fa2fe7e485..de526cc506a 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js index 3a04a24cbf3..b450a3817ce 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js index b041e39bc32..e1009d41874 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js index 9f65fae4ce1..a260fd2de1e 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js index 467bc4f2e80..006bc9ba011 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js index efa9a68ffc9..eae76d05be2 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json new file mode 100644 index 00000000000..324c6d944d4 --- /dev/null +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json @@ -0,0 +1,599 @@ +{ + "clientLibrary": { + "name": "nodejs-servicemanagement", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.api.servicemanagement.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_ListServices_async", + "title": "ServiceManager listServices Sample", + "origin": "API_DEFINITION", + "description": " Lists managed services. Returns all public services. For authenticated users, also returns all services the calling user has \"servicemanagement.services.get\" permission for.", + "canonical": true, + "file": "service_manager.list_services.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListServices", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServices", + "async": true, + "parameters": [ + { + "name": "producer_project_id", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "consumer_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.servicemanagement.v1.ListServicesResponse", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "ListServices", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServices", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_GetService_async", + "title": "ServiceManager getService Sample", + "origin": "API_DEFINITION", + "description": " Gets a managed service. Authentication is required unless the service is public.", + "canonical": true, + "file": "service_manager.get_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetService", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.servicemanagement.v1.ManagedService", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "GetService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetService", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_CreateService_async", + "title": "ServiceManager createService Sample", + "origin": "API_DEFINITION", + "description": " Creates a new managed service. A managed service is immutable, and is subject to mandatory 30-day data retention. You cannot move a service or recreate it within 30 days after deletion. One producer project can own no more than 500 services. For security and reliability purposes, a production service should be hosted in a dedicated producer project. Operation", + "canonical": true, + "file": "service_manager.create_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateService", + "async": true, + "parameters": [ + { + "name": "service", + "type": ".google.api.servicemanagement.v1.ManagedService" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "CreateService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateService", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_DeleteService_async", + "title": "ServiceManager deleteService Sample", + "origin": "API_DEFINITION", + "description": " Deletes a managed service. This method will change the service to the `Soft-Delete` state for 30 days. Within this period, service producers may call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service. After 30 days, the service will be permanently deleted. Operation", + "canonical": true, + "file": "service_manager.delete_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.DeleteService", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "DeleteService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.DeleteService", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_UndeleteService_async", + "title": "ServiceManager undeleteService Sample", + "origin": "API_DEFINITION", + "description": " Revives a previously deleted managed service. The method restores the service using the configuration at the time the service was deleted. The target service must exist and must have been deleted within the last 30 days. Operation", + "canonical": true, + "file": "service_manager.undelete_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UndeleteService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.UndeleteService", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "UndeleteService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.UndeleteService", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_async", + "title": "ServiceManager listServiceConfigs Sample", + "origin": "API_DEFINITION", + "description": " Lists the history of the service configuration for a managed service, from the newest to the oldest.", + "canonical": true, + "file": "service_manager.list_service_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListServiceConfigs", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.api.servicemanagement.v1.ListServiceConfigsResponse", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "ListServiceConfigs", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_GetServiceConfig_async", + "title": "ServiceManager getServiceConfig Sample", + "origin": "API_DEFINITION", + "description": " Gets a service configuration (version) for a managed service.", + "canonical": true, + "file": "service_manager.get_service_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetServiceConfig", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceConfig", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "config_id", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView" + } + ], + "resultType": ".google.api.Service", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "GetServiceConfig", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceConfig", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_async", + "title": "ServiceManager createServiceConfig Sample", + "origin": "API_DEFINITION", + "description": " Creates a new service configuration (version) for a managed service. This method only stores the service configuration. To roll out the service configuration to backend systems please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.", + "canonical": true, + "file": "service_manager.create_service_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateServiceConfig", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "service_config", + "type": ".google.api.Service" + } + ], + "resultType": ".google.api.Service", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "CreateServiceConfig", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_async", + "title": "ServiceManager submitConfigSource Sample", + "origin": "API_DEFINITION", + "description": " Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification). This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually. Operation", + "canonical": true, + "file": "service_manager.submit_config_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SubmitConfigSource", + "fullName": "google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "config_source", + "type": ".google.api.servicemanagement.v1.ConfigSource" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "SubmitConfigSource", + "fullName": "google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_async", + "title": "ServiceManager listServiceRollouts Sample", + "origin": "API_DEFINITION", + "description": " Lists the history of the service configuration rollouts for a managed service, from the newest to the oldest.", + "canonical": true, + "file": "service_manager.list_service_rollouts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListServiceRollouts", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.servicemanagement.v1.ListServiceRolloutsResponse", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "ListServiceRollouts", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_GetServiceRollout_async", + "title": "ServiceManager getServiceRollout Sample", + "origin": "API_DEFINITION", + "description": " Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout].", + "canonical": true, + "file": "service_manager.get_service_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetServiceRollout", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceRollout", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "rollout_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.servicemanagement.v1.Rollout", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "GetServiceRollout", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceRollout", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_async", + "title": "ServiceManager createServiceRollout Sample", + "origin": "API_DEFINITION", + "description": " Creates a new service configuration rollout. Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging. Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts. Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each service. The rest will be deleted eventually. Operation", + "canonical": true, + "file": "service_manager.create_service_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateServiceRollout", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "rollout", + "type": ".google.api.servicemanagement.v1.Rollout" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "CreateServiceRollout", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + }, + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_async", + "title": "ServiceManager generateConfigReport Sample", + "origin": "API_DEFINITION", + "description": " Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration.", + "canonical": true, + "file": "service_manager.generate_config_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateConfigReport", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GenerateConfigReport", + "async": true, + "parameters": [ + { + "name": "new_config", + "type": ".google.protobuf.Any" + }, + { + "name": "old_config", + "type": ".google.protobuf.Any" + } + ], + "resultType": ".google.api.servicemanagement.v1.GenerateConfigReportResponse", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "GenerateConfigReport", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GenerateConfigReport", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } + } + ] +} diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index 1a8f2ab77ab..da1dbb97e61 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -2296,9 +2296,8 @@ export class ServiceManagerClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.serviceManagerStub!.then(stub => { + if (this.serviceManagerStub && !this._terminated) { + return this.serviceManagerStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index 7cf7a848f8f..cfec331e64c 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -185,12 +185,27 @@ describe('v1.ServiceManagerClient', () => { assert(client.serviceManagerStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new servicemanagerModule.v1.ServiceManagerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.serviceManagerStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.serviceManagerStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -336,6 +351,22 @@ describe('v1.ServiceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getService with closed client', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getService(request), expectedError); + }); }); describe('getServiceConfig', () => { @@ -444,6 +475,22 @@ describe('v1.ServiceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getServiceConfig with closed client', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getServiceConfig(request), expectedError); + }); }); describe('createServiceConfig', () => { @@ -553,6 +600,22 @@ describe('v1.ServiceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createServiceConfig with closed client', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createServiceConfig(request), expectedError); + }); }); describe('getServiceRollout', () => { @@ -664,6 +727,22 @@ describe('v1.ServiceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getServiceRollout with closed client', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() + ); + request.serviceName = ''; + const expectedHeaderRequestParams = 'service_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getServiceRollout(request), expectedError); + }); }); describe('generateConfigReport', () => { @@ -752,6 +831,20 @@ describe('v1.ServiceManagerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes generateConfigReport with closed client', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.generateConfigReport(request), expectedError); + }); }); describe('createService', () => { From 1a4b8ec7ad2659ddab49203dd7315ad2183799fa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Mar 2022 18:23:47 +0100 Subject: [PATCH 55/85] chore(deps): update dependency sinon to v13 (#122) --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 754a4407ef2..b9a22416020 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -54,7 +54,7 @@ "mocha": "^8.3.1", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.0.0", "typescript": "^4.2.3", "webpack": "^5.24.4", From b2c209b431a09a01a49f295e9d43a925f2e1edd6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 8 Mar 2022 12:35:32 -0500 Subject: [PATCH 56/85] chore(main): release 0.4.0 (#117) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-api-servicemanagement/CHANGELOG.md | 11 +++++++++++ packages/google-api-servicemanagement/package.json | 2 +- .../google-api-servicemanagement/samples/package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index 4e069e27ed2..08eb645595b 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [0.4.0](https://github.com/googleapis/nodejs-service-management/compare/v0.3.1...v0.4.0) (2022-03-08) + + +### ⚠ BREAKING CHANGES + +* Remove EnableService and DisableService RPC methods and related protos from service management API + +### Features + +* Remove EnableService and DisableService RPC methods and related protos from service management API ([d3919ab](https://github.com/googleapis/nodejs-service-management/commit/d3919abbf7ba458cc71e8038604f56d598571fe4)) + ### [0.3.1](https://www.github.com/googleapis/nodejs-service-management/compare/v0.3.0...v0.3.1) (2021-09-10) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index b9a22416020..0d3259fff1e 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "0.3.1", + "version": "0.4.0", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 247dcf4e555..1cf4a8d493d 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^0.3.1" + "@google-cloud/service-management": "^0.4.0" }, "devDependencies": { "c8": "^7.1.0", From 3bae11d9eb5ca629bc3d13b03814c2a253cfdd7e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 10:49:34 -0700 Subject: [PATCH 57/85] chore: update v2.14.2 gapic-generator-typescript (#124) Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: https://github.com/googleapis/googleapis/commit/bc2432d50cba657e95212122e3fa112591b5bec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/930b673103e92523f8cfed38decd7d3afae8ebe7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 --- .../test/gapic_service_manager_v1.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index cfec331e64c..c9ccbc60fe4 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -362,7 +362,6 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.GetServiceRequest() ); request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getService(request), expectedError); @@ -486,7 +485,6 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getServiceConfig(request), expectedError); @@ -611,7 +609,6 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createServiceConfig(request), expectedError); @@ -738,7 +735,6 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getServiceRollout(request), expectedError); From 57414ffbb5f078fb2157f3c6018e14ec595dd716 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 12 Apr 2022 08:18:38 -0700 Subject: [PATCH 58/85] chore: fix api_shortname (#125) Co-authored-by: Benjamin E. Coe --- packages/google-api-servicemanagement/.repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/.repo-metadata.json b/packages/google-api-servicemanagement/.repo-metadata.json index 697842fd409..ed48400e1d8 100644 --- a/packages/google-api-servicemanagement/.repo-metadata.json +++ b/packages/google-api-servicemanagement/.repo-metadata.json @@ -11,6 +11,6 @@ "requires_billing": true, "language": "nodejs", "repo": "googleapis/nodejs-service-management", - "api_shortname": "service-management", + "api_shortname": "servicemanagement", "library_type": "GAPIC_AUTO" } From 771ac370d6dca1e5efc967ad0e78c6c6546ca28d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 26 Apr 2022 15:40:45 -0700 Subject: [PATCH 59/85] docs: fix remaining broken links (#133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build: fix broken links PiperOrigin-RevId: 443188324 Source-Link: https://github.com/googleapis/googleapis/commit/775267e23c32cb5e1285317e8daac8e1f99b5aef Source-Link: https://github.com/googleapis/googleapis-gen/commit/166b6e3ac46e2821b2bc9ca443c3aca4d1cbe782 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTY2YjZlM2FjNDZlMjgyMWIyYmM5Y2E0NDNjM2FjYTRkMWNiZTc4MiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: fix remaining broken links PiperOrigin-RevId: 443508623 Source-Link: https://github.com/googleapis/googleapis/commit/fd6935f0410741b91e803e429568c2e7f5b4654a Source-Link: https://github.com/googleapis/googleapis-gen/commit/4f659e3b8ace2e86c027c4feca9decd6ee58c64c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGY2NTllM2I4YWNlMmU4NmMwMjdjNGZlY2E5ZGVjZDZlZTU4YzY0YyJ9 * 🦉 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 --- .../api/servicemanagement/v1/resources.proto | 12 +- .../servicemanagement/v1/servicemanager.proto | 105 +++++++++++------- .../service_manager.create_service_config.js | 5 +- .../service_manager.create_service_rollout.js | 5 +- .../v1/service_manager.delete_service.js | 5 +- .../v1/service_manager.get_service.js | 4 +- .../v1/service_manager.get_service_config.js | 5 +- .../v1/service_manager.get_service_rollout.js | 5 +- .../service_manager.list_service_configs.js | 5 +- .../service_manager.list_service_rollouts.js | 5 +- .../service_manager.submit_config_source.js | 5 +- .../v1/service_manager.undelete_service.js | 5 +- ...adata.google.api.servicemanagement.v1.json | 18 +-- .../src/v1/service_manager_client.ts | 96 +++++++++------- 14 files changed, 165 insertions(+), 115 deletions(-) diff --git a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto index f18fd187805..57ffd770b94 100644 --- a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto +++ b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/resources.proto @@ -32,7 +32,8 @@ option ruby_package = "Google::Cloud::ServiceManagement::V1"; // The full representation of a Service that is managed by // Google Service Management. message ManagedService { - // The name of the service. See the [overview](/service-management/overview) + // The name of the service. See the + // [overview](https://cloud.google.com/service-infrastructure/docs/overview) // for naming requirements. string service_name = 2; @@ -226,9 +227,7 @@ message Rollout { // Strategy used to delete a service. This strategy is a placeholder only // used by the system generated rollout to delete a service. - message DeleteServiceStrategy { - - } + message DeleteServiceStrategy {} // Status of a Rollout. enum RolloutStatus { @@ -256,8 +255,9 @@ message Rollout { FAILED_ROLLED_BACK = 6; } - // Optional. Unique identifier of this Rollout. Must be no longer than 63 characters - // and only lower case letters, digits, '.', '_' and '-' are allowed. + // Optional. Unique identifier of this Rollout. Must be no longer than 63 + // characters and only lower case letters, digits, '.', '_' and '-' are + // allowed. // // If not specified by client, the server will generate one. The generated id // will have the form of , where "date" is the create diff --git a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto index aea0d1a9dad..c863cd41924 100644 --- a/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto +++ b/packages/google-api-servicemanagement/protos/google/api/servicemanagement/v1/servicemanager.proto @@ -33,7 +33,8 @@ option objc_class_prefix = "GASM"; option php_namespace = "Google\\Cloud\\ServiceManagement\\V1"; option ruby_package = "Google::Cloud::ServiceManagement::V1"; -// [Google Service Management API](/service-management/overview) +// [Google Service Management +// API](https://cloud.google.com/service-infrastructure/docs/overview) service ServiceManager { option (google.api.default_host) = "servicemanagement.googleapis.com"; option (google.api.oauth_scopes) = @@ -74,7 +75,8 @@ service ServiceManager { // dedicated producer project. // // Operation - rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) { + rpc CreateService(CreateServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/services" body: "service" @@ -88,11 +90,14 @@ service ServiceManager { // Deletes a managed service. This method will change the service to the // `Soft-Delete` state for 30 days. Within this period, service producers may - // call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service. - // After 30 days, the service will be permanently deleted. + // call + // [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] + // to restore the service. After 30 days, the service will be permanently + // deleted. // // Operation - rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) { + rpc DeleteService(DeleteServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/services/{service_name}" }; @@ -109,7 +114,8 @@ service ServiceManager { // last 30 days. // // Operation - rpc UndeleteService(UndeleteServiceRequest) returns (google.longrunning.Operation) { + rpc UndeleteService(UndeleteServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/services/{service_name}:undelete" }; @@ -122,7 +128,8 @@ service ServiceManager { // Lists the history of the service configuration for a managed service, // from the newest to the oldest. - rpc ListServiceConfigs(ListServiceConfigsRequest) returns (ListServiceConfigsResponse) { + rpc ListServiceConfigs(ListServiceConfigsRequest) + returns (ListServiceConfigsResponse) { option (google.api.http) = { get: "/v1/services/{service_name}/configs" }; @@ -133,9 +140,7 @@ service ServiceManager { rpc GetServiceConfig(GetServiceConfigRequest) returns (google.api.Service) { option (google.api.http) = { get: "/v1/services/{service_name}/configs/{config_id}" - additional_bindings { - get: "/v1/services/{service_name}/config" - } + additional_bindings { get: "/v1/services/{service_name}/config" } }; option (google.api.method_signature) = "service_name,config_id,view"; } @@ -148,7 +153,8 @@ service ServiceManager { // Only the 100 most recent service configurations and ones referenced by // existing rollouts are kept for each service. The rest will be deleted // eventually. - rpc CreateServiceConfig(CreateServiceConfigRequest) returns (google.api.Service) { + rpc CreateServiceConfig(CreateServiceConfigRequest) + returns (google.api.Service) { option (google.api.http) = { post: "/v1/services/{service_name}/configs" body: "service_config" @@ -162,19 +168,22 @@ service ServiceManager { // Specification). This method stores the source configurations as well as the // generated service configuration. To rollout the service configuration to // other services, - // please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + // please call + // [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. // // Only the 100 most recent configuration sources and ones referenced by // existing service configurtions are kept for each service. The rest will be // deleted eventually. // // Operation - rpc SubmitConfigSource(SubmitConfigSourceRequest) returns (google.longrunning.Operation) { + rpc SubmitConfigSource(SubmitConfigSourceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/services/{service_name}/configs:submit" body: "*" }; - option (google.api.method_signature) = "service_name,config_source,validate_only"; + option (google.api.method_signature) = + "service_name,config_source,validate_only"; option (google.longrunning.operation_info) = { response_type: "google.api.servicemanagement.v1.SubmitConfigSourceResponse" metadata_type: "google.api.servicemanagement.v1.OperationMetadata" @@ -183,14 +192,16 @@ service ServiceManager { // Lists the history of the service configuration rollouts for a managed // service, from the newest to the oldest. - rpc ListServiceRollouts(ListServiceRolloutsRequest) returns (ListServiceRolloutsResponse) { + rpc ListServiceRollouts(ListServiceRolloutsRequest) + returns (ListServiceRolloutsResponse) { option (google.api.http) = { get: "/v1/services/{service_name}/rollouts" }; option (google.api.method_signature) = "service_name,filter"; } - // Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout]. + // Gets a service configuration + // [rollout][google.api.servicemanagement.v1.Rollout]. rpc GetServiceRollout(GetServiceRolloutRequest) returns (Rollout) { option (google.api.http) = { get: "/v1/services/{service_name}/rollouts/{rollout_id}" @@ -212,7 +223,8 @@ service ServiceManager { // service. The rest will be deleted eventually. // // Operation - rpc CreateServiceRollout(CreateServiceRolloutRequest) returns (google.longrunning.Operation) { + rpc CreateServiceRollout(CreateServiceRolloutRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/services/{service_name}/rollouts" body: "rollout" @@ -235,7 +247,8 @@ service ServiceManager { // If GenerateConfigReportRequest.old_value is not specified, this method // will compare GenerateConfigReportRequest.new_value with the last pushed // service configuration. - rpc GenerateConfigReport(GenerateConfigReportRequest) returns (GenerateConfigReportResponse) { + rpc GenerateConfigReport(GenerateConfigReportRequest) + returns (GenerateConfigReportResponse) { option (google.api.http) = { post: "/v1/services:generateConfigReport" body: "*" @@ -276,8 +289,8 @@ message ListServicesResponse { // Request message for `GetService` method. message GetServiceRequest { - // Required. The name of the service. See the `ServiceManager` overview for naming - // requirements. For example: `example.googleapis.com`. + // Required. The name of the service. See the `ServiceManager` overview for + // naming requirements. For example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -289,15 +302,17 @@ message CreateServiceRequest { // Request message for DeleteService method. message DeleteServiceRequest { - // Required. The name of the service. See the [overview](/service-management/overview) - // for naming requirements. For example: `example.googleapis.com`. + // Required. The name of the service. See the + // [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + // example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for UndeleteService method. message UndeleteServiceRequest { - // Required. The name of the service. See the [overview](/service-management/overview) - // for naming requirements. For example: `example.googleapis.com`. + // Required. The name of the service. See the + // [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + // example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -320,8 +335,9 @@ message GetServiceConfigRequest { FULL = 1; } - // Required. The name of the service. See the [overview](/service-management/overview) - // for naming requirements. For example: `example.googleapis.com`. + // Required. The name of the service. See the + // [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + // example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The id of the service configuration resource. @@ -337,8 +353,9 @@ message GetServiceConfigRequest { // Request message for ListServiceConfigs method. message ListServiceConfigsRequest { - // Required. The name of the service. See the [overview](/service-management/overview) - // for naming requirements. For example: `example.googleapis.com`. + // Required. The name of the service. See the + // [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + // example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; // The token of the page to retrieve. @@ -360,18 +377,21 @@ message ListServiceConfigsResponse { // Request message for CreateServiceConfig method. message CreateServiceConfigRequest { - // Required. The name of the service. See the [overview](/service-management/overview) - // for naming requirements. For example: `example.googleapis.com`. + // Required. The name of the service. See the + // [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + // example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The service configuration resource. - google.api.Service service_config = 2 [(google.api.field_behavior) = REQUIRED]; + google.api.Service service_config = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for SubmitConfigSource method. message SubmitConfigSourceRequest { - // Required. The name of the service. See the [overview](/service-management/overview) - // for naming requirements. For example: `example.googleapis.com`. + // Required. The name of the service. See the + // [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + // example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The source configuration for the service. @@ -391,8 +411,9 @@ message SubmitConfigSourceResponse { // Request message for 'CreateServiceRollout' message CreateServiceRolloutRequest { - // Required. The name of the service. See the [overview](/service-management/overview) - // for naming requirements. For example: `example.googleapis.com`. + // Required. The name of the service. See the + // [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + // example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The rollout resource. The `service_name` field is output only. @@ -401,8 +422,9 @@ message CreateServiceRolloutRequest { // Request message for 'ListServiceRollouts' message ListServiceRolloutsRequest { - // Required. The name of the service. See the [overview](/service-management/overview) - // for naming requirements. For example: `example.googleapis.com`. + // Required. The name of the service. See the + // [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + // example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; // The token of the page to retrieve. @@ -415,10 +437,10 @@ message ListServiceRolloutsRequest { // Required. Use `filter` to return subset of rollouts. // The following filters are supported: // -- To limit the results to only those in - // [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + // status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', // use filter='status=SUCCESS' // -- To limit the results to those in - // [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + // status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' // or 'FAILED', use filter='status=CANCELLED OR status=FAILED' string filter = 4 [(google.api.field_behavior) = REQUIRED]; } @@ -434,8 +456,9 @@ message ListServiceRolloutsResponse { // Request message for GetServiceRollout method. message GetServiceRolloutRequest { - // Required. The name of the service. See the [overview](/service-management/overview) - // for naming requirements. For example: `example.googleapis.com`. + // Required. The name of the service. See the + // [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + // example: `example.googleapis.com`. string service_name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The id of the rollout resource. diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js index aed8f8a2056..e092f29d6c7 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js @@ -26,8 +26,9 @@ function main(serviceName, serviceConfig) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * overview (https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. */ // const serviceName = 'abc123' /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js index d15ce6a1a8e..153398842d1 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js @@ -26,8 +26,9 @@ function main(serviceName, rollout) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * overview (https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. */ // const serviceName = 'abc123' /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js index 12b4c1dae6a..eb607eb3040 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js @@ -26,8 +26,9 @@ function main(serviceName) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * overview (https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js index 1d535cdc6a0..c974b113cb9 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js @@ -26,8 +26,8 @@ function main(serviceName) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the `ServiceManager` overview for naming - * requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the `ServiceManager` overview for + * naming requirements. For example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js index c71641d944d..f5c150d7cb5 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js @@ -26,8 +26,9 @@ function main(serviceName, configId) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * overview (https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. */ // const serviceName = 'abc123' /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js index de526cc506a..86b9f74eed6 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js @@ -26,8 +26,9 @@ function main(serviceName, rolloutId) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * overview (https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. */ // const serviceName = 'abc123' /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js index b450a3817ce..7619eadfa08 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js @@ -26,8 +26,9 @@ function main(serviceName) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * overview (https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. */ // const serviceName = 'abc123' /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js index e1009d41874..4981b61cf08 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js @@ -26,8 +26,9 @@ function main(serviceName, filter) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * overview (https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. */ // const serviceName = 'abc123' /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js index 006bc9ba011..158176880c9 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js @@ -26,8 +26,9 @@ function main(serviceName, configSource) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * overview (https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. */ // const serviceName = 'abc123' /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js index eae76d05be2..4a16787232d 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js @@ -26,8 +26,9 @@ function main(serviceName) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the service. See the overview (/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * overview (https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. */ // const serviceName = 'abc123' diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json index 324c6d944d4..17b42776967 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json @@ -154,7 +154,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 53, "type": "FULL" } ], @@ -194,7 +194,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 53, "type": "FULL" } ], @@ -234,7 +234,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 63, "type": "FULL" } ], @@ -282,7 +282,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 64, "type": "FULL" } ], @@ -330,7 +330,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 57, "type": "FULL" } ], @@ -374,7 +374,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 64, "type": "FULL" } ], @@ -422,7 +422,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 75, "type": "FULL" } ], @@ -474,7 +474,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 57, "type": "FULL" } ], @@ -518,7 +518,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 58, "type": "FULL" } ], diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index da1dbb97e61..54a6c6d5123 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -42,7 +42,8 @@ import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** - * [Google Service Management API](/service-management/overview) + * [Google Service Management + * API](https://cloud.google.com/service-infrastructure/docs/overview) * @class * @memberof v1 */ @@ -413,8 +414,8 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the `ServiceManager` overview for naming - * requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the `ServiceManager` overview for + * naming requirements. For example: `example.googleapis.com`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -505,8 +506,9 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {string} request.configId * Required. The id of the service configuration resource. * @@ -618,8 +620,9 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {google.api.Service} request.serviceConfig * Required. The service configuration resource. * @param {object} [options] @@ -713,13 +716,15 @@ export class ServiceManagerClient { return this.innerApiCalls.createServiceConfig(request, options, callback); } /** - * Gets a service configuration {@link google.api.servicemanagement.v1.Rollout|rollout}. + * Gets a service configuration + * {@link google.api.servicemanagement.v1.Rollout|rollout}. * * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {string} request.rolloutId * Required. The id of the rollout resource. * @param {object} [options] @@ -1072,16 +1077,19 @@ export class ServiceManagerClient { /** * Deletes a managed service. This method will change the service to the * `Soft-Delete` state for 30 days. Within this period, service producers may - * call {@link google.api.servicemanagement.v1.ServiceManager.UndeleteService|UndeleteService} to restore the service. - * After 30 days, the service will be permanently deleted. + * call + * {@link google.api.servicemanagement.v1.ServiceManager.UndeleteService|UndeleteService} + * to restore the service. After 30 days, the service will be permanently + * deleted. * * Operation * * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1223,8 +1231,9 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1362,7 +1371,8 @@ export class ServiceManagerClient { * Specification). This method stores the source configurations as well as the * generated service configuration. To rollout the service configuration to * other services, - * please call {@link google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout|CreateServiceRollout}. + * please call + * {@link google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout|CreateServiceRollout}. * * Only the 100 most recent configuration sources and ones referenced by * existing service configurtions are kept for each service. The rest will be @@ -1373,8 +1383,9 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {google.api.servicemanagement.v1.ConfigSource} request.configSource * Required. The source configuration for the service. * @param {boolean} [request.validateOnly] @@ -1530,8 +1541,9 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {google.api.servicemanagement.v1.Rollout} request.rollout * Required. The rollout resource. The `service_name` field is output only. * @param {object} [options] @@ -1876,8 +1888,9 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. * @param {number} request.pageSize @@ -1976,8 +1989,9 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. * @param {number} request.pageSize @@ -2024,8 +2038,9 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. * @param {number} request.pageSize @@ -2072,8 +2087,9 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. * @param {number} request.pageSize @@ -2083,10 +2099,10 @@ export class ServiceManagerClient { * Required. Use `filter` to return subset of rollouts. * The following filters are supported: * -- To limit the results to only those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', * use filter='status=SUCCESS' * -- To limit the results to those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -2181,8 +2197,9 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. * @param {number} request.pageSize @@ -2192,10 +2209,10 @@ export class ServiceManagerClient { * Required. Use `filter` to return subset of rollouts. * The following filters are supported: * -- To limit the results to only those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', * use filter='status=SUCCESS' * -- To limit the results to those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -2238,8 +2255,9 @@ export class ServiceManagerClient { * @param {Object} request * The request object that will be sent. * @param {string} request.serviceName - * Required. The name of the service. See the [overview](/service-management/overview) - * for naming requirements. For example: `example.googleapis.com`. + * Required. The name of the service. See the + * [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements. For + * example: `example.googleapis.com`. * @param {string} request.pageToken * The token of the page to retrieve. * @param {number} request.pageSize @@ -2249,10 +2267,10 @@ export class ServiceManagerClient { * Required. Use `filter` to return subset of rollouts. * The following filters are supported: * -- To limit the results to only those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + * status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', * use filter='status=SUCCESS' * -- To limit the results to those in - * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + * status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' * or 'FAILED', use filter='status=CANCELLED OR status=FAILED' * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. From 6592c0d0edf055b307c7ae15a58a8629a29b6999 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 3 May 2022 03:24:15 +0200 Subject: [PATCH 60/85] chore(deps): update dependency @types/mocha to v9 (#134) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.2.1` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/8.2.3/9.1.1) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/compatibility-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/confidence-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-service-management). --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 0d3259fff1e..112be58dadd 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -42,7 +42,7 @@ "google-gax": "^2.24.1" }, "devDependencies": { - "@types/mocha": "^8.2.1", + "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.6.0", From c08f841f952ee70b39e0119e85e1dcdda87fa836 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 6 May 2022 12:22:30 -0700 Subject: [PATCH 61/85] build: update auto approve to v2, remove release autoapproving (#1432) (#136) * build: update auto-approve file to v2 Source-Link: https://github.com/googleapis/synthtool/commit/19eb6fc07dc178a682da6d186dc874017a166438 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b9e4584a1fe3c749e3c37c92497b13dce653b2e694f0261f0610eb0e15941357 Co-authored-by: Owl Bot --- ...adata.google.api.servicemanagement.v1.json | 1144 ++++++++--------- 1 file changed, 572 insertions(+), 572 deletions(-) diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json index 17b42776967..28761111dd1 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json @@ -1,599 +1,599 @@ { - "clientLibrary": { - "name": "nodejs-servicemanagement", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.api.servicemanagement.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_ListServices_async", - "title": "ServiceManager listServices Sample", - "origin": "API_DEFINITION", - "description": " Lists managed services. Returns all public services. For authenticated users, also returns all services the calling user has \"servicemanagement.services.get\" permission for.", - "canonical": true, - "file": "service_manager.list_services.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListServices", - "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServices", - "async": true, - "parameters": [ - { - "name": "producer_project_id", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "consumer_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.api.servicemanagement.v1.ListServicesResponse", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" - }, - "method": { - "shortName": "ListServices", - "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServices", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } + "clientLibrary": { + "name": "nodejs-servicemanagement", + "version": "0.4.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.api.servicemanagement.v1", + "version": "v1" + } + ] }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_GetService_async", - "title": "ServiceManager getService Sample", - "origin": "API_DEFINITION", - "description": " Gets a managed service. Authentication is required unless the service is public.", - "canonical": true, - "file": "service_manager.get_service.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetService", - "fullName": "google.api.servicemanagement.v1.ServiceManager.GetService", - "async": true, - "parameters": [ - { - "name": "service_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.api.servicemanagement.v1.ManagedService", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_ListServices_async", + "title": "ServiceManager listServices Sample", + "origin": "API_DEFINITION", + "description": " Lists managed services. Returns all public services. For authenticated users, also returns all services the calling user has \"servicemanagement.services.get\" permission for.", + "canonical": true, + "file": "service_manager.list_services.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListServices", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServices", + "async": true, + "parameters": [ + { + "name": "producer_project_id", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "consumer_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.servicemanagement.v1.ListServicesResponse", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "ListServices", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServices", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "GetService", - "fullName": "google.api.servicemanagement.v1.ServiceManager.GetService", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } - }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_CreateService_async", - "title": "ServiceManager createService Sample", - "origin": "API_DEFINITION", - "description": " Creates a new managed service. A managed service is immutable, and is subject to mandatory 30-day data retention. You cannot move a service or recreate it within 30 days after deletion. One producer project can own no more than 500 services. For security and reliability purposes, a production service should be hosted in a dedicated producer project. Operation", - "canonical": true, - "file": "service_manager.create_service.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateService", - "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateService", - "async": true, - "parameters": [ - { - "name": "service", - "type": ".google.api.servicemanagement.v1.ManagedService" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_GetService_async", + "title": "ServiceManager getService Sample", + "origin": "API_DEFINITION", + "description": " Gets a managed service. Authentication is required unless the service is public.", + "canonical": true, + "file": "service_manager.get_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetService", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.servicemanagement.v1.ManagedService", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "GetService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetService", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "CreateService", - "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateService", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } - }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_DeleteService_async", - "title": "ServiceManager deleteService Sample", - "origin": "API_DEFINITION", - "description": " Deletes a managed service. This method will change the service to the `Soft-Delete` state for 30 days. Within this period, service producers may call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service. After 30 days, the service will be permanently deleted. Operation", - "canonical": true, - "file": "service_manager.delete_service.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteService", - "fullName": "google.api.servicemanagement.v1.ServiceManager.DeleteService", - "async": true, - "parameters": [ - { - "name": "service_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_CreateService_async", + "title": "ServiceManager createService Sample", + "origin": "API_DEFINITION", + "description": " Creates a new managed service. A managed service is immutable, and is subject to mandatory 30-day data retention. You cannot move a service or recreate it within 30 days after deletion. One producer project can own no more than 500 services. For security and reliability purposes, a production service should be hosted in a dedicated producer project. Operation", + "canonical": true, + "file": "service_manager.create_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateService", + "async": true, + "parameters": [ + { + "name": "service", + "type": ".google.api.servicemanagement.v1.ManagedService" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "CreateService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateService", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "DeleteService", - "fullName": "google.api.servicemanagement.v1.ServiceManager.DeleteService", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } - }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_UndeleteService_async", - "title": "ServiceManager undeleteService Sample", - "origin": "API_DEFINITION", - "description": " Revives a previously deleted managed service. The method restores the service using the configuration at the time the service was deleted. The target service must exist and must have been deleted within the last 30 days. Operation", - "canonical": true, - "file": "service_manager.undelete_service.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UndeleteService", - "fullName": "google.api.servicemanagement.v1.ServiceManager.UndeleteService", - "async": true, - "parameters": [ - { - "name": "service_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_DeleteService_async", + "title": "ServiceManager deleteService Sample", + "origin": "API_DEFINITION", + "description": " Deletes a managed service. This method will change the service to the `Soft-Delete` state for 30 days. Within this period, service producers may call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service. After 30 days, the service will be permanently deleted. Operation", + "canonical": true, + "file": "service_manager.delete_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.DeleteService", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "DeleteService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.DeleteService", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "UndeleteService", - "fullName": "google.api.servicemanagement.v1.ServiceManager.UndeleteService", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } - }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_async", - "title": "ServiceManager listServiceConfigs Sample", - "origin": "API_DEFINITION", - "description": " Lists the history of the service configuration for a managed service, from the newest to the oldest.", - "canonical": true, - "file": "service_manager.list_service_configs.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListServiceConfigs", - "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs", - "async": true, - "parameters": [ - { - "name": "service_name", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.api.servicemanagement.v1.ListServiceConfigsResponse", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_UndeleteService_async", + "title": "ServiceManager undeleteService Sample", + "origin": "API_DEFINITION", + "description": " Revives a previously deleted managed service. The method restores the service using the configuration at the time the service was deleted. The target service must exist and must have been deleted within the last 30 days. Operation", + "canonical": true, + "file": "service_manager.undelete_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UndeleteService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.UndeleteService", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "UndeleteService", + "fullName": "google.api.servicemanagement.v1.ServiceManager.UndeleteService", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "ListServiceConfigs", - "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } - }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_GetServiceConfig_async", - "title": "ServiceManager getServiceConfig Sample", - "origin": "API_DEFINITION", - "description": " Gets a service configuration (version) for a managed service.", - "canonical": true, - "file": "service_manager.get_service_config.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetServiceConfig", - "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceConfig", - "async": true, - "parameters": [ - { - "name": "service_name", - "type": "TYPE_STRING" - }, - { - "name": "config_id", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView" - } - ], - "resultType": ".google.api.Service", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_async", + "title": "ServiceManager listServiceConfigs Sample", + "origin": "API_DEFINITION", + "description": " Lists the history of the service configuration for a managed service, from the newest to the oldest.", + "canonical": true, + "file": "service_manager.list_service_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListServiceConfigs", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.api.servicemanagement.v1.ListServiceConfigsResponse", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "ListServiceConfigs", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "GetServiceConfig", - "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceConfig", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } - }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_async", - "title": "ServiceManager createServiceConfig Sample", - "origin": "API_DEFINITION", - "description": " Creates a new service configuration (version) for a managed service. This method only stores the service configuration. To roll out the service configuration to backend systems please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.", - "canonical": true, - "file": "service_manager.create_service_config.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateServiceConfig", - "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig", - "async": true, - "parameters": [ - { - "name": "service_name", - "type": "TYPE_STRING" - }, - { - "name": "service_config", - "type": ".google.api.Service" - } - ], - "resultType": ".google.api.Service", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_GetServiceConfig_async", + "title": "ServiceManager getServiceConfig Sample", + "origin": "API_DEFINITION", + "description": " Gets a service configuration (version) for a managed service.", + "canonical": true, + "file": "service_manager.get_service_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetServiceConfig", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceConfig", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "config_id", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView" + } + ], + "resultType": ".google.api.Service", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "GetServiceConfig", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceConfig", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "CreateServiceConfig", - "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } - }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_async", - "title": "ServiceManager submitConfigSource Sample", - "origin": "API_DEFINITION", - "description": " Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification). This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually. Operation", - "canonical": true, - "file": "service_manager.submit_config_source.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SubmitConfigSource", - "fullName": "google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource", - "async": true, - "parameters": [ - { - "name": "service_name", - "type": "TYPE_STRING" - }, - { - "name": "config_source", - "type": ".google.api.servicemanagement.v1.ConfigSource" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_async", + "title": "ServiceManager createServiceConfig Sample", + "origin": "API_DEFINITION", + "description": " Creates a new service configuration (version) for a managed service. This method only stores the service configuration. To roll out the service configuration to backend systems please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.", + "canonical": true, + "file": "service_manager.create_service_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateServiceConfig", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "service_config", + "type": ".google.api.Service" + } + ], + "resultType": ".google.api.Service", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "CreateServiceConfig", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "SubmitConfigSource", - "fullName": "google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } - }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_async", - "title": "ServiceManager listServiceRollouts Sample", - "origin": "API_DEFINITION", - "description": " Lists the history of the service configuration rollouts for a managed service, from the newest to the oldest.", - "canonical": true, - "file": "service_manager.list_service_rollouts.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListServiceRollouts", - "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts", - "async": true, - "parameters": [ - { - "name": "service_name", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.api.servicemanagement.v1.ListServiceRolloutsResponse", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_async", + "title": "ServiceManager submitConfigSource Sample", + "origin": "API_DEFINITION", + "description": " Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification). This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually. Operation", + "canonical": true, + "file": "service_manager.submit_config_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SubmitConfigSource", + "fullName": "google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "config_source", + "type": ".google.api.servicemanagement.v1.ConfigSource" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "SubmitConfigSource", + "fullName": "google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "ListServiceRollouts", - "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } - }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_GetServiceRollout_async", - "title": "ServiceManager getServiceRollout Sample", - "origin": "API_DEFINITION", - "description": " Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout].", - "canonical": true, - "file": "service_manager.get_service_rollout.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetServiceRollout", - "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceRollout", - "async": true, - "parameters": [ - { - "name": "service_name", - "type": "TYPE_STRING" - }, - { - "name": "rollout_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.api.servicemanagement.v1.Rollout", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_async", + "title": "ServiceManager listServiceRollouts Sample", + "origin": "API_DEFINITION", + "description": " Lists the history of the service configuration rollouts for a managed service, from the newest to the oldest.", + "canonical": true, + "file": "service_manager.list_service_rollouts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListServiceRollouts", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.servicemanagement.v1.ListServiceRolloutsResponse", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "ListServiceRollouts", + "fullName": "google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "GetServiceRollout", - "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceRollout", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } - }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_async", - "title": "ServiceManager createServiceRollout Sample", - "origin": "API_DEFINITION", - "description": " Creates a new service configuration rollout. Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging. Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts. Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each service. The rest will be deleted eventually. Operation", - "canonical": true, - "file": "service_manager.create_service_rollout.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateServiceRollout", - "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout", - "async": true, - "parameters": [ - { - "name": "service_name", - "type": "TYPE_STRING" - }, - { - "name": "rollout", - "type": ".google.api.servicemanagement.v1.Rollout" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_GetServiceRollout_async", + "title": "ServiceManager getServiceRollout Sample", + "origin": "API_DEFINITION", + "description": " Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout].", + "canonical": true, + "file": "service_manager.get_service_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetServiceRollout", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceRollout", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "rollout_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.servicemanagement.v1.Rollout", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "GetServiceRollout", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GetServiceRollout", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "CreateServiceRollout", - "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } - } - } - }, - { - "regionTag": "servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_async", - "title": "ServiceManager generateConfigReport Sample", - "origin": "API_DEFINITION", - "description": " Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration.", - "canonical": true, - "file": "service_manager.generate_config_report.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateConfigReport", - "fullName": "google.api.servicemanagement.v1.ServiceManager.GenerateConfigReport", - "async": true, - "parameters": [ - { - "name": "new_config", - "type": ".google.protobuf.Any" - }, - { - "name": "old_config", - "type": ".google.protobuf.Any" - } - ], - "resultType": ".google.api.servicemanagement.v1.GenerateConfigReportResponse", - "client": { - "shortName": "ServiceManagerClient", - "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + "regionTag": "servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_async", + "title": "ServiceManager createServiceRollout Sample", + "origin": "API_DEFINITION", + "description": " Creates a new service configuration rollout. Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging. Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts. Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each service. The rest will be deleted eventually. Operation", + "canonical": true, + "file": "service_manager.create_service_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateServiceRollout", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout", + "async": true, + "parameters": [ + { + "name": "service_name", + "type": "TYPE_STRING" + }, + { + "name": "rollout", + "type": ".google.api.servicemanagement.v1.Rollout" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "CreateServiceRollout", + "fullName": "google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } }, - "method": { - "shortName": "GenerateConfigReport", - "fullName": "google.api.servicemanagement.v1.ServiceManager.GenerateConfigReport", - "service": { - "shortName": "ServiceManager", - "fullName": "google.api.servicemanagement.v1.ServiceManager" - } + { + "regionTag": "servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_async", + "title": "ServiceManager generateConfigReport Sample", + "origin": "API_DEFINITION", + "description": " Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration.", + "canonical": true, + "file": "service_manager.generate_config_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateConfigReport", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GenerateConfigReport", + "async": true, + "parameters": [ + { + "name": "new_config", + "type": ".google.protobuf.Any" + }, + { + "name": "old_config", + "type": ".google.protobuf.Any" + } + ], + "resultType": ".google.api.servicemanagement.v1.GenerateConfigReportResponse", + "client": { + "shortName": "ServiceManagerClient", + "fullName": "google.api.servicemanagement.v1.ServiceManagerClient" + }, + "method": { + "shortName": "GenerateConfigReport", + "fullName": "google.api.servicemanagement.v1.ServiceManager.GenerateConfigReport", + "service": { + "shortName": "ServiceManager", + "fullName": "google.api.servicemanagement.v1.ServiceManager" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From 013e919e3b8dddbd2f9383aa073741b2efc52766 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:36:26 +0200 Subject: [PATCH 62/85] chore(deps): update dependency sinon to v14 (#137) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-service-management). --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 112be58dadd..a1f04c34dde 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -54,7 +54,7 @@ "mocha": "^8.3.1", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.0.0", "typescript": "^4.2.3", "webpack": "^5.24.4", From d3831d3bf1c0521fa7d711fbb75044e6204afe40 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Thu, 19 May 2022 17:35:23 -0700 Subject: [PATCH 63/85] build!: update library to use Node 12 (#138) * build!: Update library to use Node 12 Co-authored-by: Owl Bot --- packages/google-api-servicemanagement/package.json | 8 ++++---- .../google-api-servicemanagement/samples/package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index a1f04c34dde..79d0e90d343 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.24.1" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", @@ -51,16 +51,16 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", - "mocha": "^8.3.1", + "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.0.0", - "typescript": "^4.2.3", + "typescript": "^4.6.4", "webpack": "^5.24.4", "webpack-cli": "^4.5.0" }, "engines": { - "node": ">=v10.0.0" + "node": ">=12.0.0" } } diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 1cf4a8d493d..15cf17cd8e3 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "files": [ "*.js" @@ -20,4 +20,4 @@ "chai": "^4.2.0", "mocha": "^8.0.0" } -} +} \ No newline at end of file From e0515601650611630418a2e6730690e459e25a6a Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Fri, 20 May 2022 12:31:41 -0700 Subject: [PATCH 64/85] feat!: promote to stable (#140) * feat!: promote to stable --- .../google-api-servicemanagement/.repo-metadata.json | 2 +- packages/google-api-servicemanagement/README.md | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/google-api-servicemanagement/.repo-metadata.json b/packages/google-api-servicemanagement/.repo-metadata.json index ed48400e1d8..3d7bc77f36e 100644 --- a/packages/google-api-servicemanagement/.repo-metadata.json +++ b/packages/google-api-servicemanagement/.repo-metadata.json @@ -4,7 +4,7 @@ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/service-management/latest", "product_documentation": "https://cloud.google.com/service-infrastructure/docs/overview/", "name_pretty": "Service Management API", - "release_level": "preview", + "release_level": "stable", "default_version": "v1", "name": "service-management", "api_id": "servicemanagement.googleapis.com", diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index 55c8fefe2c9..30f8741a145 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -4,7 +4,7 @@ # [Service Management API: Node.js Client](https://github.com/googleapis/nodejs-service-management) -[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/service-management.svg)](https://www.npmjs.org/package/@google-cloud/service-management) @@ -119,13 +119,14 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority. -This library is considered to be in **preview**. This means it is still a -work-in-progress and under active development. Any release is subject to -backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] From 5bd7e4298a4812707c82ffb494be988d8bb71c43 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 31 May 2022 22:14:24 +0000 Subject: [PATCH 65/85] fix: fixes for dynamic routing and streaming descriptors (#142) - [ ] Regenerate this pull request now. Use gapic-generator-typescript v2.14.5. PiperOrigin-RevId: 450616838 Source-Link: https://github.com/googleapis/googleapis/commit/7a47b72791e0b84d78beca4c2b26bec42ce31572 Source-Link: https://github.com/googleapis/googleapis-gen/commit/42cc6331bae0b99f61b8e01ae15b05211716c4f9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDJjYzYzMzFiYWUwYjk5ZjYxYjhlMDFhZTE1YjA1MjExNzE2YzRmOSJ9 --- .../src/v1/service_manager_client.ts | 2 ++ .../test/gapic_service_manager_v1.ts | 20 +++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index 54a6c6d5123..606a4ee6b35 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -603,6 +603,7 @@ export class ServiceManagerClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ service_name: request.serviceName || '', + config_id: request.configId || '', }); this.initialize(); return this.innerApiCalls.getServiceConfig(request, options, callback); @@ -813,6 +814,7 @@ export class ServiceManagerClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ service_name: request.serviceName || '', + rollout_id: request.rolloutId || '', }); this.initialize(); return this.innerApiCalls.getServiceRollout(request, options, callback); diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index c9ccbc60fe4..bf7f6b6db2e 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -379,7 +379,8 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + request.configId = ''; + const expectedHeaderRequestParams = 'service_name=&config_id='; const expectedOptions = { otherArgs: { headers: { @@ -410,7 +411,8 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + request.configId = ''; + const expectedHeaderRequestParams = 'service_name=&config_id='; const expectedOptions = { otherArgs: { headers: { @@ -454,7 +456,8 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + request.configId = ''; + const expectedHeaderRequestParams = 'service_name=&config_id='; const expectedOptions = { otherArgs: { headers: { @@ -485,6 +488,7 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); request.serviceName = ''; + request.configId = ''; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getServiceConfig(request), expectedError); @@ -626,7 +630,8 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + request.rolloutId = ''; + const expectedHeaderRequestParams = 'service_name=&rollout_id='; const expectedOptions = { otherArgs: { headers: { @@ -657,7 +662,8 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + request.rolloutId = ''; + const expectedHeaderRequestParams = 'service_name=&rollout_id='; const expectedOptions = { otherArgs: { headers: { @@ -704,7 +710,8 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + request.rolloutId = ''; + const expectedHeaderRequestParams = 'service_name=&rollout_id='; const expectedOptions = { otherArgs: { headers: { @@ -735,6 +742,7 @@ describe('v1.ServiceManagerClient', () => { new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); request.serviceName = ''; + request.rolloutId = ''; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getServiceRollout(request), expectedError); From 1b1599f33bde45077ecfd9c321ee6501656391d7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 12:02:37 -0400 Subject: [PATCH 66/85] chore(main): release 1.0.0 (#141) 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 --- .../google-api-servicemanagement/CHANGELOG.md | 22 +++++++++++++++++++ .../google-api-servicemanagement/package.json | 2 +- ...adata.google.api.servicemanagement.v1.json | 2 +- .../samples/package.json | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index 08eb645595b..2beca8b082d 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [1.0.0](https://github.com/googleapis/nodejs-service-management/compare/v0.4.0...v1.0.0) (2022-05-31) + + +### ⚠ BREAKING CHANGES + +* promote to stable (#140) +* update library to use Node 12 (#138) + +### Features + +* promote to stable ([#140](https://github.com/googleapis/nodejs-service-management/issues/140)) ([f40509e](https://github.com/googleapis/nodejs-service-management/commit/f40509ee35dbafff16e4300d2173be5c41abacf4)) + + +### Bug Fixes + +* fixes for dynamic routing and streaming descriptors ([#142](https://github.com/googleapis/nodejs-service-management/issues/142)) ([6d02ca8](https://github.com/googleapis/nodejs-service-management/commit/6d02ca800a29eb3b6383127efe43ad8e603992c3)) + + +### Build System + +* update library to use Node 12 ([#138](https://github.com/googleapis/nodejs-service-management/issues/138)) ([a9eed29](https://github.com/googleapis/nodejs-service-management/commit/a9eed29598c8b56d4c80161d0046be0db4430c66)) + ## [0.4.0](https://github.com/googleapis/nodejs-service-management/compare/v0.3.1...v0.4.0) (2022-03-08) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 79d0e90d343..3d9795940de 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "0.4.0", + "version": "1.0.0", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json index 28761111dd1..c7eae7c84f2 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicemanagement", - "version": "0.4.0", + "version": "1.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 15cf17cd8e3..f79bc382456 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^0.4.0" + "@google-cloud/service-management": "^1.0.0" }, "devDependencies": { "c8": "^7.1.0", From 0fe6f0ef40f7bfe3a0d566fe864b7a5fe3089c4f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 16:56:33 +0200 Subject: [PATCH 67/85] chore(deps): update dependency jsdoc-fresh to v2 (#147) 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-service-management). --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 3d9795940de..44a8a55bf3d 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -48,7 +48,7 @@ "c8": "^7.6.0", "gts": "^3.1.0", "jsdoc": "^3.6.6", - "jsdoc-fresh": "^1.0.2", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", "mocha": "^9.2.2", From 240ff04c1ecf0082c2a6b7980b9e8fef377c803b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 17:32:24 +0200 Subject: [PATCH 68/85] chore(deps): update dependency jsdoc-region-tag to v2 (#148) 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-service-management). --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 44a8a55bf3d..57f4b7b4548 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -49,7 +49,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^1.0.6", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.13.6", "mocha": "^9.2.2", "null-loader": "^4.0.1", From 7cb193e268b1cf07126c5de39517bb1745a0ed90 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 17:25:40 -0700 Subject: [PATCH 69/85] feat: support regapic LRO (#154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: support regapic LRO Use gapic-generator-typescript v2.15.1. PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/service_manager_client.ts | 65 +++++++++++++++---- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index 606a4ee6b35..60b63951e42 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, LROperation, PaginationCallback, GaxCall, @@ -72,7 +73,7 @@ export class ServiceManagerClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -95,11 +96,10 @@ export class ServiceManagerClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. @@ -184,16 +184,57 @@ export class ServiceManagerClient { }; 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.iam.v1.IAMPolicy.GetIamPolicy', + post: '/v1/{resource=services/*}:getIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=services/*/consumers/*}:getIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1/{resource=services/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=services/*/consumers/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1/{resource=services/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=services/*/consumers/*}:testIamPermissions', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/operations', + }, + ]; + } this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) + .lro(lroOptions) .operationsClient(opts); const createServiceResponse = protoFilesRoot.lookup( '.google.api.servicemanagement.v1.ManagedService' From 4a2fa4ffd2a0539997f4f206c5893cd11ceed89d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 19:12:11 +0000 Subject: [PATCH 70/85] chore(main): release 1.1.0 (#157) :robot: I have created a release *beep* *boop* --- ## [1.1.0](https://github.com/googleapis/nodejs-service-management/compare/v1.0.0...v1.1.0) (2022-06-30) ### Features * support regapic LRO ([#154](https://github.com/googleapis/nodejs-service-management/issues/154)) ([9871067](https://github.com/googleapis/nodejs-service-management/commit/9871067a828e4ec332906f2013956f9b2ade2b00)) --- 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-api-servicemanagement/CHANGELOG.md | 7 +++++++ packages/google-api-servicemanagement/package.json | 2 +- .../snippet_metadata.google.api.servicemanagement.v1.json | 2 +- packages/google-api-servicemanagement/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index 2beca8b082d..4be7190a817 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.0](https://github.com/googleapis/nodejs-service-management/compare/v1.0.0...v1.1.0) (2022-06-30) + + +### Features + +* support regapic LRO ([#154](https://github.com/googleapis/nodejs-service-management/issues/154)) ([9871067](https://github.com/googleapis/nodejs-service-management/commit/9871067a828e4ec332906f2013956f9b2ade2b00)) + ## [1.0.0](https://github.com/googleapis/nodejs-service-management/compare/v0.4.0...v1.0.0) (2022-05-31) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 57f4b7b4548..dd491bd2bdb 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "1.0.0", + "version": "1.1.0", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json index c7eae7c84f2..3c9dd9af96c 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicemanagement", - "version": "1.0.0", + "version": "1.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index f79bc382456..2759c0ff529 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^1.0.0" + "@google-cloud/service-management": "^1.1.0" }, "devDependencies": { "c8": "^7.1.0", From d7ad618722cedfd68a430166ddd3b4794533aad8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jul 2022 01:58:33 +0200 Subject: [PATCH 71/85] chore(deps): update dependency linkinator to v4 (#160) 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-service-management). --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index dd491bd2bdb..d949b89df8a 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -50,7 +50,7 @@ "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.13.6", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", From 7e04ef1ccc5ec7946c7be5aaec9497c8b05cb9fd 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:06:35 +0000 Subject: [PATCH 72/85] fix: better support for fallback mode (#161) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- .../v1/service_manager.create_service.js | 3 + .../service_manager.create_service_config.js | 3 + .../service_manager.create_service_rollout.js | 3 + .../v1/service_manager.delete_service.js | 3 + .../service_manager.generate_config_report.js | 3 + .../v1/service_manager.get_service.js | 3 + .../v1/service_manager.get_service_config.js | 3 + .../v1/service_manager.get_service_rollout.js | 3 + .../service_manager.list_service_configs.js | 3 + .../service_manager.list_service_rollouts.js | 3 + .../v1/service_manager.list_services.js | 3 + .../service_manager.submit_config_source.js | 3 + .../v1/service_manager.undelete_service.js | 3 + ...adata.google.api.servicemanagement.v1.json | 26 +-- .../src/v1/service_manager_client.ts | 26 +-- .../test/gapic_service_manager_v1.ts | 160 +++++++++--------- 16 files changed, 146 insertions(+), 105 deletions(-) diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js index 26c31d0abe4..a9fcf4fc20d 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js @@ -23,6 +23,9 @@ function main(service) { // [START servicemanagement_v1_generated_ServiceManager_CreateService_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js index e092f29d6c7..1cf81c15105 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js @@ -23,6 +23,9 @@ function main(serviceName, serviceConfig) { // [START servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js index 153398842d1..fe8e14c270e 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js @@ -23,6 +23,9 @@ function main(serviceName, rollout) { // [START servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js index eb607eb3040..ba386177382 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js @@ -23,6 +23,9 @@ function main(serviceName) { // [START servicemanagement_v1_generated_ServiceManager_DeleteService_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js index 8b3b0db76c2..03315096a9c 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js @@ -23,6 +23,9 @@ function main(newConfig) { // [START servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js index c974b113cb9..25b6670c01e 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js @@ -23,6 +23,9 @@ function main(serviceName) { // [START servicemanagement_v1_generated_ServiceManager_GetService_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js index f5c150d7cb5..51c0f56c3a8 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js @@ -23,6 +23,9 @@ function main(serviceName, configId) { // [START servicemanagement_v1_generated_ServiceManager_GetServiceConfig_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js index 86b9f74eed6..4c2a17e7a6f 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js @@ -23,6 +23,9 @@ function main(serviceName, rolloutId) { // [START servicemanagement_v1_generated_ServiceManager_GetServiceRollout_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js index 7619eadfa08..7c3492af58e 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js @@ -23,6 +23,9 @@ function main(serviceName) { // [START servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js index 4981b61cf08..0bebade3bbf 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js @@ -23,6 +23,9 @@ function main(serviceName, filter) { // [START servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js index a260fd2de1e..3d5e480326a 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js @@ -23,6 +23,9 @@ function main() { // [START servicemanagement_v1_generated_ServiceManager_ListServices_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js index 158176880c9..1cdfda4e0af 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js @@ -23,6 +23,9 @@ function main(serviceName, configSource) { // [START servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js index 4a16787232d..559fcf7940e 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js +++ b/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js @@ -23,6 +23,9 @@ function main(serviceName) { // [START servicemanagement_v1_generated_ServiceManager_UndeleteService_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json index 3c9dd9af96c..d8d41de82ff 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -74,7 +74,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -114,7 +114,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -154,7 +154,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], @@ -194,7 +194,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], @@ -234,7 +234,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -282,7 +282,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -330,7 +330,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -374,7 +374,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -422,7 +422,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 78, "type": "FULL" } ], @@ -474,7 +474,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -518,7 +518,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -562,7 +562,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index 60b63951e42..eab60b33ad8 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -381,7 +380,8 @@ export class ServiceManagerClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1110,7 +1110,7 @@ export class ServiceManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createService, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.servicemanagement.v1.ManagedService, @@ -1256,7 +1256,7 @@ export class ServiceManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteService, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1400,7 +1400,7 @@ export class ServiceManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.undeleteService, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.servicemanagement.v1.UndeleteServiceResponse, @@ -1558,7 +1558,7 @@ export class ServiceManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.submitConfigSource, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.servicemanagement.v1.SubmitConfigSourceResponse, @@ -1712,7 +1712,7 @@ export class ServiceManagerClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createServiceRollout, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.servicemanagement.v1.Rollout, @@ -1868,7 +1868,7 @@ export class ServiceManagerClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listServices.createStream( - this.innerApiCalls.listServices as gax.GaxCall, + this.innerApiCalls.listServices as GaxCall, request, callSettings ); @@ -1920,7 +1920,7 @@ export class ServiceManagerClient { this.initialize(); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2068,7 +2068,7 @@ export class ServiceManagerClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listServiceConfigs.createStream( - this.innerApiCalls.listServiceConfigs as gax.GaxCall, + this.innerApiCalls.listServiceConfigs as GaxCall, request, callSettings ); @@ -2119,7 +2119,7 @@ export class ServiceManagerClient { this.initialize(); return this.descriptors.page.listServiceConfigs.asyncIterate( this.innerApiCalls['listServiceConfigs'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2285,7 +2285,7 @@ export class ServiceManagerClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listServiceRollouts.createStream( - this.innerApiCalls.listServiceRollouts as gax.GaxCall, + this.innerApiCalls.listServiceRollouts as GaxCall, request, callSettings ); @@ -2345,7 +2345,7 @@ export class ServiceManagerClient { this.initialize(); return this.descriptors.page.listServiceRollouts.asyncIterate( this.innerApiCalls['listServiceRollouts'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index bf7f6b6db2e..de810908106 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -145,101 +145,103 @@ function stubAsyncIterationCall( } describe('v1.ServiceManagerClient', () => { - it('has servicePath', () => { - const servicePath = - servicemanagerModule.v1.ServiceManagerClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - servicemanagerModule.v1.ServiceManagerClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = servicemanagerModule.v1.ServiceManagerClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + servicemanagerModule.v1.ServiceManagerClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new servicemanagerModule.v1.ServiceManagerClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + servicemanagerModule.v1.ServiceManagerClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - fallback: true, + it('has port', () => { + const port = servicemanagerModule.v1.ServiceManagerClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new servicemanagerModule.v1.ServiceManagerClient(); + assert(client); }); - assert.strictEqual(client.serviceManagerStub, undefined); - await client.initialize(); - assert(client.serviceManagerStub); - }); - it('has close method for the initialized client', done => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.serviceManagerStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.serviceManagerStub, undefined); + await client.initialize(); + assert(client.serviceManagerStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.serviceManagerStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.serviceManagerStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new servicemanagerModule.v1.ServiceManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.serviceManagerStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new servicemanagerModule.v1.ServiceManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new servicemanagerModule.v1.ServiceManagerClient({ + 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 servicemanagerModule.v1.ServiceManagerClient({ - 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 servicemanagerModule.v1.ServiceManagerClient({ + 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('getService', () => { From 2ce2f8a9588f3b702213253cb0c4ae48fd2b5967 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 07:42:24 +0000 Subject: [PATCH 73/85] fix: change import long to require (#162) 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 | 2932 ++-- .../protos/protos.js | 11603 +++++++++------- .../protos/protos.json | 381 +- 3 files changed, 8718 insertions(+), 6198 deletions(-) diff --git a/packages/google-api-servicemanagement/protos/protos.d.ts b/packages/google-api-servicemanagement/protos/protos.d.ts index 9ae5927b271..4cd17fcad0e 100644 --- a/packages/google-api-servicemanagement/protos/protos.d.ts +++ b/packages/google-api-servicemanagement/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -120,6 +120,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ManagedService + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationMetadata. */ @@ -228,6 +235,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; } namespace OperationMetadata { @@ -326,6 +340,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Step + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Status enum. */ @@ -439,6 +460,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Diagnostic + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Diagnostic { @@ -544,6 +572,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfigSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ConfigFile. */ @@ -646,6 +681,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfigFile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ConfigFile { @@ -749,6 +791,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfigRef + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ChangeReport. */ @@ -839,6 +888,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChangeReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Rollout. */ @@ -968,6 +1024,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rollout + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Rollout { @@ -1060,6 +1123,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TrafficPercentStrategy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteServiceStrategy. */ @@ -1144,6 +1214,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteServiceStrategy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** RolloutStatus enum. */ @@ -1364,91 +1441,91 @@ export namespace google { namespace ServiceManager { /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServices}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|listServices}. * @param error Error, if any * @param [response] ListServicesResponse */ type ListServicesCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.ListServicesResponse) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getService}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|getService}. * @param error Error, if any * @param [response] ManagedService */ type GetServiceCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.ManagedService) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createService}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|createService}. * @param error Error, if any * @param [response] Operation */ type CreateServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#deleteService}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|deleteService}. * @param error Error, if any * @param [response] Operation */ type DeleteServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#undeleteService}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|undeleteService}. * @param error Error, if any * @param [response] Operation */ type UndeleteServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServiceConfigs}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|listServiceConfigs}. * @param error Error, if any * @param [response] ListServiceConfigsResponse */ type ListServiceConfigsCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.ListServiceConfigsResponse) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getServiceConfig}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|getServiceConfig}. * @param error Error, if any * @param [response] Service */ type GetServiceConfigCallback = (error: (Error|null), response?: google.api.Service) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createServiceConfig}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|createServiceConfig}. * @param error Error, if any * @param [response] Service */ type CreateServiceConfigCallback = (error: (Error|null), response?: google.api.Service) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#submitConfigSource}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|submitConfigSource}. * @param error Error, if any * @param [response] Operation */ type SubmitConfigSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServiceRollouts}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|listServiceRollouts}. * @param error Error, if any * @param [response] ListServiceRolloutsResponse */ type ListServiceRolloutsCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.ListServiceRolloutsResponse) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getServiceRollout}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|getServiceRollout}. * @param error Error, if any * @param [response] Rollout */ type GetServiceRolloutCallback = (error: (Error|null), response?: google.api.servicemanagement.v1.Rollout) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createServiceRollout}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|createServiceRollout}. * @param error Error, if any * @param [response] Operation */ type CreateServiceRolloutCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#generateConfigReport}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|generateConfigReport}. * @param error Error, if any * @param [response] GenerateConfigReportResponse */ @@ -1561,6 +1638,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServicesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListServicesResponse. */ @@ -1657,6 +1741,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServicesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetServiceRequest. */ @@ -1747,6 +1838,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateServiceRequest. */ @@ -1837,6 +1935,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteServiceRequest. */ @@ -1927,6 +2032,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UndeleteServiceRequest. */ @@ -2017,6 +2129,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UndeleteServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UndeleteServiceResponse. */ @@ -2107,6 +2226,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UndeleteServiceResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetServiceConfigRequest. */ @@ -2209,6 +2335,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetServiceConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GetServiceConfigRequest { @@ -2320,6 +2453,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServiceConfigsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListServiceConfigsResponse. */ @@ -2416,6 +2556,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServiceConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateServiceConfigRequest. */ @@ -2512,6 +2659,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateServiceConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SubmitConfigSourceRequest. */ @@ -2614,6 +2768,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitConfigSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SubmitConfigSourceResponse. */ @@ -2704,6 +2865,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitConfigSourceResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateServiceRolloutRequest. */ @@ -2800,6 +2968,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateServiceRolloutRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListServiceRolloutsRequest. */ @@ -2908,6 +3083,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServiceRolloutsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListServiceRolloutsResponse. */ @@ -3004,6 +3186,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServiceRolloutsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetServiceRolloutRequest. */ @@ -3100,6 +3289,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetServiceRolloutRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GenerateConfigReportRequest. */ @@ -3196,6 +3392,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateConfigReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GenerateConfigReportResponse. */ @@ -3304,6 +3507,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateConfigReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -3420,6 +3630,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfigChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Advice. */ @@ -3510,6 +3727,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Advice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** ChangeType enum. */ @@ -3626,6 +3850,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. */ @@ -3773,6 +4004,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. */ @@ -3869,6 +4107,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Service. */ @@ -4103,6 +4348,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Service + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Authentication. */ @@ -4199,6 +4451,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Authentication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AuthenticationRule. */ @@ -4307,6 +4566,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthenticationRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a JwtLocation. */ @@ -4412,6 +4678,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JwtLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AuthProvider. */ @@ -4532,6 +4805,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthProvider + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a OAuthRequirements. */ @@ -4622,6 +4902,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OAuthRequirements + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AuthRequirement. */ @@ -4718,6 +5005,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthRequirement + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Backend. */ @@ -4808,6 +5102,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Backend + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BackendRule. */ @@ -4949,6 +5250,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackendRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BackendRule { @@ -5049,6 +5357,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Billing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Billing { @@ -5147,1530 +5462,1635 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BillingDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } - /** Properties of a MetricDescriptor. */ - interface IMetricDescriptor { - - /** MetricDescriptor name */ - name?: (string|null); - - /** MetricDescriptor type */ - type?: (string|null); - - /** MetricDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); - - /** MetricDescriptor metricKind */ - metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); - - /** MetricDescriptor valueType */ - valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); - - /** MetricDescriptor unit */ - unit?: (string|null); - - /** MetricDescriptor description */ - description?: (string|null); - - /** MetricDescriptor displayName */ - displayName?: (string|null); - - /** MetricDescriptor metadata */ - metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); - - /** MetricDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + /** Properties of a Context. */ + interface IContext { - /** MetricDescriptor monitoredResourceTypes */ - monitoredResourceTypes?: (string[]|null); + /** Context rules */ + rules?: (google.api.IContextRule[]|null); } - /** Represents a MetricDescriptor. */ - class MetricDescriptor implements IMetricDescriptor { + /** Represents a Context. */ + class Context implements IContext { /** - * Constructs a new MetricDescriptor. + * Constructs a new Context. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMetricDescriptor); - - /** MetricDescriptor name. */ - public name: string; - - /** MetricDescriptor type. */ - public type: string; - - /** MetricDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; - - /** MetricDescriptor metricKind. */ - public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); - - /** MetricDescriptor valueType. */ - public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); - - /** MetricDescriptor unit. */ - public unit: string; - - /** MetricDescriptor description. */ - public description: string; - - /** MetricDescriptor displayName. */ - public displayName: string; - - /** MetricDescriptor metadata. */ - public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); - - /** MetricDescriptor launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + constructor(properties?: google.api.IContext); - /** MetricDescriptor monitoredResourceTypes. */ - public monitoredResourceTypes: string[]; + /** Context rules. */ + public rules: google.api.IContextRule[]; /** - * Creates a new MetricDescriptor instance using the specified properties. + * Creates a new Context instance using the specified properties. * @param [properties] Properties to set - * @returns MetricDescriptor instance + * @returns Context instance */ - public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; + public static create(properties?: google.api.IContext): google.api.Context; /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode + * Encodes the specified Context message. Does not implicitly {@link google.api.Context.verify|verify} messages. + * @param message Context message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.api.Context.verify|verify} messages. + * @param message Context message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetricDescriptor message from the specified reader or buffer. + * Decodes a Context message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetricDescriptor + * @returns Context * @throws {Error} If the payload is not 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.MetricDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Context; /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Context message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetricDescriptor + * @returns Context * @throws {Error} If the payload 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.MetricDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Context; /** - * Verifies a MetricDescriptor message. + * Verifies a Context message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Context message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetricDescriptor + * @returns Context */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.Context; /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. - * @param message MetricDescriptor + * Creates a plain object from a Context message. Also converts values to other types if specified. + * @param message Context * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Context, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetricDescriptor to JSON. + * Converts this Context to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - namespace MetricDescriptor { - - /** Properties of a MetricDescriptorMetadata. */ - interface IMetricDescriptorMetadata { - - /** MetricDescriptorMetadata launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** MetricDescriptorMetadata samplePeriod */ - samplePeriod?: (google.protobuf.IDuration|null); - - /** MetricDescriptorMetadata ingestDelay */ - ingestDelay?: (google.protobuf.IDuration|null); - } - - /** Represents a MetricDescriptorMetadata. */ - class MetricDescriptorMetadata implements IMetricDescriptorMetadata { - - /** - * Constructs a new MetricDescriptorMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); - - /** MetricDescriptorMetadata launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** MetricDescriptorMetadata samplePeriod. */ - public samplePeriod?: (google.protobuf.IDuration|null); - - /** MetricDescriptorMetadata ingestDelay. */ - public ingestDelay?: (google.protobuf.IDuration|null); - - /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricDescriptorMetadata instance - */ - public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricDescriptorMetadata - * @throws {Error} If the payload is not 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.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricDescriptorMetadata - * @throws {Error} If the payload 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.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Verifies a MetricDescriptorMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricDescriptorMetadata - */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; - /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @param message MetricDescriptorMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for Context + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this MetricDescriptorMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a ContextRule. */ + interface IContextRule { - /** MetricKind enum. */ - enum MetricKind { - METRIC_KIND_UNSPECIFIED = 0, - GAUGE = 1, - DELTA = 2, - CUMULATIVE = 3 - } + /** ContextRule selector */ + selector?: (string|null); - /** ValueType enum. */ - enum ValueType { - VALUE_TYPE_UNSPECIFIED = 0, - BOOL = 1, - INT64 = 2, - DOUBLE = 3, - STRING = 4, - DISTRIBUTION = 5, - MONEY = 6 - } - } + /** ContextRule requested */ + requested?: (string[]|null); - /** Properties of a Metric. */ - interface IMetric { + /** ContextRule provided */ + provided?: (string[]|null); - /** Metric type */ - type?: (string|null); + /** ContextRule allowedRequestExtensions */ + allowedRequestExtensions?: (string[]|null); - /** Metric labels */ - labels?: ({ [k: string]: string }|null); + /** ContextRule allowedResponseExtensions */ + allowedResponseExtensions?: (string[]|null); } - /** Represents a Metric. */ - class Metric implements IMetric { + /** Represents a ContextRule. */ + class ContextRule implements IContextRule { /** - * Constructs a new Metric. + * Constructs a new ContextRule. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMetric); + constructor(properties?: google.api.IContextRule); - /** Metric type. */ - public type: string; + /** ContextRule selector. */ + public selector: string; - /** Metric labels. */ - public labels: { [k: string]: string }; + /** ContextRule requested. */ + public requested: string[]; + + /** ContextRule provided. */ + public provided: string[]; + + /** ContextRule allowedRequestExtensions. */ + public allowedRequestExtensions: string[]; + + /** ContextRule allowedResponseExtensions. */ + public allowedResponseExtensions: string[]; /** - * Creates a new Metric instance using the specified properties. + * Creates a new ContextRule instance using the specified properties. * @param [properties] Properties to set - * @returns Metric instance + * @returns ContextRule instance */ - public static create(properties?: google.api.IMetric): google.api.Metric; + public static create(properties?: google.api.IContextRule): google.api.ContextRule; /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode + * Encodes the specified ContextRule message. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. + * @param message ContextRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IContextRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode + * Encodes the specified ContextRule message, length delimited. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. + * @param message ContextRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IContextRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Metric message from the specified reader or buffer. + * Decodes a ContextRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Metric + * @returns ContextRule * @throws {Error} If the payload is not 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.Metric; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ContextRule; /** - * Decodes a Metric message from the specified reader or buffer, length delimited. + * Decodes a ContextRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Metric + * @returns ContextRule * @throws {Error} If the payload 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.Metric; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ContextRule; /** - * Verifies a Metric message. + * Verifies a ContextRule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * Creates a ContextRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Metric + * @returns ContextRule */ - public static fromObject(object: { [k: string]: any }): google.api.Metric; + public static fromObject(object: { [k: string]: any }): google.api.ContextRule; /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric + * Creates a plain object from a ContextRule message. Also converts values to other types if specified. + * @param message ContextRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ContextRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Metric to JSON. + * Converts this ContextRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a LabelDescriptor. */ - interface ILabelDescriptor { - /** LabelDescriptor key */ - key?: (string|null); + /** + * Gets the default type url for ContextRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** LabelDescriptor valueType */ - valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); + /** Properties of a Control. */ + interface IControl { - /** LabelDescriptor description */ - description?: (string|null); + /** Control environment */ + environment?: (string|null); } - /** Represents a LabelDescriptor. */ - class LabelDescriptor implements ILabelDescriptor { + /** Represents a Control. */ + class Control implements IControl { /** - * Constructs a new LabelDescriptor. + * Constructs a new Control. * @param [properties] Properties to set */ - constructor(properties?: google.api.ILabelDescriptor); - - /** LabelDescriptor key. */ - public key: string; - - /** LabelDescriptor valueType. */ - public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); + constructor(properties?: google.api.IControl); - /** LabelDescriptor description. */ - public description: string; + /** Control environment. */ + public environment: string; /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new Control instance using the specified properties. * @param [properties] Properties to set - * @returns LabelDescriptor instance + * @returns Control instance */ - public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + public static create(properties?: google.api.IControl): google.api.Control; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified Control message. Does not implicitly {@link google.api.Control.verify|verify} messages. + * @param message Control message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IControl, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode + * Encodes the specified Control message, length delimited. Does not implicitly {@link google.api.Control.verify|verify} messages. + * @param message Control message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IControl, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a Control message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LabelDescriptor + * @returns Control * @throws {Error} If the payload is not 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.LabelDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Control; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Control message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LabelDescriptor + * @returns Control * @throws {Error} If the payload 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.LabelDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Control; /** - * Verifies a LabelDescriptor message. + * Verifies a Control message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Control message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LabelDescriptor + * @returns Control */ - public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.Control; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @param message LabelDescriptor + * Creates a plain object from a Control message. Also converts values to other types if specified. + * @param message Control * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Control, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LabelDescriptor to JSON. + * Converts this Control to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Control + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace LabelDescriptor { + /** Properties of a Documentation. */ + interface IDocumentation { - /** ValueType enum. */ - enum ValueType { - STRING = 0, - BOOL = 1, - INT64 = 2 - } - } + /** Documentation summary */ + summary?: (string|null); - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } + /** Documentation pages */ + pages?: (google.api.IPage[]|null); - /** Properties of a Context. */ - interface IContext { + /** Documentation rules */ + rules?: (google.api.IDocumentationRule[]|null); - /** Context rules */ - rules?: (google.api.IContextRule[]|null); + /** Documentation documentationRootUrl */ + documentationRootUrl?: (string|null); + + /** Documentation serviceRootUrl */ + serviceRootUrl?: (string|null); + + /** Documentation overview */ + overview?: (string|null); } - /** Represents a Context. */ - class Context implements IContext { + /** Represents a Documentation. */ + class Documentation implements IDocumentation { /** - * Constructs a new Context. + * Constructs a new Documentation. * @param [properties] Properties to set */ - constructor(properties?: google.api.IContext); + constructor(properties?: google.api.IDocumentation); - /** Context rules. */ - public rules: google.api.IContextRule[]; + /** Documentation summary. */ + public summary: string; + + /** Documentation pages. */ + public pages: google.api.IPage[]; + + /** Documentation rules. */ + public rules: google.api.IDocumentationRule[]; + + /** Documentation documentationRootUrl. */ + public documentationRootUrl: string; + + /** Documentation serviceRootUrl. */ + public serviceRootUrl: string; + + /** Documentation overview. */ + public overview: string; /** - * Creates a new Context instance using the specified properties. + * Creates a new Documentation instance using the specified properties. * @param [properties] Properties to set - * @returns Context instance + * @returns Documentation instance */ - public static create(properties?: google.api.IContext): google.api.Context; + public static create(properties?: google.api.IDocumentation): google.api.Documentation; /** - * Encodes the specified Context message. Does not implicitly {@link google.api.Context.verify|verify} messages. - * @param message Context message or plain object to encode + * Encodes the specified Documentation message. Does not implicitly {@link google.api.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Context message, length delimited. Does not implicitly {@link google.api.Context.verify|verify} messages. - * @param message Context message or plain object to encode + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.api.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Context message from the specified reader or buffer. + * Decodes a Documentation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Context + * @returns Documentation * @throws {Error} If the payload is not 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.Context; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Documentation; /** - * Decodes a Context message from the specified reader or buffer, length delimited. + * Decodes a Documentation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Context + * @returns Documentation * @throws {Error} If the payload 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.Context; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Documentation; /** - * Verifies a Context message. + * Verifies a Documentation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Context message from a plain object. Also converts values to their respective internal types. + * Creates a Documentation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Context + * @returns Documentation */ - public static fromObject(object: { [k: string]: any }): google.api.Context; + public static fromObject(object: { [k: string]: any }): google.api.Documentation; /** - * Creates a plain object from a Context message. Also converts values to other types if specified. - * @param message Context + * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * @param message Documentation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Context, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Documentation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Context to JSON. + * Converts this Documentation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Documentation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ContextRule. */ - interface IContextRule { + /** Properties of a DocumentationRule. */ + interface IDocumentationRule { - /** ContextRule selector */ + /** DocumentationRule selector */ selector?: (string|null); - /** ContextRule requested */ - requested?: (string[]|null); - - /** ContextRule provided */ - provided?: (string[]|null); - - /** ContextRule allowedRequestExtensions */ - allowedRequestExtensions?: (string[]|null); + /** DocumentationRule description */ + description?: (string|null); - /** ContextRule allowedResponseExtensions */ - allowedResponseExtensions?: (string[]|null); + /** DocumentationRule deprecationDescription */ + deprecationDescription?: (string|null); } - /** Represents a ContextRule. */ - class ContextRule implements IContextRule { + /** Represents a DocumentationRule. */ + class DocumentationRule implements IDocumentationRule { /** - * Constructs a new ContextRule. + * Constructs a new DocumentationRule. * @param [properties] Properties to set */ - constructor(properties?: google.api.IContextRule); + constructor(properties?: google.api.IDocumentationRule); - /** ContextRule selector. */ + /** DocumentationRule selector. */ public selector: string; - /** ContextRule requested. */ - public requested: string[]; - - /** ContextRule provided. */ - public provided: string[]; - - /** ContextRule allowedRequestExtensions. */ - public allowedRequestExtensions: string[]; + /** DocumentationRule description. */ + public description: string; - /** ContextRule allowedResponseExtensions. */ - public allowedResponseExtensions: string[]; + /** DocumentationRule deprecationDescription. */ + public deprecationDescription: string; /** - * Creates a new ContextRule instance using the specified properties. + * Creates a new DocumentationRule instance using the specified properties. * @param [properties] Properties to set - * @returns ContextRule instance + * @returns DocumentationRule instance */ - public static create(properties?: google.api.IContextRule): google.api.ContextRule; + public static create(properties?: google.api.IDocumentationRule): google.api.DocumentationRule; /** - * Encodes the specified ContextRule message. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. - * @param message ContextRule message or plain object to encode + * Encodes the specified DocumentationRule message. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. + * @param message DocumentationRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IContextRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IDocumentationRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ContextRule message, length delimited. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. - * @param message ContextRule message or plain object to encode + * Encodes the specified DocumentationRule message, length delimited. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. + * @param message DocumentationRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IContextRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IDocumentationRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ContextRule message from the specified reader or buffer. + * Decodes a DocumentationRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ContextRule + * @returns DocumentationRule * @throws {Error} If the payload is not 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.ContextRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DocumentationRule; /** - * Decodes a ContextRule message from the specified reader or buffer, length delimited. + * Decodes a DocumentationRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ContextRule + * @returns DocumentationRule * @throws {Error} If the payload 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.ContextRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DocumentationRule; /** - * Verifies a ContextRule message. + * Verifies a DocumentationRule message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ContextRule message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentationRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ContextRule + * @returns DocumentationRule */ - public static fromObject(object: { [k: string]: any }): google.api.ContextRule; + public static fromObject(object: { [k: string]: any }): google.api.DocumentationRule; /** - * Creates a plain object from a ContextRule message. Also converts values to other types if specified. - * @param message ContextRule + * Creates a plain object from a DocumentationRule message. Also converts values to other types if specified. + * @param message DocumentationRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ContextRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.DocumentationRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ContextRule to JSON. + * Converts this DocumentationRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - /** Properties of a Control. */ - interface IControl { + /** + * Gets the default type url for DocumentationRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Control environment */ - environment?: (string|null); + /** Properties of a Page. */ + interface IPage { + + /** Page name */ + name?: (string|null); + + /** Page content */ + content?: (string|null); + + /** Page subpages */ + subpages?: (google.api.IPage[]|null); } - /** Represents a Control. */ - class Control implements IControl { + /** Represents a Page. */ + class Page implements IPage { /** - * Constructs a new Control. + * Constructs a new Page. * @param [properties] Properties to set */ - constructor(properties?: google.api.IControl); + constructor(properties?: google.api.IPage); - /** Control environment. */ - public environment: string; + /** Page name. */ + public name: string; + + /** Page content. */ + public content: string; + + /** Page subpages. */ + public subpages: google.api.IPage[]; /** - * Creates a new Control instance using the specified properties. + * Creates a new Page instance using the specified properties. * @param [properties] Properties to set - * @returns Control instance + * @returns Page instance */ - public static create(properties?: google.api.IControl): google.api.Control; + public static create(properties?: google.api.IPage): google.api.Page; /** - * Encodes the specified Control message. Does not implicitly {@link google.api.Control.verify|verify} messages. - * @param message Control message or plain object to encode + * Encodes the specified Page message. Does not implicitly {@link google.api.Page.verify|verify} messages. + * @param message Page message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IControl, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IPage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Control message, length delimited. Does not implicitly {@link google.api.Control.verify|verify} messages. - * @param message Control message or plain object to encode + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.api.Page.verify|verify} messages. + * @param message Page message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IControl, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IPage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Control message from the specified reader or buffer. + * Decodes a Page message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Control + * @returns Page * @throws {Error} If the payload is not 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.Control; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Page; /** - * Decodes a Control message from the specified reader or buffer, length delimited. + * Decodes a Page message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Control + * @returns Page * @throws {Error} If the payload 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.Control; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Page; /** - * Verifies a Control message. + * Verifies a Page message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Control message from a plain object. Also converts values to their respective internal types. + * Creates a Page message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Control + * @returns Page */ - public static fromObject(object: { [k: string]: any }): google.api.Control; + public static fromObject(object: { [k: string]: any }): google.api.Page; /** - * Creates a plain object from a Control message. Also converts values to other types if specified. - * @param message Control + * Creates a plain object from a Page message. Also converts values to other types if specified. + * @param message Page * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Control, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Control to JSON. + * Converts this Page to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a Documentation. */ - interface IDocumentation { - /** Documentation summary */ - summary?: (string|null); + /** + * Gets the default type url for Page + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Documentation pages */ - pages?: (google.api.IPage[]|null); + /** Properties of an Endpoint. */ + interface IEndpoint { - /** Documentation rules */ - rules?: (google.api.IDocumentationRule[]|null); + /** Endpoint name */ + name?: (string|null); - /** Documentation documentationRootUrl */ - documentationRootUrl?: (string|null); + /** Endpoint aliases */ + aliases?: (string[]|null); - /** Documentation serviceRootUrl */ - serviceRootUrl?: (string|null); + /** Endpoint target */ + target?: (string|null); - /** Documentation overview */ - overview?: (string|null); + /** Endpoint allowCors */ + allowCors?: (boolean|null); } - /** Represents a Documentation. */ - class Documentation implements IDocumentation { + /** Represents an Endpoint. */ + class Endpoint implements IEndpoint { /** - * Constructs a new Documentation. + * Constructs a new Endpoint. * @param [properties] Properties to set */ - constructor(properties?: google.api.IDocumentation); - - /** Documentation summary. */ - public summary: string; - - /** Documentation pages. */ - public pages: google.api.IPage[]; + constructor(properties?: google.api.IEndpoint); - /** Documentation rules. */ - public rules: google.api.IDocumentationRule[]; + /** Endpoint name. */ + public name: string; - /** Documentation documentationRootUrl. */ - public documentationRootUrl: string; + /** Endpoint aliases. */ + public aliases: string[]; - /** Documentation serviceRootUrl. */ - public serviceRootUrl: string; + /** Endpoint target. */ + public target: string; - /** Documentation overview. */ - public overview: string; + /** Endpoint allowCors. */ + public allowCors: boolean; /** - * Creates a new Documentation instance using the specified properties. + * Creates a new Endpoint instance using the specified properties. * @param [properties] Properties to set - * @returns Documentation instance + * @returns Endpoint instance */ - public static create(properties?: google.api.IDocumentation): google.api.Documentation; + public static create(properties?: google.api.IEndpoint): google.api.Endpoint; /** - * Encodes the specified Documentation message. Does not implicitly {@link google.api.Documentation.verify|verify} messages. - * @param message Documentation message or plain object to encode + * Encodes the specified Endpoint message. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.api.Documentation.verify|verify} messages. - * @param message Documentation message or plain object to encode + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Documentation message from the specified reader or buffer. + * Decodes an Endpoint message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Documentation + * @returns Endpoint * @throws {Error} If the payload is not 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.Documentation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Endpoint; /** - * Decodes a Documentation message from the specified reader or buffer, length delimited. + * Decodes an Endpoint message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Documentation + * @returns Endpoint * @throws {Error} If the payload 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.Documentation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Endpoint; /** - * Verifies a Documentation message. + * Verifies an Endpoint message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Documentation message from a plain object. Also converts values to their respective internal types. + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Documentation + * @returns Endpoint */ - public static fromObject(object: { [k: string]: any }): google.api.Documentation; + public static fromObject(object: { [k: string]: any }): google.api.Endpoint; /** - * Creates a plain object from a Documentation message. Also converts values to other types if specified. - * @param message Documentation + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @param message Endpoint * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Documentation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Documentation to JSON. + * Converts this Endpoint to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Endpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DocumentationRule. */ - interface IDocumentationRule { + /** Properties of a LogDescriptor. */ + interface ILogDescriptor { - /** DocumentationRule selector */ - selector?: (string|null); + /** LogDescriptor name */ + name?: (string|null); - /** DocumentationRule description */ + /** LogDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** LogDescriptor description */ description?: (string|null); - /** DocumentationRule deprecationDescription */ - deprecationDescription?: (string|null); + /** LogDescriptor displayName */ + displayName?: (string|null); } - /** Represents a DocumentationRule. */ - class DocumentationRule implements IDocumentationRule { + /** Represents a LogDescriptor. */ + class LogDescriptor implements ILogDescriptor { /** - * Constructs a new DocumentationRule. + * Constructs a new LogDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IDocumentationRule); + constructor(properties?: google.api.ILogDescriptor); - /** DocumentationRule selector. */ - public selector: string; + /** LogDescriptor name. */ + public name: string; - /** DocumentationRule description. */ + /** LogDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** LogDescriptor description. */ public description: string; - /** DocumentationRule deprecationDescription. */ - public deprecationDescription: string; + /** LogDescriptor displayName. */ + public displayName: string; /** - * Creates a new DocumentationRule instance using the specified properties. + * Creates a new LogDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns DocumentationRule instance + * @returns LogDescriptor instance */ - public static create(properties?: google.api.IDocumentationRule): google.api.DocumentationRule; + public static create(properties?: google.api.ILogDescriptor): google.api.LogDescriptor; /** - * Encodes the specified DocumentationRule message. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. - * @param message DocumentationRule message or plain object to encode + * Encodes the specified LogDescriptor message. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. + * @param message LogDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IDocumentationRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ILogDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DocumentationRule message, length delimited. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. - * @param message DocumentationRule message or plain object to encode + * Encodes the specified LogDescriptor message, length delimited. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. + * @param message LogDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IDocumentationRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ILogDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DocumentationRule message from the specified reader or buffer. + * Decodes a LogDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DocumentationRule + * @returns LogDescriptor * @throws {Error} If the payload is not 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.DocumentationRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LogDescriptor; /** - * Decodes a DocumentationRule message from the specified reader or buffer, length delimited. + * Decodes a LogDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DocumentationRule + * @returns LogDescriptor * @throws {Error} If the payload 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.DocumentationRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LogDescriptor; /** - * Verifies a DocumentationRule message. + * Verifies a LogDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DocumentationRule message from a plain object. Also converts values to their respective internal types. + * Creates a LogDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DocumentationRule + * @returns LogDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.DocumentationRule; + public static fromObject(object: { [k: string]: any }): google.api.LogDescriptor; /** - * Creates a plain object from a DocumentationRule message. Also converts values to other types if specified. - * @param message DocumentationRule + * Creates a plain object from a LogDescriptor message. Also converts values to other types if specified. + * @param message LogDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.DocumentationRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.LogDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DocumentationRule to JSON. + * Converts this LogDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Page. */ - interface IPage { + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { - /** Page name */ - name?: (string|null); + /** LabelDescriptor key */ + key?: (string|null); - /** Page content */ - content?: (string|null); + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); - /** Page subpages */ - subpages?: (google.api.IPage[]|null); + /** LabelDescriptor description */ + description?: (string|null); } - /** Represents a Page. */ - class Page implements IPage { + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { /** - * Constructs a new Page. + * Constructs a new LabelDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IPage); + constructor(properties?: google.api.ILabelDescriptor); - /** Page name. */ - public name: string; + /** LabelDescriptor key. */ + public key: string; - /** Page content. */ - public content: string; + /** LabelDescriptor valueType. */ + public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); - /** Page subpages. */ - public subpages: google.api.IPage[]; + /** LabelDescriptor description. */ + public description: string; /** - * Creates a new Page instance using the specified properties. + * Creates a new LabelDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns Page instance + * @returns LabelDescriptor instance */ - public static create(properties?: google.api.IPage): google.api.Page; + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; /** - * Encodes the specified Page message. Does not implicitly {@link google.api.Page.verify|verify} messages. - * @param message Page message or plain object to encode + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Page message, length delimited. Does not implicitly {@link google.api.Page.verify|verify} messages. - * @param message Page message or plain object to encode + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Page message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Page + * @returns LabelDescriptor * @throws {Error} If the payload is not 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.Page; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.LabelDescriptor; /** - * Decodes a Page message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Page + * @returns LabelDescriptor * @throws {Error} If the payload 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.Page; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.LabelDescriptor; /** - * Verifies a Page message. + * Verifies a LabelDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Page message from a plain object. Also converts values to their respective internal types. + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Page + * @returns LabelDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.Page; + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; /** - * Creates a plain object from a Page message. Also converts values to other types if specified. - * @param message Page + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Page to JSON. + * Converts this LabelDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LabelDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Endpoint. */ - interface IEndpoint { + namespace LabelDescriptor { - /** Endpoint name */ - name?: (string|null); + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 + } + } - /** Endpoint aliases */ - aliases?: (string[]|null); + /** Properties of a Logging. */ + interface ILogging { - /** Endpoint target */ - target?: (string|null); + /** Logging producerDestinations */ + producerDestinations?: (google.api.Logging.ILoggingDestination[]|null); - /** Endpoint allowCors */ - allowCors?: (boolean|null); + /** Logging consumerDestinations */ + consumerDestinations?: (google.api.Logging.ILoggingDestination[]|null); } - /** Represents an Endpoint. */ - class Endpoint implements IEndpoint { + /** Represents a Logging. */ + class Logging implements ILogging { /** - * Constructs a new Endpoint. + * Constructs a new Logging. * @param [properties] Properties to set */ - constructor(properties?: google.api.IEndpoint); - - /** Endpoint name. */ - public name: string; - - /** Endpoint aliases. */ - public aliases: string[]; + constructor(properties?: google.api.ILogging); - /** Endpoint target. */ - public target: string; + /** Logging producerDestinations. */ + public producerDestinations: google.api.Logging.ILoggingDestination[]; - /** Endpoint allowCors. */ - public allowCors: boolean; + /** Logging consumerDestinations. */ + public consumerDestinations: google.api.Logging.ILoggingDestination[]; /** - * Creates a new Endpoint instance using the specified properties. + * Creates a new Logging instance using the specified properties. * @param [properties] Properties to set - * @returns Endpoint instance + * @returns Logging instance */ - public static create(properties?: google.api.IEndpoint): google.api.Endpoint; + public static create(properties?: google.api.ILogging): google.api.Logging; /** - * Encodes the specified Endpoint message. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode + * Encodes the specified Logging message. Does not implicitly {@link google.api.Logging.verify|verify} messages. + * @param message Logging message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ILogging, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode + * Encodes the specified Logging message, length delimited. Does not implicitly {@link google.api.Logging.verify|verify} messages. + * @param message Logging message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ILogging, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Endpoint message from the specified reader or buffer. + * Decodes a Logging message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Endpoint + * @returns Logging * @throws {Error} If the payload is not 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.Endpoint; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Logging; /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * Decodes a Logging message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Endpoint + * @returns Logging * @throws {Error} If the payload 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.Endpoint; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Logging; /** - * Verifies an Endpoint message. + * Verifies a Logging message. * @param message Plain 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 Endpoint message from a plain object. Also converts values to their respective internal types. + * Creates a Logging message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Endpoint + * @returns Logging */ - public static fromObject(object: { [k: string]: any }): google.api.Endpoint; + public static fromObject(object: { [k: string]: any }): google.api.Logging; /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. - * @param message Endpoint + * Creates a plain object from a Logging message. Also converts values to other types if specified. + * @param message Logging * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Logging, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Endpoint to JSON. + * Converts this Logging to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Logging + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LogDescriptor. */ - interface ILogDescriptor { + namespace Logging { - /** LogDescriptor name */ - name?: (string|null); + /** Properties of a LoggingDestination. */ + interface ILoggingDestination { - /** LogDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); + /** LoggingDestination monitoredResource */ + monitoredResource?: (string|null); - /** LogDescriptor description */ - description?: (string|null); + /** LoggingDestination logs */ + logs?: (string[]|null); + } - /** LogDescriptor displayName */ - displayName?: (string|null); + /** Represents a LoggingDestination. */ + class LoggingDestination implements ILoggingDestination { + + /** + * Constructs a new LoggingDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Logging.ILoggingDestination); + + /** LoggingDestination monitoredResource. */ + public monitoredResource: string; + + /** LoggingDestination logs. */ + public logs: string[]; + + /** + * Creates a new LoggingDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns LoggingDestination instance + */ + public static create(properties?: google.api.Logging.ILoggingDestination): google.api.Logging.LoggingDestination; + + /** + * Encodes the specified LoggingDestination message. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * @param message LoggingDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Logging.ILoggingDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoggingDestination message, length delimited. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * @param message LoggingDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Logging.ILoggingDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoggingDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoggingDestination + * @throws {Error} If the payload is not 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.Logging.LoggingDestination; + + /** + * Decodes a LoggingDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoggingDestination + * @throws {Error} If the payload 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.Logging.LoggingDestination; + + /** + * Verifies a LoggingDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoggingDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoggingDestination + */ + public static fromObject(object: { [k: string]: any }): google.api.Logging.LoggingDestination; + + /** + * Creates a plain object from a LoggingDestination message. Also converts values to other types if specified. + * @param message LoggingDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Logging.LoggingDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoggingDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoggingDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a LogDescriptor. */ - class LogDescriptor implements ILogDescriptor { + /** Properties of a MetricDescriptor. */ + interface IMetricDescriptor { - /** - * Constructs a new LogDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ILogDescriptor); + /** MetricDescriptor name */ + name?: (string|null); - /** LogDescriptor name. */ - public name: string; + /** MetricDescriptor type */ + type?: (string|null); - /** LogDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; + /** MetricDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); - /** LogDescriptor description. */ - public description: string; + /** MetricDescriptor metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); - /** LogDescriptor displayName. */ - public displayName: string; + /** MetricDescriptor valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); - /** - * Creates a new LogDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns LogDescriptor instance - */ - public static create(properties?: google.api.ILogDescriptor): google.api.LogDescriptor; + /** MetricDescriptor unit */ + unit?: (string|null); - /** - * Encodes the specified LogDescriptor message. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. - * @param message LogDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ILogDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** MetricDescriptor description */ + description?: (string|null); - /** - * Encodes the specified LogDescriptor message, length delimited. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. - * @param message LogDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ILogDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** MetricDescriptor displayName */ + displayName?: (string|null); - /** - * Decodes a LogDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogDescriptor - * @throws {Error} If the payload is not 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.LogDescriptor; + /** MetricDescriptor metadata */ + metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); - /** - * Decodes a LogDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogDescriptor - * @throws {Error} If the payload 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.LogDescriptor; + /** MetricDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - /** - * Verifies a LogDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MetricDescriptor monitoredResourceTypes */ + monitoredResourceTypes?: (string[]|null); + } - /** - * Creates a LogDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.LogDescriptor; + /** Represents a MetricDescriptor. */ + class MetricDescriptor implements IMetricDescriptor { /** - * Creates a plain object from a LogDescriptor message. Also converts values to other types if specified. - * @param message LogDescriptor - * @param [options] Conversion options - * @returns Plain object + * Constructs a new MetricDescriptor. + * @param [properties] Properties to set */ - public static toObject(message: google.api.LogDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + constructor(properties?: google.api.IMetricDescriptor); - /** - * Converts this LogDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MetricDescriptor name. */ + public name: string; - /** Properties of a Logging. */ - interface ILogging { + /** MetricDescriptor type. */ + public type: string; - /** Logging producerDestinations */ - producerDestinations?: (google.api.Logging.ILoggingDestination[]|null); + /** MetricDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; - /** Logging consumerDestinations */ - consumerDestinations?: (google.api.Logging.ILoggingDestination[]|null); - } + /** MetricDescriptor metricKind. */ + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); - /** Represents a Logging. */ - class Logging implements ILogging { + /** MetricDescriptor valueType. */ + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + + /** MetricDescriptor unit. */ + public unit: string; + + /** MetricDescriptor description. */ + public description: string; + + /** MetricDescriptor displayName. */ + public displayName: string; - /** - * Constructs a new Logging. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ILogging); + /** MetricDescriptor metadata. */ + public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); - /** Logging producerDestinations. */ - public producerDestinations: google.api.Logging.ILoggingDestination[]; + /** MetricDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - /** Logging consumerDestinations. */ - public consumerDestinations: google.api.Logging.ILoggingDestination[]; + /** MetricDescriptor monitoredResourceTypes. */ + public monitoredResourceTypes: string[]; /** - * Creates a new Logging instance using the specified properties. + * Creates a new MetricDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns Logging instance + * @returns MetricDescriptor instance */ - public static create(properties?: google.api.ILogging): google.api.Logging; + public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; /** - * Encodes the specified Logging message. Does not implicitly {@link google.api.Logging.verify|verify} messages. - * @param message Logging message or plain object to encode + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ILogging, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Logging message, length delimited. Does not implicitly {@link google.api.Logging.verify|verify} messages. - * @param message Logging message or plain object to encode + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ILogging, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Logging message from the specified reader or buffer. + * Decodes a MetricDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Logging + * @returns MetricDescriptor * @throws {Error} If the payload is not 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.Logging; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor; /** - * Decodes a Logging message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Logging + * @returns MetricDescriptor * @throws {Error} If the payload 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.Logging; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MetricDescriptor; /** - * Verifies a Logging message. + * Verifies a MetricDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Logging message from a plain object. Also converts values to their respective internal types. + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Logging + * @returns MetricDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.Logging; + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; /** - * Creates a plain object from a Logging message. Also converts values to other types if specified. - * @param message Logging + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @param message MetricDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Logging, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Logging to JSON. + * Converts this MetricDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Logging { + namespace MetricDescriptor { - /** Properties of a LoggingDestination. */ - interface ILoggingDestination { + /** Properties of a MetricDescriptorMetadata. */ + interface IMetricDescriptorMetadata { - /** LoggingDestination monitoredResource */ - monitoredResource?: (string|null); + /** MetricDescriptorMetadata launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - /** LoggingDestination logs */ - logs?: (string[]|null); + /** MetricDescriptorMetadata samplePeriod */ + samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay */ + ingestDelay?: (google.protobuf.IDuration|null); } - /** Represents a LoggingDestination. */ - class LoggingDestination implements ILoggingDestination { + /** Represents a MetricDescriptorMetadata. */ + class MetricDescriptorMetadata implements IMetricDescriptorMetadata { /** - * Constructs a new LoggingDestination. + * Constructs a new MetricDescriptorMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.api.Logging.ILoggingDestination); + constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); - /** LoggingDestination monitoredResource. */ - public monitoredResource: string; + /** MetricDescriptorMetadata launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - /** LoggingDestination logs. */ - public logs: string[]; + /** MetricDescriptorMetadata samplePeriod. */ + public samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay. */ + public ingestDelay?: (google.protobuf.IDuration|null); /** - * Creates a new LoggingDestination instance using the specified properties. + * Creates a new MetricDescriptorMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns LoggingDestination instance + * @returns MetricDescriptorMetadata instance */ - public static create(properties?: google.api.Logging.ILoggingDestination): google.api.Logging.LoggingDestination; + public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; /** - * Encodes the specified LoggingDestination message. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. - * @param message LoggingDestination message or plain object to encode + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.Logging.ILoggingDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LoggingDestination message, length delimited. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. - * @param message LoggingDestination message or plain object to encode + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.Logging.ILoggingDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LoggingDestination message from the specified reader or buffer. + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LoggingDestination + * @returns MetricDescriptorMetadata * @throws {Error} If the payload is not 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.Logging.LoggingDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricDescriptorMetadata + * @throws {Error} If the payload 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.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Verifies a MetricDescriptorMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricDescriptorMetadata + */ + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @param message MetricDescriptorMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricDescriptorMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricDescriptorMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** MetricKind enum. */ + enum MetricKind { + METRIC_KIND_UNSPECIFIED = 0, + GAUGE = 1, + DELTA = 2, + CUMULATIVE = 3 + } + + /** ValueType enum. */ + enum ValueType { + VALUE_TYPE_UNSPECIFIED = 0, + BOOL = 1, + INT64 = 2, + DOUBLE = 3, + STRING = 4, + DISTRIBUTION = 5, + MONEY = 6 + } + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric type */ + type?: (string|null); + + /** Metric labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMetric); + + /** Metric type. */ + public type: string; + + /** Metric labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.api.IMetric): google.api.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @throws {Error} If the payload is not 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.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @throws {Error} If the payload 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.Metric; + + /** + * Verifies a Metric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a LoggingDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoggingDestination - * @throws {Error} If the payload 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.Logging.LoggingDestination; + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.api.Metric; - /** - * Verifies a LoggingDestination message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a LoggingDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoggingDestination - */ - public static fromObject(object: { [k: string]: any }): google.api.Logging.LoggingDestination; + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from a LoggingDestination message. Also converts values to other types if specified. - * @param message LoggingDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Logging.LoggingDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this LoggingDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 } /** Properties of a MonitoredResourceDescriptor. */ @@ -6791,6 +7211,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoredResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MonitoredResource. */ @@ -6887,6 +7314,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoredResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MonitoredResourceMetadata. */ @@ -6983,6 +7417,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoredResourceMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Monitoring. */ @@ -7079,6 +7520,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Monitoring + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Monitoring { @@ -7177,6 +7625,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoringDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -7274,6 +7729,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Quota + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MetricRule. */ @@ -7370,6 +7832,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QuotaLimit. */ @@ -7428,330 +7897,99 @@ export namespace google { public maxLimit: (number|Long|string); /** QuotaLimit freeTier. */ - public freeTier: (number|Long|string); - - /** QuotaLimit duration. */ - public duration: string; - - /** QuotaLimit metric. */ - public metric: string; - - /** QuotaLimit unit. */ - public unit: string; - - /** QuotaLimit values. */ - public values: { [k: string]: (number|Long|string) }; - - /** QuotaLimit displayName. */ - public displayName: string; - - /** - * Creates a new QuotaLimit instance using the specified properties. - * @param [properties] Properties to set - * @returns QuotaLimit instance - */ - public static create(properties?: google.api.IQuotaLimit): google.api.QuotaLimit; - - /** - * Encodes the specified QuotaLimit message. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. - * @param message QuotaLimit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IQuotaLimit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuotaLimit message, length delimited. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. - * @param message QuotaLimit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IQuotaLimit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuotaLimit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuotaLimit - * @throws {Error} If the payload is not 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.QuotaLimit; - - /** - * Decodes a QuotaLimit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuotaLimit - * @throws {Error} If the payload 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.QuotaLimit; - - /** - * Verifies a QuotaLimit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QuotaLimit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuotaLimit - */ - public static fromObject(object: { [k: string]: any }): google.api.QuotaLimit; - - /** - * Creates a plain object from a QuotaLimit message. Also converts values to other types if specified. - * @param message QuotaLimit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.QuotaLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuotaLimit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); + public freeTier: (number|Long|string); - /** ResourceReference childType */ - childType?: (string|null); - } + /** QuotaLimit duration. */ + public duration: string; - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** QuotaLimit metric. */ + public metric: string; - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); + /** QuotaLimit unit. */ + public unit: string; - /** ResourceReference type. */ - public type: string; + /** QuotaLimit values. */ + public values: { [k: string]: (number|Long|string) }; - /** ResourceReference childType. */ - public childType: string; + /** QuotaLimit displayName. */ + public displayName: string; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new QuotaLimit instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceReference instance + * @returns QuotaLimit instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + public static create(properties?: google.api.IQuotaLimit): google.api.QuotaLimit; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified QuotaLimit message. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. + * @param message QuotaLimit 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; + public static encode(message: google.api.IQuotaLimit, 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 + * Encodes the specified QuotaLimit message, length delimited. Does not implicitly {@link google.api.QuotaLimit.verify|verify} messages. + * @param message QuotaLimit 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; + public static encodeDelimited(message: google.api.IQuotaLimit, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a QuotaLimit message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceReference + * @returns QuotaLimit * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.QuotaLimit; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a QuotaLimit message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceReference + * @returns QuotaLimit * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.QuotaLimit; /** - * Verifies a ResourceReference message. + * Verifies a QuotaLimit message. * @param message Plain object 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. + * Creates a QuotaLimit message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns QuotaLimit */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.api.QuotaLimit; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference + * Creates a plain object from a QuotaLimit message. Also converts values to other types if specified. + * @param message QuotaLimit * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.QuotaLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceReference to JSON. + * Converts this QuotaLimit to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuotaLimit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SourceInfo. */ @@ -7842,6 +8080,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SystemParameters. */ @@ -7932,6 +8177,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SystemParameters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SystemParameterRule. */ @@ -8028,6 +8280,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SystemParameterRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SystemParameter. */ @@ -8130,6 +8389,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SystemParameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Usage. */ @@ -8232,6 +8498,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Usage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a UsageRule. */ @@ -8334,6 +8607,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UsageRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -8428,6 +8708,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. */ @@ -8468,6 +8755,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -8515,6 +8805,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 @@ -8584,6 +8877,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. */ @@ -8728,6 +9028,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 { @@ -8832,6 +9139,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. */ @@ -8928,6 +9242,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; } } @@ -9019,6 +9340,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. */ @@ -9169,6 +9497,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 { @@ -9297,6 +9632,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. */ @@ -9411,6 +9753,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 { @@ -9509,6 +9858,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; } } @@ -9612,6 +9968,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. */ @@ -9714,6 +10077,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. */ @@ -9834,6 +10204,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. */ @@ -9901,9 +10278,6 @@ export namespace google { /** FileOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); } /** Represents a FileOptions. */ @@ -10047,6 +10421,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 { @@ -10076,9 +10457,6 @@ export namespace google { /** MessageOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); } /** Represents a MessageOptions. */ @@ -10174,6 +10552,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. */ @@ -10191,6 +10576,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -10202,9 +10590,6 @@ export namespace google { /** 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. */ @@ -10228,6 +10613,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -10306,6 +10694,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 { @@ -10413,6 +10808,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. */ @@ -10515,6 +10917,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. */ @@ -10611,6 +11020,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. */ @@ -10713,6 +11129,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. */ @@ -10824,6 +11247,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 { @@ -10960,6 +11390,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 { @@ -11058,6 +11495,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; } } @@ -11149,6 +11593,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 { @@ -11265,6 +11716,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; } } @@ -11356,6 +11814,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 { @@ -11374,6 +11839,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. */ @@ -11397,6 +11865,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 @@ -11466,6 +11937,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 + } } } @@ -11563,6 +12051,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 Duration. */ @@ -11659,6 +12154,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Struct. */ @@ -11749,6 +12251,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Value. */ @@ -11872,6 +12381,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** NullValue enum. */ @@ -11967,6 +12483,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Any. */ @@ -12063,6 +12586,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 an Api. */ @@ -12189,6 +12719,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 a Method. */ @@ -12315,6 +12852,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Method + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Mixin. */ @@ -12411,6 +12955,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Mixin + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SourceContext. */ @@ -12501,6 +13052,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceContext + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Type. */ @@ -12621,6 +13179,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Type + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Field. */ @@ -12765,6 +13330,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Field + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Field { @@ -12913,6 +13485,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Enum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumValue. */ @@ -13015,6 +13594,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Option. */ @@ -13111,6 +13697,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Option + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Syntax enum. */ @@ -13207,6 +13800,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FloatValue. */ @@ -13297,6 +13897,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Int64Value. */ @@ -13387,6 +13994,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a UInt64Value. */ @@ -13477,6 +14091,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Int32Value. */ @@ -13567,6 +14188,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a UInt32Value. */ @@ -13657,6 +14285,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BoolValue. */ @@ -13747,6 +14382,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StringValue. */ @@ -13837,6 +14479,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BytesValue. */ @@ -13927,6 +14576,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Empty. */ @@ -14011,6 +14667,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; } } @@ -14111,35 +14774,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 */ @@ -14261,6 +14924,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. */ @@ -14351,6 +15021,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. */ @@ -14459,6 +15136,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. */ @@ -14555,6 +15239,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. */ @@ -14645,6 +15336,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. */ @@ -14735,6 +15433,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. */ @@ -14831,6 +15536,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. */ @@ -14927,6 +15639,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; } } @@ -15033,6 +15752,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-api-servicemanagement/protos/protos.js b/packages/google-api-servicemanagement/protos/protos.js index dc6edba14d8..870b5d6f42c 100644 --- a/packages/google-api-servicemanagement/protos/protos.js +++ b/packages/google-api-servicemanagement/protos/protos.js @@ -169,12 +169,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.serviceName = reader.string(); - break; - case 3: - message.producerProjectId = reader.string(); - break; + case 2: { + message.serviceName = reader.string(); + break; + } + case 3: { + message.producerProjectId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -273,6 +275,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ManagedService + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.ManagedService + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManagedService.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.ManagedService"; + }; + return ManagedService; })(); @@ -405,22 +422,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); - break; - case 2: - if (!(message.steps && message.steps.length)) - message.steps = []; - message.steps.push($root.google.api.servicemanagement.v1.OperationMetadata.Step.decode(reader, reader.uint32())); - break; - case 3: - message.progressPercentage = reader.int32(); - break; - case 4: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + } + case 2: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.api.servicemanagement.v1.OperationMetadata.Step.decode(reader, reader.uint32())); + break; + } + case 3: { + message.progressPercentage = reader.int32(); + break; + } + case 4: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -571,6 +592,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.api.servicemanagement.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.api.servicemanagement.v1.OperationMetadata"; + }; + OperationMetadata.Step = (function() { /** @@ -674,12 +710,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.description = reader.string(); - break; - case 4: - message.status = reader.int32(); - break; + case 2: { + message.description = reader.string(); + break; + } + case 4: { + message.status = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -811,6 +849,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Step + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.OperationMetadata.Step + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Step.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.OperationMetadata.Step"; + }; + return Step; })(); @@ -953,15 +1006,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.location = reader.string(); - break; - case 2: - message.kind = reader.int32(); - break; - case 3: - message.message = reader.string(); - break; + case 1: { + message.location = reader.string(); + break; + } + case 2: { + message.kind = reader.int32(); + break; + } + case 3: { + message.message = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -1081,6 +1137,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Diagnostic + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.Diagnostic + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Diagnostic.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.Diagnostic"; + }; + /** * Kind enum. * @name google.api.servicemanagement.v1.Diagnostic.Kind @@ -1203,14 +1274,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.id = reader.string(); - break; - case 2: - if (!(message.files && message.files.length)) - message.files = []; - message.files.push($root.google.api.servicemanagement.v1.ConfigFile.decode(reader, reader.uint32())); - break; + case 5: { + message.id = reader.string(); + break; + } + case 2: { + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.google.api.servicemanagement.v1.ConfigFile.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -1326,6 +1399,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ConfigSource + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.ConfigSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfigSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.ConfigSource"; + }; + return ConfigSource; })(); @@ -1443,15 +1531,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.filePath = reader.string(); - break; - case 3: - message.fileContents = reader.bytes(); - break; - case 4: - message.fileType = reader.int32(); - break; + case 1: { + message.filePath = reader.string(); + break; + } + case 3: { + message.fileContents = reader.bytes(); + break; + } + case 4: { + message.fileType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1525,7 +1616,7 @@ if (object.fileContents != null) if (typeof object.fileContents === "string") $util.base64.decode(object.fileContents, message.fileContents = $util.newBuffer($util.base64.length(object.fileContents)), 0); - else if (object.fileContents.length) + else if (object.fileContents.length >= 0) message.fileContents = object.fileContents; switch (object.fileType) { case "FILE_TYPE_UNSPECIFIED": @@ -1600,6 +1691,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ConfigFile + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.ConfigFile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfigFile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.ConfigFile"; + }; + /** * FileType enum. * @name google.api.servicemanagement.v1.ConfigFile.FileType @@ -1717,9 +1823,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; @@ -1809,6 +1916,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ConfigRef + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.ConfigRef + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfigRef.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.ConfigRef"; + }; + return ConfigRef; })(); @@ -1906,11 +2028,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.configChanges && message.configChanges.length)) - message.configChanges = []; - message.configChanges.push($root.google.api.ConfigChange.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.configChanges && message.configChanges.length)) + message.configChanges = []; + message.configChanges.push($root.google.api.ConfigChange.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -2017,6 +2140,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ChangeReport + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.ChangeReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.ChangeReport"; + }; + return ChangeReport; })(); @@ -2192,27 +2330,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rolloutId = reader.string(); - break; - case 2: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.createdBy = reader.string(); - break; - case 4: - message.status = reader.int32(); - break; - case 5: - message.trafficPercentStrategy = $root.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.decode(reader, reader.uint32()); - break; - case 200: - message.deleteServiceStrategy = $root.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.decode(reader, reader.uint32()); - break; - case 8: - message.serviceName = reader.string(); - break; + case 1: { + message.rolloutId = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.createdBy = reader.string(); + break; + } + case 4: { + message.status = reader.int32(); + break; + } + case 5: { + message.trafficPercentStrategy = $root.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.decode(reader, reader.uint32()); + break; + } + case 200: { + message.deleteServiceStrategy = $root.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.decode(reader, reader.uint32()); + break; + } + case 8: { + message.serviceName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2417,6 +2562,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Rollout + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.Rollout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rollout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.Rollout"; + }; + Rollout.TrafficPercentStrategy = (function() { /** @@ -2511,28 +2671,29 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (message.percentages === $util.emptyObject) - message.percentages = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.double(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + if (message.percentages === $util.emptyObject) + message.percentages = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.double(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.percentages[key] = value; + break; } - message.percentages[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -2636,6 +2797,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TrafficPercentStrategy + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TrafficPercentStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy"; + }; + return TrafficPercentStrategy; })(); @@ -2796,6 +2972,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteServiceStrategy + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteServiceStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy"; + }; + return DeleteServiceStrategy; })(); @@ -2859,7 +3050,7 @@ }; /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServices}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|listServices}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef ListServicesCallback * @type {function} @@ -2892,7 +3083,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getService}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|getService}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef GetServiceCallback * @type {function} @@ -2925,7 +3116,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createService}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|createService}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef CreateServiceCallback * @type {function} @@ -2958,7 +3149,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#deleteService}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|deleteService}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef DeleteServiceCallback * @type {function} @@ -2991,7 +3182,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#undeleteService}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|undeleteService}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef UndeleteServiceCallback * @type {function} @@ -3024,7 +3215,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServiceConfigs}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|listServiceConfigs}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef ListServiceConfigsCallback * @type {function} @@ -3057,7 +3248,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getServiceConfig}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|getServiceConfig}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef GetServiceConfigCallback * @type {function} @@ -3090,7 +3281,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createServiceConfig}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|createServiceConfig}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef CreateServiceConfigCallback * @type {function} @@ -3123,7 +3314,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#submitConfigSource}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|submitConfigSource}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef SubmitConfigSourceCallback * @type {function} @@ -3156,7 +3347,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#listServiceRollouts}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|listServiceRollouts}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef ListServiceRolloutsCallback * @type {function} @@ -3189,7 +3380,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#getServiceRollout}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|getServiceRollout}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef GetServiceRolloutCallback * @type {function} @@ -3222,7 +3413,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#createServiceRollout}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|createServiceRollout}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef CreateServiceRolloutCallback * @type {function} @@ -3255,7 +3446,7 @@ */ /** - * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager#generateConfigReport}. + * Callback as used by {@link google.api.servicemanagement.v1.ServiceManager|generateConfigReport}. * @memberof google.api.servicemanagement.v1.ServiceManager * @typedef GenerateConfigReportCallback * @type {function} @@ -3415,18 +3606,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.producerProjectId = reader.string(); - break; - case 5: - message.pageSize = reader.int32(); - break; - case 6: - message.pageToken = reader.string(); - break; - case 7: - message.consumerId = reader.string(); - break; + case 1: { + message.producerProjectId = reader.string(); + break; + } + case 5: { + message.pageSize = reader.int32(); + break; + } + case 6: { + message.pageToken = reader.string(); + break; + } + case 7: { + message.consumerId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3541,6 +3736,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListServicesRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.ListServicesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.ListServicesRequest"; + }; + return ListServicesRequest; })(); @@ -3649,14 +3859,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.services && message.services.length)) - message.services = []; - message.services.push($root.google.api.servicemanagement.v1.ManagedService.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.services && message.services.length)) + message.services = []; + message.services.push($root.google.api.servicemanagement.v1.ManagedService.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3772,6 +3984,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListServicesResponse + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.ListServicesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.ListServicesResponse"; + }; + return ListServicesResponse; })(); @@ -3867,9 +4094,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; + case 1: { + message.serviceName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3959,6 +4187,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetServiceRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.GetServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.GetServiceRequest"; + }; + return GetServiceRequest; })(); @@ -4054,9 +4297,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.service = $root.google.api.servicemanagement.v1.ManagedService.decode(reader, reader.uint32()); - break; + case 1: { + message.service = $root.google.api.servicemanagement.v1.ManagedService.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4151,6 +4395,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateServiceRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.CreateServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.CreateServiceRequest"; + }; + return CreateServiceRequest; })(); @@ -4246,9 +4505,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; + case 1: { + message.serviceName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4338,6 +4598,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteServiceRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.DeleteServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.DeleteServiceRequest"; + }; + return DeleteServiceRequest; })(); @@ -4433,9 +4708,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; + case 1: { + message.serviceName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4525,6 +4801,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UndeleteServiceRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.UndeleteServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UndeleteServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.UndeleteServiceRequest"; + }; + return UndeleteServiceRequest; })(); @@ -4620,9 +4911,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.service = $root.google.api.servicemanagement.v1.ManagedService.decode(reader, reader.uint32()); - break; + case 1: { + message.service = $root.google.api.servicemanagement.v1.ManagedService.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4717,6 +5009,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UndeleteServiceResponse + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.UndeleteServiceResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UndeleteServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.UndeleteServiceResponse"; + }; + return UndeleteServiceResponse; })(); @@ -4834,15 +5141,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; - case 2: - message.configId = reader.string(); - break; - case 3: - message.view = reader.int32(); - break; + case 1: { + message.serviceName = reader.string(); + break; + } + case 2: { + message.configId = reader.string(); + break; + } + case 3: { + message.view = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4962,6 +5272,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetServiceConfigRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.GetServiceConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetServiceConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.GetServiceConfigRequest"; + }; + /** * ConfigView enum. * @name google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView @@ -5093,15 +5418,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; + case 1: { + message.serviceName = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -5208,6 +5536,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListServiceConfigsRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.ListServiceConfigsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServiceConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.ListServiceConfigsRequest"; + }; + return ListServiceConfigsRequest; })(); @@ -5316,14 +5659,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.serviceConfigs && message.serviceConfigs.length)) - message.serviceConfigs = []; - message.serviceConfigs.push($root.google.api.Service.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.serviceConfigs && message.serviceConfigs.length)) + message.serviceConfigs = []; + message.serviceConfigs.push($root.google.api.Service.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5439,6 +5784,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListServiceConfigsResponse + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.ListServiceConfigsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServiceConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.ListServiceConfigsResponse"; + }; + return ListServiceConfigsResponse; })(); @@ -5545,12 +5905,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; - case 2: - message.serviceConfig = $root.google.api.Service.decode(reader, reader.uint32()); - break; + case 1: { + message.serviceName = reader.string(); + break; + } + case 2: { + message.serviceConfig = $root.google.api.Service.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5654,6 +6016,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateServiceConfigRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.CreateServiceConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateServiceConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.CreateServiceConfigRequest"; + }; + return CreateServiceConfigRequest; })(); @@ -5771,15 +6148,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; - case 2: - message.configSource = $root.google.api.servicemanagement.v1.ConfigSource.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 1: { + message.serviceName = reader.string(); + break; + } + case 2: { + message.configSource = $root.google.api.servicemanagement.v1.ConfigSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -5891,6 +6271,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubmitConfigSourceRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitConfigSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.SubmitConfigSourceRequest"; + }; + return SubmitConfigSourceRequest; })(); @@ -5986,9 +6381,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceConfig = $root.google.api.Service.decode(reader, reader.uint32()); - break; + case 1: { + message.serviceConfig = $root.google.api.Service.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6083,6 +6479,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubmitConfigSourceResponse + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.SubmitConfigSourceResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitConfigSourceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.SubmitConfigSourceResponse"; + }; + return SubmitConfigSourceResponse; })(); @@ -6189,12 +6600,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; - case 2: - message.rollout = $root.google.api.servicemanagement.v1.Rollout.decode(reader, reader.uint32()); - break; + case 1: { + message.serviceName = reader.string(); + break; + } + case 2: { + message.rollout = $root.google.api.servicemanagement.v1.Rollout.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6298,6 +6711,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateServiceRolloutRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.CreateServiceRolloutRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateServiceRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.CreateServiceRolloutRequest"; + }; + return CreateServiceRolloutRequest; })(); @@ -6426,18 +6854,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.filter = reader.string(); - break; + case 1: { + message.serviceName = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6552,6 +6984,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListServiceRolloutsRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServiceRolloutsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.ListServiceRolloutsRequest"; + }; + return ListServiceRolloutsRequest; })(); @@ -6660,14 +7107,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rollouts && message.rollouts.length)) - message.rollouts = []; - message.rollouts.push($root.google.api.servicemanagement.v1.Rollout.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.rollouts && message.rollouts.length)) + message.rollouts = []; + message.rollouts.push($root.google.api.servicemanagement.v1.Rollout.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6783,6 +7232,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListServiceRolloutsResponse + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.ListServiceRolloutsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServiceRolloutsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.ListServiceRolloutsResponse"; + }; + return ListServiceRolloutsResponse; })(); @@ -6889,12 +7353,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; - case 2: - message.rolloutId = reader.string(); - break; + case 1: { + message.serviceName = reader.string(); + break; + } + case 2: { + message.rolloutId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6993,6 +7459,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetServiceRolloutRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.GetServiceRolloutRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetServiceRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.GetServiceRolloutRequest"; + }; + return GetServiceRolloutRequest; })(); @@ -7099,12 +7580,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.newConfig = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.oldConfig = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; + case 1: { + message.newConfig = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 2: { + message.oldConfig = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -7213,6 +7696,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GenerateConfigReportRequest + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.GenerateConfigReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateConfigReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.GenerateConfigReportRequest"; + }; + return GenerateConfigReportRequest; })(); @@ -7345,22 +7843,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceName = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - case 3: - if (!(message.changeReports && message.changeReports.length)) - message.changeReports = []; - message.changeReports.push($root.google.api.servicemanagement.v1.ChangeReport.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.diagnostics && message.diagnostics.length)) - message.diagnostics = []; - message.diagnostics.push($root.google.api.servicemanagement.v1.Diagnostic.decode(reader, reader.uint32())); - break; + case 1: { + message.serviceName = reader.string(); + break; + } + case 2: { + message.id = reader.string(); + break; + } + case 3: { + if (!(message.changeReports && message.changeReports.length)) + message.changeReports = []; + message.changeReports.push($root.google.api.servicemanagement.v1.ChangeReport.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.diagnostics && message.diagnostics.length)) + message.diagnostics = []; + message.diagnostics.push($root.google.api.servicemanagement.v1.Diagnostic.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7511,6 +8013,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GenerateConfigReportResponse + * @function getTypeUrl + * @memberof google.api.servicemanagement.v1.GenerateConfigReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateConfigReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicemanagement.v1.GenerateConfigReportResponse"; + }; + return GenerateConfigReportResponse; })(); @@ -7658,23 +8175,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.element = reader.string(); - break; - case 2: - message.oldValue = reader.string(); - break; - case 3: - message.newValue = reader.string(); - break; - case 4: - message.changeType = reader.int32(); - break; - case 5: - if (!(message.advices && message.advices.length)) - message.advices = []; - message.advices.push($root.google.api.Advice.decode(reader, reader.uint32())); - break; + case 1: { + message.element = reader.string(); + break; + } + case 2: { + message.oldValue = reader.string(); + break; + } + case 3: { + message.newValue = reader.string(); + break; + } + case 4: { + message.changeType = reader.int32(); + break; + } + case 5: { + if (!(message.advices && message.advices.length)) + message.advices = []; + message.advices.push($root.google.api.Advice.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7838,6 +8360,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ConfigChange + * @function getTypeUrl + * @memberof google.api.ConfigChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfigChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ConfigChange"; + }; + return ConfigChange; })(); @@ -7933,9 +8470,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.description = reader.string(); - break; + case 2: { + message.description = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8025,6 +8563,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Advice + * @function getTypeUrl + * @memberof google.api.Advice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Advice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Advice"; + }; + return Advice; })(); @@ -8177,14 +8730,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; @@ -8300,6 +8855,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; })(); @@ -8510,38 +9080,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; @@ -8763,6 +9343,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; })(); @@ -8869,12 +9464,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; @@ -8973,6 +9570,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; })(); @@ -9346,95 +9958,120 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.title = reader.string(); - break; - case 22: - message.producerProjectId = reader.string(); - break; - case 33: - message.id = reader.string(); - break; - case 3: - if (!(message.apis && message.apis.length)) - message.apis = []; - message.apis.push($root.google.protobuf.Api.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.types && message.types.length)) - message.types = []; - message.types.push($root.google.protobuf.Type.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enums && message.enums.length)) - message.enums = []; - message.enums.push($root.google.protobuf.Enum.decode(reader, reader.uint32())); - break; - case 6: - message.documentation = $root.google.api.Documentation.decode(reader, reader.uint32()); - break; - case 8: - message.backend = $root.google.api.Backend.decode(reader, reader.uint32()); - break; - case 9: - message.http = $root.google.api.Http.decode(reader, reader.uint32()); - break; - case 10: - message.quota = $root.google.api.Quota.decode(reader, reader.uint32()); - break; - case 11: - message.authentication = $root.google.api.Authentication.decode(reader, reader.uint32()); - break; - case 12: - message.context = $root.google.api.Context.decode(reader, reader.uint32()); - break; - case 15: - message.usage = $root.google.api.Usage.decode(reader, reader.uint32()); - break; - case 18: - if (!(message.endpoints && message.endpoints.length)) - message.endpoints = []; - message.endpoints.push($root.google.api.Endpoint.decode(reader, reader.uint32())); - break; - case 21: - message.control = $root.google.api.Control.decode(reader, reader.uint32()); - break; - case 23: - if (!(message.logs && message.logs.length)) - message.logs = []; - message.logs.push($root.google.api.LogDescriptor.decode(reader, reader.uint32())); - break; - case 24: - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); - break; - case 25: - if (!(message.monitoredResources && message.monitoredResources.length)) - message.monitoredResources = []; - message.monitoredResources.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); - break; - case 26: - message.billing = $root.google.api.Billing.decode(reader, reader.uint32()); - break; - case 27: - message.logging = $root.google.api.Logging.decode(reader, reader.uint32()); - break; - case 28: - message.monitoring = $root.google.api.Monitoring.decode(reader, reader.uint32()); - break; - case 29: - message.systemParameters = $root.google.api.SystemParameters.decode(reader, reader.uint32()); - break; - case 37: - message.sourceInfo = $root.google.api.SourceInfo.decode(reader, reader.uint32()); - break; - case 20: - message.configVersion = $root.google.protobuf.UInt32Value.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 22: { + message.producerProjectId = reader.string(); + break; + } + case 33: { + message.id = reader.string(); + break; + } + case 3: { + if (!(message.apis && message.apis.length)) + message.apis = []; + message.apis.push($root.google.protobuf.Api.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.types && message.types.length)) + message.types = []; + message.types.push($root.google.protobuf.Type.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enums && message.enums.length)) + message.enums = []; + message.enums.push($root.google.protobuf.Enum.decode(reader, reader.uint32())); + break; + } + case 6: { + message.documentation = $root.google.api.Documentation.decode(reader, reader.uint32()); + break; + } + case 8: { + message.backend = $root.google.api.Backend.decode(reader, reader.uint32()); + break; + } + case 9: { + message.http = $root.google.api.Http.decode(reader, reader.uint32()); + break; + } + case 10: { + message.quota = $root.google.api.Quota.decode(reader, reader.uint32()); + break; + } + case 11: { + message.authentication = $root.google.api.Authentication.decode(reader, reader.uint32()); + break; + } + case 12: { + message.context = $root.google.api.Context.decode(reader, reader.uint32()); + break; + } + case 15: { + message.usage = $root.google.api.Usage.decode(reader, reader.uint32()); + break; + } + case 18: { + if (!(message.endpoints && message.endpoints.length)) + message.endpoints = []; + message.endpoints.push($root.google.api.Endpoint.decode(reader, reader.uint32())); + break; + } + case 21: { + message.control = $root.google.api.Control.decode(reader, reader.uint32()); + break; + } + case 23: { + if (!(message.logs && message.logs.length)) + message.logs = []; + message.logs.push($root.google.api.LogDescriptor.decode(reader, reader.uint32())); + break; + } + case 24: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); + break; + } + case 25: { + if (!(message.monitoredResources && message.monitoredResources.length)) + message.monitoredResources = []; + message.monitoredResources.push($root.google.api.MonitoredResourceDescriptor.decode(reader, reader.uint32())); + break; + } + case 26: { + message.billing = $root.google.api.Billing.decode(reader, reader.uint32()); + break; + } + case 27: { + message.logging = $root.google.api.Logging.decode(reader, reader.uint32()); + break; + } + case 28: { + message.monitoring = $root.google.api.Monitoring.decode(reader, reader.uint32()); + break; + } + case 29: { + message.systemParameters = $root.google.api.SystemParameters.decode(reader, reader.uint32()); + break; + } + case 37: { + message.sourceInfo = $root.google.api.SourceInfo.decode(reader, reader.uint32()); + break; + } + case 20: { + message.configVersion = $root.google.protobuf.UInt32Value.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -9908,6 +10545,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Service + * @function getTypeUrl + * @memberof google.api.Service + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Service.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Service"; + }; + return Service; })(); @@ -10018,16 +10670,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.AuthenticationRule.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.providers && message.providers.length)) - message.providers = []; - message.providers.push($root.google.api.AuthProvider.decode(reader, reader.uint32())); - break; + case 3: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.AuthenticationRule.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.providers && message.providers.length)) + message.providers = []; + message.providers.push($root.google.api.AuthProvider.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -10160,6 +10814,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Authentication + * @function getTypeUrl + * @memberof google.api.Authentication + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Authentication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Authentication"; + }; + return Authentication; })(); @@ -10290,20 +10959,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.oauth = $root.google.api.OAuthRequirements.decode(reader, reader.uint32()); - break; - case 5: - message.allowWithoutCredential = reader.bool(); - break; - case 7: - if (!(message.requirements && message.requirements.length)) - message.requirements = []; - message.requirements.push($root.google.api.AuthRequirement.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.oauth = $root.google.api.OAuthRequirements.decode(reader, reader.uint32()); + break; + } + case 5: { + message.allowWithoutCredential = reader.bool(); + break; + } + case 7: { + if (!(message.requirements && message.requirements.length)) + message.requirements = []; + message.requirements.push($root.google.api.AuthRequirement.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -10441,6 +11114,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AuthenticationRule + * @function getTypeUrl + * @memberof google.api.AuthenticationRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthenticationRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.AuthenticationRule"; + }; + return AuthenticationRule; })(); @@ -10572,15 +11260,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.header = reader.string(); - break; - case 2: - message.query = reader.string(); - break; - case 3: - message.valuePrefix = reader.string(); - break; + case 1: { + message.header = reader.string(); + break; + } + case 2: { + message.query = reader.string(); + break; + } + case 3: { + message.valuePrefix = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10697,6 +11388,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for JwtLocation + * @function getTypeUrl + * @memberof google.api.JwtLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JwtLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JwtLocation"; + }; + return JwtLocation; })(); @@ -10849,26 +11555,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.issuer = reader.string(); - break; - case 3: - message.jwksUri = reader.string(); - break; - case 4: - message.audiences = reader.string(); - break; - case 5: - message.authorizationUrl = reader.string(); - break; - case 6: - if (!(message.jwtLocations && message.jwtLocations.length)) - message.jwtLocations = []; - message.jwtLocations.push($root.google.api.JwtLocation.decode(reader, reader.uint32())); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.issuer = reader.string(); + break; + } + case 3: { + message.jwksUri = reader.string(); + break; + } + case 4: { + message.audiences = reader.string(); + break; + } + case 5: { + message.authorizationUrl = reader.string(); + break; + } + case 6: { + if (!(message.jwtLocations && message.jwtLocations.length)) + message.jwtLocations = []; + message.jwtLocations.push($root.google.api.JwtLocation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -11017,6 +11729,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AuthProvider + * @function getTypeUrl + * @memberof google.api.AuthProvider + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthProvider.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.AuthProvider"; + }; + return AuthProvider; })(); @@ -11112,9 +11839,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.canonicalScopes = reader.string(); - break; + case 1: { + message.canonicalScopes = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11204,6 +11932,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OAuthRequirements + * @function getTypeUrl + * @memberof google.api.OAuthRequirements + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OAuthRequirements.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.OAuthRequirements"; + }; + return OAuthRequirements; })(); @@ -11310,12 +12053,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.providerId = reader.string(); - break; - case 2: - message.audiences = reader.string(); - break; + case 1: { + message.providerId = reader.string(); + break; + } + case 2: { + message.audiences = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11414,6 +12159,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AuthRequirement + * @function getTypeUrl + * @memberof google.api.AuthRequirement + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthRequirement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.AuthRequirement"; + }; + return AuthRequirement; })(); @@ -11511,11 +12271,12 @@ 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.BackendRule.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.BackendRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -11622,6 +12383,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Backend + * @function getTypeUrl + * @memberof google.api.Backend + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Backend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Backend"; + }; + return Backend; })(); @@ -11819,33 +12595,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.address = reader.string(); - break; - case 3: - message.deadline = reader.double(); - break; - case 4: - message.minDeadline = reader.double(); - break; - case 5: - message.operationDeadline = reader.double(); - break; - case 6: - message.pathTranslation = reader.int32(); - break; - case 7: - message.jwtAudience = reader.string(); - break; - case 8: - message.disableAuth = reader.bool(); - break; - case 9: - message.protocol = reader.string(); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.address = reader.string(); + break; + } + case 3: { + message.deadline = reader.double(); + break; + } + case 4: { + message.minDeadline = reader.double(); + break; + } + case 5: { + message.operationDeadline = reader.double(); + break; + } + case 6: { + message.pathTranslation = reader.int32(); + break; + } + case 7: { + message.jwtAudience = reader.string(); + break; + } + case 8: { + message.disableAuth = reader.bool(); + break; + } + case 9: { + message.protocol = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12029,6 +12814,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BackendRule + * @function getTypeUrl + * @memberof google.api.BackendRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackendRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.BackendRule"; + }; + /** * PathTranslation enum. * @name google.api.BackendRule.PathTranslation @@ -12142,11 +12942,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 8: - if (!(message.consumerDestinations && message.consumerDestinations.length)) - message.consumerDestinations = []; - message.consumerDestinations.push($root.google.api.Billing.BillingDestination.decode(reader, reader.uint32())); - break; + case 8: { + if (!(message.consumerDestinations && message.consumerDestinations.length)) + message.consumerDestinations = []; + message.consumerDestinations.push($root.google.api.Billing.BillingDestination.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -12253,6 +13054,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Billing + * @function getTypeUrl + * @memberof google.api.Billing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Billing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Billing"; + }; + Billing.BillingDestination = (function() { /** @@ -12358,14 +13174,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.monitoredResource = reader.string(); - break; - case 2: - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push(reader.string()); - break; + case 1: { + message.monitoredResource = reader.string(); + break; + } + case 2: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -12476,42 +13294,46 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BillingDestination + * @function getTypeUrl + * @memberof google.api.Billing.BillingDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BillingDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Billing.BillingDestination"; + }; + return BillingDestination; })(); return Billing; })(); - api.MetricDescriptor = (function() { + api.Context = (function() { /** - * Properties of a MetricDescriptor. + * Properties of a Context. * @memberof google.api - * @interface IMetricDescriptor - * @property {string|null} [name] MetricDescriptor name - * @property {string|null} [type] MetricDescriptor type - * @property {Array.|null} [labels] MetricDescriptor labels - * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind - * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType - * @property {string|null} [unit] MetricDescriptor unit - * @property {string|null} [description] MetricDescriptor description - * @property {string|null} [displayName] MetricDescriptor displayName - * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage - * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes + * @interface IContext + * @property {Array.|null} [rules] Context rules */ /** - * Constructs a new MetricDescriptor. + * Constructs a new Context. * @memberof google.api - * @classdesc Represents a MetricDescriptor. - * @implements IMetricDescriptor + * @classdesc Represents a Context. + * @implements IContext * @constructor - * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @param {google.api.IContext=} [properties] Properties to set */ - function MetricDescriptor(properties) { - this.labels = []; - this.monitoredResourceTypes = []; + function Context(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12519,212 +13341,376 @@ } /** - * MetricDescriptor name. - * @member {string} name - * @memberof google.api.MetricDescriptor + * Context rules. + * @member {Array.} rules + * @memberof google.api.Context * @instance */ - MetricDescriptor.prototype.name = ""; + Context.prototype.rules = $util.emptyArray; /** - * MetricDescriptor type. - * @member {string} type - * @memberof google.api.MetricDescriptor - * @instance + * Creates a new Context instance using the specified properties. + * @function create + * @memberof google.api.Context + * @static + * @param {google.api.IContext=} [properties] Properties to set + * @returns {google.api.Context} Context instance */ - MetricDescriptor.prototype.type = ""; + Context.create = function create(properties) { + return new Context(properties); + }; /** - * MetricDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MetricDescriptor - * @instance + * Encodes the specified Context message. Does not implicitly {@link google.api.Context.verify|verify} messages. + * @function encode + * @memberof google.api.Context + * @static + * @param {google.api.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MetricDescriptor.prototype.labels = $util.emptyArray; + Context.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.ContextRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * MetricDescriptor metricKind. - * @member {google.api.MetricDescriptor.MetricKind} metricKind - * @memberof google.api.MetricDescriptor - * @instance + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.api.Context.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Context + * @static + * @param {google.api.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MetricDescriptor.prototype.metricKind = 0; + Context.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * MetricDescriptor valueType. - * @member {google.api.MetricDescriptor.ValueType} valueType - * @memberof google.api.MetricDescriptor - * @instance + * Decodes a Context message from the specified reader or buffer. + * @function decode + * @memberof google.api.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.prototype.valueType = 0; + Context.decode = function 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.Context(); + 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.ContextRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * MetricDescriptor unit. - * @member {string} unit - * @memberof google.api.MetricDescriptor + * Decodes a Context message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Context.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Context message. + * @function verify + * @memberof google.api.Context + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Context.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.ContextRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates a Context message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Context + * @static + * @param {Object.} object Plain object + * @returns {google.api.Context} Context + */ + Context.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Context) + return object; + var message = new $root.google.api.Context(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Context.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Context.rules: object expected"); + message.rules[i] = $root.google.api.ContextRule.fromObject(object.rules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Context message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Context + * @static + * @param {google.api.Context} message Context + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Context.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.ContextRule.toObject(message.rules[j], options); + } + return object; + }; + + /** + * Converts this Context to JSON. + * @function toJSON + * @memberof google.api.Context * @instance + * @returns {Object.} JSON object */ - MetricDescriptor.prototype.unit = ""; + Context.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * MetricDescriptor description. - * @member {string} description - * @memberof google.api.MetricDescriptor + * Gets the default type url for Context + * @function getTypeUrl + * @memberof google.api.Context + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Context.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Context"; + }; + + return Context; + })(); + + api.ContextRule = (function() { + + /** + * Properties of a ContextRule. + * @memberof google.api + * @interface IContextRule + * @property {string|null} [selector] ContextRule selector + * @property {Array.|null} [requested] ContextRule requested + * @property {Array.|null} [provided] ContextRule provided + * @property {Array.|null} [allowedRequestExtensions] ContextRule allowedRequestExtensions + * @property {Array.|null} [allowedResponseExtensions] ContextRule allowedResponseExtensions + */ + + /** + * Constructs a new ContextRule. + * @memberof google.api + * @classdesc Represents a ContextRule. + * @implements IContextRule + * @constructor + * @param {google.api.IContextRule=} [properties] Properties to set + */ + function ContextRule(properties) { + this.requested = []; + this.provided = []; + this.allowedRequestExtensions = []; + this.allowedResponseExtensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContextRule selector. + * @member {string} selector + * @memberof google.api.ContextRule * @instance */ - MetricDescriptor.prototype.description = ""; + ContextRule.prototype.selector = ""; /** - * MetricDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MetricDescriptor + * ContextRule requested. + * @member {Array.} requested + * @memberof google.api.ContextRule * @instance */ - MetricDescriptor.prototype.displayName = ""; + ContextRule.prototype.requested = $util.emptyArray; /** - * MetricDescriptor metadata. - * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata - * @memberof google.api.MetricDescriptor + * ContextRule provided. + * @member {Array.} provided + * @memberof google.api.ContextRule * @instance */ - MetricDescriptor.prototype.metadata = null; + ContextRule.prototype.provided = $util.emptyArray; /** - * MetricDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor + * ContextRule allowedRequestExtensions. + * @member {Array.} allowedRequestExtensions + * @memberof google.api.ContextRule * @instance */ - MetricDescriptor.prototype.launchStage = 0; + ContextRule.prototype.allowedRequestExtensions = $util.emptyArray; /** - * MetricDescriptor monitoredResourceTypes. - * @member {Array.} monitoredResourceTypes - * @memberof google.api.MetricDescriptor + * ContextRule allowedResponseExtensions. + * @member {Array.} allowedResponseExtensions + * @memberof google.api.ContextRule * @instance */ - MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; + ContextRule.prototype.allowedResponseExtensions = $util.emptyArray; /** - * Creates a new MetricDescriptor instance using the specified properties. + * Creates a new ContextRule instance using the specified properties. * @function create - * @memberof google.api.MetricDescriptor + * @memberof google.api.ContextRule * @static - * @param {google.api.IMetricDescriptor=} [properties] Properties to set - * @returns {google.api.MetricDescriptor} MetricDescriptor instance + * @param {google.api.IContextRule=} [properties] Properties to set + * @returns {google.api.ContextRule} ContextRule instance */ - MetricDescriptor.create = function create(properties) { - return new MetricDescriptor(properties); + ContextRule.create = function create(properties) { + return new ContextRule(properties); }; /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * Encodes the specified ContextRule message. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. * @function encode - * @memberof google.api.MetricDescriptor + * @memberof google.api.ContextRule * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {google.api.IContextRule} message ContextRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricDescriptor.encode = function encode(message, writer) { + ContextRule.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.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); - if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); - if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) - for (var i = 0; i < message.monitoredResourceTypes.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.requested != null && message.requested.length) + for (var i = 0; i < message.requested.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requested[i]); + if (message.provided != null && message.provided.length) + for (var i = 0; i < message.provided.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.provided[i]); + if (message.allowedRequestExtensions != null && message.allowedRequestExtensions.length) + for (var i = 0; i < message.allowedRequestExtensions.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.allowedRequestExtensions[i]); + if (message.allowedResponseExtensions != null && message.allowedResponseExtensions.length) + for (var i = 0; i < message.allowedResponseExtensions.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.allowedResponseExtensions[i]); return writer; }; /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * Encodes the specified ContextRule message, length delimited. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MetricDescriptor + * @memberof google.api.ContextRule * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {google.api.IContextRule} message ContextRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + ContextRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetricDescriptor message from the specified reader or buffer. + * Decodes a ContextRule message from the specified reader or buffer. * @function decode - * @memberof google.api.MetricDescriptor + * @memberof google.api.ContextRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.api.ContextRule} ContextRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.decode = function decode(reader, length) { + ContextRule.decode = function 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.MetricDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ContextRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 8: - message.type = reader.string(); - break; - case 2: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 3: - message.metricKind = reader.int32(); - break; - case 4: - message.valueType = reader.int32(); - break; - case 5: - message.unit = reader.string(); - break; - case 6: - message.description = reader.string(); - break; - case 7: - message.displayName = reader.string(); - break; - case 10: - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); - break; - case 12: - message.launchStage = reader.int32(); - break; - case 13: - if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) - message.monitoredResourceTypes = []; - message.monitoredResourceTypes.push(reader.string()); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + if (!(message.requested && message.requested.length)) + message.requested = []; + message.requested.push(reader.string()); + break; + } + case 3: { + if (!(message.provided && message.provided.length)) + message.provided = []; + message.provided.push(reader.string()); + break; + } + case 4: { + if (!(message.allowedRequestExtensions && message.allowedRequestExtensions.length)) + message.allowedRequestExtensions = []; + message.allowedRequestExtensions.push(reader.string()); + break; + } + case 5: { + if (!(message.allowedResponseExtensions && message.allowedResponseExtensions.length)) + message.allowedResponseExtensions = []; + message.allowedResponseExtensions.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -12734,767 +13720,568 @@ }; /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * Decodes a ContextRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MetricDescriptor + * @memberof google.api.ContextRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.api.ContextRule} ContextRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { + ContextRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetricDescriptor message. + * Verifies a ContextRule message. * @function verify - * @memberof google.api.MetricDescriptor + * @memberof google.api.ContextRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetricDescriptor.verify = function verify(message) { + ContextRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); - if (error) - return "labels." + error; - } + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.requested != null && message.hasOwnProperty("requested")) { + if (!Array.isArray(message.requested)) + return "requested: array expected"; + for (var i = 0; i < message.requested.length; ++i) + if (!$util.isString(message.requested[i])) + return "requested: string[] expected"; } - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - switch (message.metricKind) { - default: - return "metricKind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.unit != null && message.hasOwnProperty("unit")) - if (!$util.isString(message.unit)) - return "unit: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); - if (error) - return "metadata." + error; + if (message.provided != null && message.hasOwnProperty("provided")) { + if (!Array.isArray(message.provided)) + return "provided: array expected"; + for (var i = 0; i < message.provided.length; ++i) + if (!$util.isString(message.provided[i])) + return "provided: 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.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { - if (!Array.isArray(message.monitoredResourceTypes)) - return "monitoredResourceTypes: array expected"; - for (var i = 0; i < message.monitoredResourceTypes.length; ++i) - if (!$util.isString(message.monitoredResourceTypes[i])) - return "monitoredResourceTypes: string[] expected"; + if (message.allowedRequestExtensions != null && message.hasOwnProperty("allowedRequestExtensions")) { + if (!Array.isArray(message.allowedRequestExtensions)) + return "allowedRequestExtensions: array expected"; + for (var i = 0; i < message.allowedRequestExtensions.length; ++i) + if (!$util.isString(message.allowedRequestExtensions[i])) + return "allowedRequestExtensions: string[] expected"; + } + if (message.allowedResponseExtensions != null && message.hasOwnProperty("allowedResponseExtensions")) { + if (!Array.isArray(message.allowedResponseExtensions)) + return "allowedResponseExtensions: array expected"; + for (var i = 0; i < message.allowedResponseExtensions.length; ++i) + if (!$util.isString(message.allowedResponseExtensions[i])) + return "allowedResponseExtensions: string[] expected"; } return null; }; /** - * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a ContextRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MetricDescriptor + * @memberof google.api.ContextRule * @static * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor} MetricDescriptor + * @returns {google.api.ContextRule} ContextRule */ - MetricDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor) + ContextRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ContextRule) return object; - var message = new $root.google.api.MetricDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MetricDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MetricDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); - } - } - switch (object.metricKind) { - case "METRIC_KIND_UNSPECIFIED": - case 0: - message.metricKind = 0; - break; - case "GAUGE": - case 1: - message.metricKind = 1; - break; - case "DELTA": - case 2: - message.metricKind = 2; - break; - case "CUMULATIVE": - case 3: - message.metricKind = 3; - break; - } - switch (object.valueType) { - case "VALUE_TYPE_UNSPECIFIED": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - case "DOUBLE": - case 3: - message.valueType = 3; - break; - case "STRING": - case 4: - message.valueType = 4; - break; - case "DISTRIBUTION": - case 5: - message.valueType = 5; - break; - case "MONEY": - case 6: - message.valueType = 6; - break; + var message = new $root.google.api.ContextRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.requested) { + if (!Array.isArray(object.requested)) + throw TypeError(".google.api.ContextRule.requested: array expected"); + message.requested = []; + for (var i = 0; i < object.requested.length; ++i) + message.requested[i] = String(object.requested[i]); } - if (object.unit != null) - message.unit = String(object.unit); - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); + if (object.provided) { + if (!Array.isArray(object.provided)) + throw TypeError(".google.api.ContextRule.provided: array expected"); + message.provided = []; + for (var i = 0; i < object.provided.length; ++i) + message.provided[i] = String(object.provided[i]); } - switch (object.launchStage) { - 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.allowedRequestExtensions) { + if (!Array.isArray(object.allowedRequestExtensions)) + throw TypeError(".google.api.ContextRule.allowedRequestExtensions: array expected"); + message.allowedRequestExtensions = []; + for (var i = 0; i < object.allowedRequestExtensions.length; ++i) + message.allowedRequestExtensions[i] = String(object.allowedRequestExtensions[i]); } - if (object.monitoredResourceTypes) { - if (!Array.isArray(object.monitoredResourceTypes)) - throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); - message.monitoredResourceTypes = []; - for (var i = 0; i < object.monitoredResourceTypes.length; ++i) - message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); + if (object.allowedResponseExtensions) { + if (!Array.isArray(object.allowedResponseExtensions)) + throw TypeError(".google.api.ContextRule.allowedResponseExtensions: array expected"); + message.allowedResponseExtensions = []; + for (var i = 0; i < object.allowedResponseExtensions.length; ++i) + message.allowedResponseExtensions[i] = String(object.allowedResponseExtensions[i]); } return message; }; /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a ContextRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MetricDescriptor + * @memberof google.api.ContextRule * @static - * @param {google.api.MetricDescriptor} message MetricDescriptor + * @param {google.api.ContextRule} message ContextRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetricDescriptor.toObject = function toObject(message, options) { + ContextRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.labels = []; - object.monitoredResourceTypes = []; + object.requested = []; + object.provided = []; + object.allowedRequestExtensions = []; + object.allowedResponseExtensions = []; } - if (options.defaults) { - object.name = ""; - object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; - object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; - object.unit = ""; - object.description = ""; - object.displayName = ""; - object.type = ""; - object.metadata = null; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + if (options.defaults) + object.selector = ""; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.requested && message.requested.length) { + object.requested = []; + for (var j = 0; j < message.requested.length; ++j) + object.requested[j] = message.requested[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + if (message.provided && message.provided.length) { + object.provided = []; + for (var j = 0; j < message.provided.length; ++j) + object.provided[j] = message.provided[j]; } - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; - if (message.unit != null && message.hasOwnProperty("unit")) - object.unit = message.unit; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { - object.monitoredResourceTypes = []; - for (var j = 0; j < message.monitoredResourceTypes.length; ++j) - object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; + if (message.allowedRequestExtensions && message.allowedRequestExtensions.length) { + object.allowedRequestExtensions = []; + for (var j = 0; j < message.allowedRequestExtensions.length; ++j) + object.allowedRequestExtensions[j] = message.allowedRequestExtensions[j]; + } + if (message.allowedResponseExtensions && message.allowedResponseExtensions.length) { + object.allowedResponseExtensions = []; + for (var j = 0; j < message.allowedResponseExtensions.length; ++j) + object.allowedResponseExtensions[j] = message.allowedResponseExtensions[j]; } return object; }; /** - * Converts this MetricDescriptor to JSON. + * Converts this ContextRule to JSON. * @function toJSON - * @memberof google.api.MetricDescriptor + * @memberof google.api.ContextRule * @instance * @returns {Object.} JSON object */ - MetricDescriptor.prototype.toJSON = function toJSON() { + ContextRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - MetricDescriptor.MetricDescriptorMetadata = (function() { - - /** - * Properties of a MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @interface IMetricDescriptorMetadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage - * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod - * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay - */ - - /** - * Constructs a new MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @classdesc Represents a MetricDescriptorMetadata. - * @implements IMetricDescriptorMetadata - * @constructor - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set - */ - function MetricDescriptorMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for ContextRule + * @function getTypeUrl + * @memberof google.api.ContextRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContextRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.api.ContextRule"; + }; - /** - * MetricDescriptorMetadata launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.launchStage = 0; + return ContextRule; + })(); - /** - * MetricDescriptorMetadata samplePeriod. - * @member {google.protobuf.IDuration|null|undefined} samplePeriod - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.samplePeriod = null; + api.Control = (function() { - /** - * MetricDescriptorMetadata ingestDelay. - * @member {google.protobuf.IDuration|null|undefined} ingestDelay - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.ingestDelay = null; + /** + * Properties of a Control. + * @memberof google.api + * @interface IControl + * @property {string|null} [environment] Control environment + */ - /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. - * @function create - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance - */ - MetricDescriptorMetadata.create = function create(properties) { - return new MetricDescriptorMetadata(properties); - }; + /** + * Constructs a new Control. + * @memberof google.api + * @classdesc Represents a Control. + * @implements IControl + * @constructor + * @param {google.api.IControl=} [properties] Properties to set + */ + function Control(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @function encode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptorMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); - if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) - $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) - $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Control environment. + * @member {string} environment + * @memberof google.api.Control + * @instance + */ + Control.prototype.environment = ""; - /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Control instance using the specified properties. + * @function create + * @memberof google.api.Control + * @static + * @param {google.api.IControl=} [properties] Properties to set + * @returns {google.api.Control} Control instance + */ + Control.create = function create(properties) { + return new Control(properties); + }; - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptorMetadata.decode = function 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.MetricDescriptor.MetricDescriptorMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.launchStage = reader.int32(); - break; - case 2: - message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Control message. Does not implicitly {@link google.api.Control.verify|verify} messages. + * @function encode + * @memberof google.api.Control + * @static + * @param {google.api.IControl} message Control message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Control.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + return writer; + }; - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified Control message, length delimited. Does not implicitly {@link google.api.Control.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Control + * @static + * @param {google.api.IControl} message Control message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Control.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a MetricDescriptorMetadata message. - * @function verify - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricDescriptorMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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: + /** + * Decodes a Control message from the specified reader or buffer. + * @function decode + * @memberof google.api.Control + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Control} Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Control.decode = function 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.Control(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); break; } - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { - var error = $root.google.protobuf.Duration.verify(message.samplePeriod); - if (error) - return "samplePeriod." + error; - } - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { - var error = $root.google.protobuf.Duration.verify(message.ingestDelay); - if (error) - return "ingestDelay." + error; - } - return null; - }; - - /** - * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - */ - MetricDescriptorMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) - return object; - var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); - switch (object.launchStage) { - 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; + default: + reader.skipType(tag & 7); break; } - if (object.samplePeriod != null) { - if (typeof object.samplePeriod !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); - message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); - } - if (object.ingestDelay != null) { - if (typeof object.ingestDelay !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); - message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricDescriptorMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.samplePeriod = null; - object.ingestDelay = null; - } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) - object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) - object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); - return object; - }; + /** + * Decodes a Control message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Control + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Control} Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Control.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this MetricDescriptorMetadata to JSON. - * @function toJSON - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - * @returns {Object.} JSON object - */ - MetricDescriptorMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a Control message. + * @function verify + * @memberof google.api.Control + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Control.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + return null; + }; - return MetricDescriptorMetadata; - })(); + /** + * Creates a Control message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Control + * @static + * @param {Object.} object Plain object + * @returns {google.api.Control} Control + */ + Control.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Control) + return object; + var message = new $root.google.api.Control(); + if (object.environment != null) + message.environment = String(object.environment); + return message; + }; /** - * MetricKind enum. - * @name google.api.MetricDescriptor.MetricKind - * @enum {number} - * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value - * @property {number} GAUGE=1 GAUGE value - * @property {number} DELTA=2 DELTA value - * @property {number} CUMULATIVE=3 CUMULATIVE value + * Creates a plain object from a Control message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Control + * @static + * @param {google.api.Control} message Control + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - MetricDescriptor.MetricKind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "GAUGE"] = 1; - values[valuesById[2] = "DELTA"] = 2; - values[valuesById[3] = "CUMULATIVE"] = 3; - return values; - })(); + Control.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.environment = ""; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + return object; + }; /** - * ValueType enum. - * @name google.api.MetricDescriptor.ValueType - * @enum {number} - * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - * @property {number} DOUBLE=3 DOUBLE value - * @property {number} STRING=4 STRING value - * @property {number} DISTRIBUTION=5 DISTRIBUTION value - * @property {number} MONEY=6 MONEY value + * Converts this Control to JSON. + * @function toJSON + * @memberof google.api.Control + * @instance + * @returns {Object.} JSON object */ - MetricDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - values[valuesById[3] = "DOUBLE"] = 3; - values[valuesById[4] = "STRING"] = 4; - values[valuesById[5] = "DISTRIBUTION"] = 5; - values[valuesById[6] = "MONEY"] = 6; - return values; - })(); + Control.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MetricDescriptor; + /** + * Gets the default type url for Control + * @function getTypeUrl + * @memberof google.api.Control + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Control.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Control"; + }; + + return Control; })(); - api.Metric = (function() { + api.Documentation = (function() { /** - * Properties of a Metric. + * Properties of a Documentation. * @memberof google.api - * @interface IMetric - * @property {string|null} [type] Metric type - * @property {Object.|null} [labels] Metric labels + * @interface IDocumentation + * @property {string|null} [summary] Documentation summary + * @property {Array.|null} [pages] Documentation pages + * @property {Array.|null} [rules] Documentation rules + * @property {string|null} [documentationRootUrl] Documentation documentationRootUrl + * @property {string|null} [serviceRootUrl] Documentation serviceRootUrl + * @property {string|null} [overview] Documentation overview */ /** - * Constructs a new Metric. + * Constructs a new Documentation. * @memberof google.api - * @classdesc Represents a Metric. - * @implements IMetric + * @classdesc Represents a Documentation. + * @implements IDocumentation * @constructor - * @param {google.api.IMetric=} [properties] Properties to set + * @param {google.api.IDocumentation=} [properties] Properties to set + */ + function Documentation(properties) { + this.pages = []; + 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]]; + } + + /** + * Documentation summary. + * @member {string} summary + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.summary = ""; + + /** + * Documentation pages. + * @member {Array.} pages + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.pages = $util.emptyArray; + + /** + * Documentation rules. + * @member {Array.} rules + * @memberof google.api.Documentation + * @instance */ - function Metric(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Documentation.prototype.rules = $util.emptyArray; /** - * Metric type. - * @member {string} type - * @memberof google.api.Metric + * Documentation documentationRootUrl. + * @member {string} documentationRootUrl + * @memberof google.api.Documentation * @instance */ - Metric.prototype.type = ""; + Documentation.prototype.documentationRootUrl = ""; /** - * Metric labels. - * @member {Object.} labels - * @memberof google.api.Metric + * Documentation serviceRootUrl. + * @member {string} serviceRootUrl + * @memberof google.api.Documentation * @instance */ - Metric.prototype.labels = $util.emptyObject; + Documentation.prototype.serviceRootUrl = ""; /** - * Creates a new Metric instance using the specified properties. + * Documentation overview. + * @member {string} overview + * @memberof google.api.Documentation + * @instance + */ + Documentation.prototype.overview = ""; + + /** + * Creates a new Documentation instance using the specified properties. * @function create - * @memberof google.api.Metric + * @memberof google.api.Documentation * @static - * @param {google.api.IMetric=} [properties] Properties to set - * @returns {google.api.Metric} Metric instance + * @param {google.api.IDocumentation=} [properties] Properties to set + * @returns {google.api.Documentation} Documentation instance */ - Metric.create = function create(properties) { - return new Metric(properties); + Documentation.create = function create(properties) { + return new Documentation(properties); }; /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * Encodes the specified Documentation message. Does not implicitly {@link google.api.Documentation.verify|verify} messages. * @function encode - * @memberof google.api.Metric + * @memberof google.api.Documentation * @static - * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {google.api.IDocumentation} message Documentation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metric.encode = function encode(message, writer) { + Documentation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.summary); + if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.overview); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.DocumentationRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.documentationRootUrl != null && Object.hasOwnProperty.call(message, "documentationRootUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.documentationRootUrl); + if (message.pages != null && message.pages.length) + for (var i = 0; i < message.pages.length; ++i) + $root.google.api.Page.encode(message.pages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.serviceRootUrl != null && Object.hasOwnProperty.call(message, "serviceRootUrl")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.serviceRootUrl); return writer; }; /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.api.Documentation.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Metric + * @memberof google.api.Documentation * @static - * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {google.api.IDocumentation} message Documentation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { + Documentation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Metric message from the specified reader or buffer. + * Decodes a Documentation message from the specified reader or buffer. * @function decode - * @memberof google.api.Metric + * @memberof google.api.Documentation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Metric} Metric + * @returns {google.api.Documentation} Documentation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metric.decode = function decode(reader, length) { + Documentation.decode = function 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.Metric(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Documentation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.type = reader.string(); - break; - case 2: - 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.summary = reader.string(); + break; + } + case 5: { + if (!(message.pages && message.pages.length)) + message.pages = []; + message.pages.push($root.google.api.Page.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.DocumentationRule.decode(reader, reader.uint32())); + break; + } + case 4: { + message.documentationRootUrl = reader.string(); + break; + } + case 6: { + message.serviceRootUrl = reader.string(); + break; + } + case 2: { + message.overview = reader.string(); + break; } - message.labels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -13504,132 +14291,201 @@ }; /** - * Decodes a Metric message from the specified reader or buffer, length delimited. + * Decodes a Documentation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Metric + * @memberof google.api.Documentation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Metric} Metric + * @returns {google.api.Documentation} Documentation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metric.decodeDelimited = function decodeDelimited(reader) { + Documentation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Metric message. + * Verifies a Documentation message. * @function verify - * @memberof google.api.Metric + * @memberof google.api.Documentation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Metric.verify = function verify(message) { + Documentation.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.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.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + if (message.pages != null && message.hasOwnProperty("pages")) { + if (!Array.isArray(message.pages)) + return "pages: array expected"; + for (var i = 0; i < message.pages.length; ++i) { + var error = $root.google.api.Page.verify(message.pages[i]); + if (error) + return "pages." + error; + } + } + 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.DocumentationRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } } + if (message.documentationRootUrl != null && message.hasOwnProperty("documentationRootUrl")) + if (!$util.isString(message.documentationRootUrl)) + return "documentationRootUrl: string expected"; + if (message.serviceRootUrl != null && message.hasOwnProperty("serviceRootUrl")) + if (!$util.isString(message.serviceRootUrl)) + return "serviceRootUrl: string expected"; + if (message.overview != null && message.hasOwnProperty("overview")) + if (!$util.isString(message.overview)) + return "overview: string expected"; return null; }; /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * Creates a Documentation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Metric + * @memberof google.api.Documentation * @static * @param {Object.} object Plain object - * @returns {google.api.Metric} Metric + * @returns {google.api.Documentation} Documentation */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Metric) + Documentation.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Documentation) return object; - var message = new $root.google.api.Metric(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.Metric.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]]); + var message = new $root.google.api.Documentation(); + if (object.summary != null) + message.summary = String(object.summary); + if (object.pages) { + if (!Array.isArray(object.pages)) + throw TypeError(".google.api.Documentation.pages: array expected"); + message.pages = []; + for (var i = 0; i < object.pages.length; ++i) { + if (typeof object.pages[i] !== "object") + throw TypeError(".google.api.Documentation.pages: object expected"); + message.pages[i] = $root.google.api.Page.fromObject(object.pages[i]); + } + } + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Documentation.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Documentation.rules: object expected"); + message.rules[i] = $root.google.api.DocumentationRule.fromObject(object.rules[i]); + } } + if (object.documentationRootUrl != null) + message.documentationRootUrl = String(object.documentationRootUrl); + if (object.serviceRootUrl != null) + message.serviceRootUrl = String(object.serviceRootUrl); + if (object.overview != null) + message.overview = String(object.overview); return message; }; /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. + * Creates a plain object from a Documentation message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Metric + * @memberof google.api.Documentation * @static - * @param {google.api.Metric} message Metric + * @param {google.api.Documentation} message Documentation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Metric.toObject = function toObject(message, options) { + Documentation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) - object.type = ""; - 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 (options.arrays || options.defaults) { + object.rules = []; + object.pages = []; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; + if (options.defaults) { + object.summary = ""; + object.overview = ""; + object.documentationRootUrl = ""; + object.serviceRootUrl = ""; + } + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + if (message.overview != null && message.hasOwnProperty("overview")) + object.overview = message.overview; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.DocumentationRule.toObject(message.rules[j], options); + } + if (message.documentationRootUrl != null && message.hasOwnProperty("documentationRootUrl")) + object.documentationRootUrl = message.documentationRootUrl; + if (message.pages && message.pages.length) { + object.pages = []; + for (var j = 0; j < message.pages.length; ++j) + object.pages[j] = $root.google.api.Page.toObject(message.pages[j], options); + } + if (message.serviceRootUrl != null && message.hasOwnProperty("serviceRootUrl")) + object.serviceRootUrl = message.serviceRootUrl; return object; }; /** - * Converts this Metric to JSON. + * Converts this Documentation to JSON. * @function toJSON - * @memberof google.api.Metric + * @memberof google.api.Documentation * @instance * @returns {Object.} JSON object */ - Metric.prototype.toJSON = function toJSON() { + Documentation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Metric; + /** + * Gets the default type url for Documentation + * @function getTypeUrl + * @memberof google.api.Documentation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Documentation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Documentation"; + }; + + return Documentation; })(); - api.LabelDescriptor = (function() { + api.DocumentationRule = (function() { /** - * Properties of a LabelDescriptor. + * Properties of a DocumentationRule. * @memberof google.api - * @interface ILabelDescriptor - * @property {string|null} [key] LabelDescriptor key - * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType - * @property {string|null} [description] LabelDescriptor description + * @interface IDocumentationRule + * @property {string|null} [selector] DocumentationRule selector + * @property {string|null} [description] DocumentationRule description + * @property {string|null} [deprecationDescription] DocumentationRule deprecationDescription */ /** - * Constructs a new LabelDescriptor. + * Constructs a new DocumentationRule. * @memberof google.api - * @classdesc Represents a LabelDescriptor. - * @implements ILabelDescriptor + * @classdesc Represents a DocumentationRule. + * @implements IDocumentationRule * @constructor - * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @param {google.api.IDocumentationRule=} [properties] Properties to set */ - function LabelDescriptor(properties) { + function DocumentationRule(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13637,102 +14493,105 @@ } /** - * LabelDescriptor key. - * @member {string} key - * @memberof google.api.LabelDescriptor + * DocumentationRule selector. + * @member {string} selector + * @memberof google.api.DocumentationRule * @instance */ - LabelDescriptor.prototype.key = ""; + DocumentationRule.prototype.selector = ""; /** - * LabelDescriptor valueType. - * @member {google.api.LabelDescriptor.ValueType} valueType - * @memberof google.api.LabelDescriptor + * DocumentationRule description. + * @member {string} description + * @memberof google.api.DocumentationRule * @instance */ - LabelDescriptor.prototype.valueType = 0; + DocumentationRule.prototype.description = ""; /** - * LabelDescriptor description. - * @member {string} description - * @memberof google.api.LabelDescriptor + * DocumentationRule deprecationDescription. + * @member {string} deprecationDescription + * @memberof google.api.DocumentationRule * @instance */ - LabelDescriptor.prototype.description = ""; + DocumentationRule.prototype.deprecationDescription = ""; /** - * Creates a new LabelDescriptor instance using the specified properties. + * Creates a new DocumentationRule instance using the specified properties. * @function create - * @memberof google.api.LabelDescriptor + * @memberof google.api.DocumentationRule * @static - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - * @returns {google.api.LabelDescriptor} LabelDescriptor instance + * @param {google.api.IDocumentationRule=} [properties] Properties to set + * @returns {google.api.DocumentationRule} DocumentationRule instance */ - LabelDescriptor.create = function create(properties) { - return new LabelDescriptor(properties); + DocumentationRule.create = function create(properties) { + return new DocumentationRule(properties); }; /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified DocumentationRule message. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. * @function encode - * @memberof google.api.LabelDescriptor + * @memberof google.api.DocumentationRule * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.IDocumentationRule} message DocumentationRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encode = function encode(message, writer) { + DocumentationRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.deprecationDescription != null && Object.hasOwnProperty.call(message, "deprecationDescription")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationDescription); return writer; }; /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * Encodes the specified DocumentationRule message, length delimited. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.DocumentationRule * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {google.api.IDocumentationRule} message DocumentationRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + DocumentationRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer. + * Decodes a DocumentationRule message from the specified reader or buffer. * @function decode - * @memberof google.api.LabelDescriptor + * @memberof google.api.DocumentationRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.DocumentationRule} DocumentationRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decode = function decode(reader, length) { + DocumentationRule.decode = function 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.LabelDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DocumentationRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.valueType = reader.int32(); - break; - case 3: - message.description = reader.string(); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.deprecationDescription = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13742,185 +14601,142 @@ }; /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a DocumentationRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.LabelDescriptor + * @memberof google.api.DocumentationRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.DocumentationRule} DocumentationRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + DocumentationRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LabelDescriptor message. + * Verifies a DocumentationRule message. * @function verify - * @memberof google.api.LabelDescriptor + * @memberof google.api.DocumentationRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LabelDescriptor.verify = function verify(message) { + DocumentationRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; if (message.description != null && message.hasOwnProperty("description")) if (!$util.isString(message.description)) return "description: string expected"; + if (message.deprecationDescription != null && message.hasOwnProperty("deprecationDescription")) + if (!$util.isString(message.deprecationDescription)) + return "deprecationDescription: string expected"; return null; }; /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentationRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.DocumentationRule * @static * @param {Object.} object Plain object - * @returns {google.api.LabelDescriptor} LabelDescriptor + * @returns {google.api.DocumentationRule} DocumentationRule */ - LabelDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LabelDescriptor) + DocumentationRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DocumentationRule) return object; - var message = new $root.google.api.LabelDescriptor(); - if (object.key != null) - message.key = String(object.key); - switch (object.valueType) { - case "STRING": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - } + var message = new $root.google.api.DocumentationRule(); + if (object.selector != null) + message.selector = String(object.selector); if (object.description != null) message.description = String(object.description); + if (object.deprecationDescription != null) + message.deprecationDescription = String(object.deprecationDescription); return message; }; /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a DocumentationRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.LabelDescriptor + * @memberof google.api.DocumentationRule * @static - * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {google.api.DocumentationRule} message DocumentationRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LabelDescriptor.toObject = function toObject(message, options) { + DocumentationRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.key = ""; - object.valueType = options.enums === String ? "STRING" : 0; + object.selector = ""; object.description = ""; + object.deprecationDescription = ""; } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; + if (message.deprecationDescription != null && message.hasOwnProperty("deprecationDescription")) + object.deprecationDescription = message.deprecationDescription; return object; }; /** - * Converts this LabelDescriptor to JSON. + * Converts this DocumentationRule to JSON. * @function toJSON - * @memberof google.api.LabelDescriptor + * @memberof google.api.DocumentationRule * @instance * @returns {Object.} JSON object */ - LabelDescriptor.prototype.toJSON = function toJSON() { + DocumentationRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * ValueType enum. - * @name google.api.LabelDescriptor.ValueType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - */ - LabelDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - return values; - })(); - - return LabelDescriptor; - })(); - - /** - * 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; + * Gets the default type url for DocumentationRule + * @function getTypeUrl + * @memberof google.api.DocumentationRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentationRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DocumentationRule"; + }; + + return DocumentationRule; })(); - api.Context = (function() { + api.Page = (function() { /** - * Properties of a Context. + * Properties of a Page. * @memberof google.api - * @interface IContext - * @property {Array.|null} [rules] Context rules + * @interface IPage + * @property {string|null} [name] Page name + * @property {string|null} [content] Page content + * @property {Array.|null} [subpages] Page subpages */ /** - * Constructs a new Context. + * Constructs a new Page. * @memberof google.api - * @classdesc Represents a Context. - * @implements IContext + * @classdesc Represents a Page. + * @implements IPage * @constructor - * @param {google.api.IContext=} [properties] Properties to set + * @param {google.api.IPage=} [properties] Properties to set */ - function Context(properties) { - this.rules = []; + function Page(properties) { + this.subpages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13928,79 +14744,108 @@ } /** - * Context rules. - * @member {Array.} rules - * @memberof google.api.Context + * Page name. + * @member {string} name + * @memberof google.api.Page * @instance */ - Context.prototype.rules = $util.emptyArray; + Page.prototype.name = ""; /** - * Creates a new Context instance using the specified properties. + * Page content. + * @member {string} content + * @memberof google.api.Page + * @instance + */ + Page.prototype.content = ""; + + /** + * Page subpages. + * @member {Array.} subpages + * @memberof google.api.Page + * @instance + */ + Page.prototype.subpages = $util.emptyArray; + + /** + * Creates a new Page instance using the specified properties. * @function create - * @memberof google.api.Context + * @memberof google.api.Page * @static - * @param {google.api.IContext=} [properties] Properties to set - * @returns {google.api.Context} Context instance + * @param {google.api.IPage=} [properties] Properties to set + * @returns {google.api.Page} Page instance */ - Context.create = function create(properties) { - return new Context(properties); + Page.create = function create(properties) { + return new Page(properties); }; /** - * Encodes the specified Context message. Does not implicitly {@link google.api.Context.verify|verify} messages. + * Encodes the specified Page message. Does not implicitly {@link google.api.Page.verify|verify} messages. * @function encode - * @memberof google.api.Context + * @memberof google.api.Page * @static - * @param {google.api.IContext} message Context message or plain object to encode + * @param {google.api.IPage} message Page message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Context.encode = function encode(message, writer) { + Page.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.ContextRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + if (message.subpages != null && message.subpages.length) + for (var i = 0; i < message.subpages.length; ++i) + $root.google.api.Page.encode(message.subpages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Context message, length delimited. Does not implicitly {@link google.api.Context.verify|verify} messages. + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.api.Page.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Context + * @memberof google.api.Page * @static - * @param {google.api.IContext} message Context message or plain object to encode + * @param {google.api.IPage} message Page message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Context.encodeDelimited = function encodeDelimited(message, writer) { + Page.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Context message from the specified reader or buffer. + * Decodes a Page message from the specified reader or buffer. * @function decode - * @memberof google.api.Context + * @memberof google.api.Page * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Context} Context + * @returns {google.api.Page} Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Context.decode = function decode(reader, length) { + Page.decode = function 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.Context(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Page(); 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.ContextRule.decode(reader, reader.uint32())); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.content = reader.string(); + break; + } + case 3: { + if (!(message.subpages && message.subpages.length)) + message.subpages = []; + message.subpages.push($root.google.api.Page.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -14010,132 +14855,161 @@ }; /** - * Decodes a Context message from the specified reader or buffer, length delimited. + * Decodes a Page message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Context + * @memberof google.api.Page * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Context} Context + * @returns {google.api.Page} Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Context.decodeDelimited = function decodeDelimited(reader) { + Page.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Context message. + * Verifies a Page message. * @function verify - * @memberof google.api.Context + * @memberof google.api.Page * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Context.verify = function verify(message) { + Page.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.ContextRule.verify(message.rules[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.subpages != null && message.hasOwnProperty("subpages")) { + if (!Array.isArray(message.subpages)) + return "subpages: array expected"; + for (var i = 0; i < message.subpages.length; ++i) { + var error = $root.google.api.Page.verify(message.subpages[i]); if (error) - return "rules." + error; + return "subpages." + error; } } return null; }; /** - * Creates a Context message from a plain object. Also converts values to their respective internal types. + * Creates a Page message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Context + * @memberof google.api.Page * @static * @param {Object.} object Plain object - * @returns {google.api.Context} Context + * @returns {google.api.Page} Page */ - Context.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Context) + Page.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Page) return object; - var message = new $root.google.api.Context(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Context.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Context.rules: object expected"); - message.rules[i] = $root.google.api.ContextRule.fromObject(object.rules[i]); + var message = new $root.google.api.Page(); + if (object.name != null) + message.name = String(object.name); + if (object.content != null) + message.content = String(object.content); + if (object.subpages) { + if (!Array.isArray(object.subpages)) + throw TypeError(".google.api.Page.subpages: array expected"); + message.subpages = []; + for (var i = 0; i < object.subpages.length; ++i) { + if (typeof object.subpages[i] !== "object") + throw TypeError(".google.api.Page.subpages: object expected"); + message.subpages[i] = $root.google.api.Page.fromObject(object.subpages[i]); } } return message; }; /** - * Creates a plain object from a Context message. Also converts values to other types if specified. + * Creates a plain object from a Page message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Context + * @memberof google.api.Page * @static - * @param {google.api.Context} message Context + * @param {google.api.Page} message Page * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Context.toObject = function toObject(message, options) { + Page.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.ContextRule.toObject(message.rules[j], options); + object.subpages = []; + if (options.defaults) { + object.name = ""; + object.content = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.subpages && message.subpages.length) { + object.subpages = []; + for (var j = 0; j < message.subpages.length; ++j) + object.subpages[j] = $root.google.api.Page.toObject(message.subpages[j], options); } return object; }; /** - * Converts this Context to JSON. + * Converts this Page to JSON. * @function toJSON - * @memberof google.api.Context + * @memberof google.api.Page * @instance * @returns {Object.} JSON object */ - Context.prototype.toJSON = function toJSON() { + Page.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Context; + /** + * Gets the default type url for Page + * @function getTypeUrl + * @memberof google.api.Page + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Page"; + }; + + return Page; })(); - api.ContextRule = (function() { + api.Endpoint = (function() { /** - * Properties of a ContextRule. + * Properties of an Endpoint. * @memberof google.api - * @interface IContextRule - * @property {string|null} [selector] ContextRule selector - * @property {Array.|null} [requested] ContextRule requested - * @property {Array.|null} [provided] ContextRule provided - * @property {Array.|null} [allowedRequestExtensions] ContextRule allowedRequestExtensions - * @property {Array.|null} [allowedResponseExtensions] ContextRule allowedResponseExtensions + * @interface IEndpoint + * @property {string|null} [name] Endpoint name + * @property {Array.|null} [aliases] Endpoint aliases + * @property {string|null} [target] Endpoint target + * @property {boolean|null} [allowCors] Endpoint allowCors */ /** - * Constructs a new ContextRule. + * Constructs a new Endpoint. * @memberof google.api - * @classdesc Represents a ContextRule. - * @implements IContextRule + * @classdesc Represents an Endpoint. + * @implements IEndpoint * @constructor - * @param {google.api.IContextRule=} [properties] Properties to set + * @param {google.api.IEndpoint=} [properties] Properties to set */ - function ContextRule(properties) { - this.requested = []; - this.provided = []; - this.allowedRequestExtensions = []; - this.allowedResponseExtensions = []; + function Endpoint(properties) { + this.aliases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14143,140 +15017,122 @@ } /** - * ContextRule selector. - * @member {string} selector - * @memberof google.api.ContextRule - * @instance - */ - ContextRule.prototype.selector = ""; - - /** - * ContextRule requested. - * @member {Array.} requested - * @memberof google.api.ContextRule + * Endpoint name. + * @member {string} name + * @memberof google.api.Endpoint * @instance */ - ContextRule.prototype.requested = $util.emptyArray; + Endpoint.prototype.name = ""; /** - * ContextRule provided. - * @member {Array.} provided - * @memberof google.api.ContextRule + * Endpoint aliases. + * @member {Array.} aliases + * @memberof google.api.Endpoint * @instance */ - ContextRule.prototype.provided = $util.emptyArray; + Endpoint.prototype.aliases = $util.emptyArray; /** - * ContextRule allowedRequestExtensions. - * @member {Array.} allowedRequestExtensions - * @memberof google.api.ContextRule + * Endpoint target. + * @member {string} target + * @memberof google.api.Endpoint * @instance */ - ContextRule.prototype.allowedRequestExtensions = $util.emptyArray; + Endpoint.prototype.target = ""; /** - * ContextRule allowedResponseExtensions. - * @member {Array.} allowedResponseExtensions - * @memberof google.api.ContextRule + * Endpoint allowCors. + * @member {boolean} allowCors + * @memberof google.api.Endpoint * @instance */ - ContextRule.prototype.allowedResponseExtensions = $util.emptyArray; + Endpoint.prototype.allowCors = false; /** - * Creates a new ContextRule instance using the specified properties. + * Creates a new Endpoint instance using the specified properties. * @function create - * @memberof google.api.ContextRule + * @memberof google.api.Endpoint * @static - * @param {google.api.IContextRule=} [properties] Properties to set - * @returns {google.api.ContextRule} ContextRule instance + * @param {google.api.IEndpoint=} [properties] Properties to set + * @returns {google.api.Endpoint} Endpoint instance */ - ContextRule.create = function create(properties) { - return new ContextRule(properties); + Endpoint.create = function create(properties) { + return new Endpoint(properties); }; /** - * Encodes the specified ContextRule message. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. + * Encodes the specified Endpoint message. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. * @function encode - * @memberof google.api.ContextRule + * @memberof google.api.Endpoint * @static - * @param {google.api.IContextRule} message ContextRule message or plain object to encode + * @param {google.api.IEndpoint} message Endpoint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContextRule.encode = function encode(message, writer) { + Endpoint.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.requested != null && message.requested.length) - for (var i = 0; i < message.requested.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requested[i]); - if (message.provided != null && message.provided.length) - for (var i = 0; i < message.provided.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.provided[i]); - if (message.allowedRequestExtensions != null && message.allowedRequestExtensions.length) - for (var i = 0; i < message.allowedRequestExtensions.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.allowedRequestExtensions[i]); - if (message.allowedResponseExtensions != null && message.allowedResponseExtensions.length) - for (var i = 0; i < message.allowedResponseExtensions.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.allowedResponseExtensions[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.aliases != null && message.aliases.length) + for (var i = 0; i < message.aliases.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.aliases[i]); + if (message.allowCors != null && Object.hasOwnProperty.call(message, "allowCors")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowCors); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.target); return writer; }; /** - * Encodes the specified ContextRule message, length delimited. Does not implicitly {@link google.api.ContextRule.verify|verify} messages. + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ContextRule + * @memberof google.api.Endpoint * @static - * @param {google.api.IContextRule} message ContextRule message or plain object to encode + * @param {google.api.IEndpoint} message Endpoint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContextRule.encodeDelimited = function encodeDelimited(message, writer) { + Endpoint.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ContextRule message from the specified reader or buffer. + * Decodes an Endpoint message from the specified reader or buffer. * @function decode - * @memberof google.api.ContextRule + * @memberof google.api.Endpoint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ContextRule} ContextRule + * @returns {google.api.Endpoint} Endpoint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContextRule.decode = function decode(reader, length) { + Endpoint.decode = function 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.ContextRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Endpoint(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - if (!(message.requested && message.requested.length)) - message.requested = []; - message.requested.push(reader.string()); - break; - case 3: - if (!(message.provided && message.provided.length)) - message.provided = []; - message.provided.push(reader.string()); - break; - case 4: - if (!(message.allowedRequestExtensions && message.allowedRequestExtensions.length)) - message.allowedRequestExtensions = []; - message.allowedRequestExtensions.push(reader.string()); - break; - case 5: - if (!(message.allowedResponseExtensions && message.allowedResponseExtensions.length)) - message.allowedResponseExtensions = []; - message.allowedResponseExtensions.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.aliases && message.aliases.length)) + message.aliases = []; + message.aliases.push(reader.string()); + break; + } + case 101: { + message.target = reader.string(); + break; + } + case 5: { + message.allowCors = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -14286,189 +15142,164 @@ }; /** - * Decodes a ContextRule message from the specified reader or buffer, length delimited. + * Decodes an Endpoint message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ContextRule + * @memberof google.api.Endpoint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ContextRule} ContextRule + * @returns {google.api.Endpoint} Endpoint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContextRule.decodeDelimited = function decodeDelimited(reader) { + Endpoint.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ContextRule message. + * Verifies an Endpoint message. * @function verify - * @memberof google.api.ContextRule + * @memberof google.api.Endpoint * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ContextRule.verify = function verify(message) { + Endpoint.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.requested != null && message.hasOwnProperty("requested")) { - if (!Array.isArray(message.requested)) - return "requested: array expected"; - for (var i = 0; i < message.requested.length; ++i) - if (!$util.isString(message.requested[i])) - return "requested: string[] expected"; - } - if (message.provided != null && message.hasOwnProperty("provided")) { - if (!Array.isArray(message.provided)) - return "provided: array expected"; - for (var i = 0; i < message.provided.length; ++i) - if (!$util.isString(message.provided[i])) - return "provided: string[] expected"; - } - if (message.allowedRequestExtensions != null && message.hasOwnProperty("allowedRequestExtensions")) { - if (!Array.isArray(message.allowedRequestExtensions)) - return "allowedRequestExtensions: array expected"; - for (var i = 0; i < message.allowedRequestExtensions.length; ++i) - if (!$util.isString(message.allowedRequestExtensions[i])) - return "allowedRequestExtensions: string[] expected"; - } - if (message.allowedResponseExtensions != null && message.hasOwnProperty("allowedResponseExtensions")) { - if (!Array.isArray(message.allowedResponseExtensions)) - return "allowedResponseExtensions: array expected"; - for (var i = 0; i < message.allowedResponseExtensions.length; ++i) - if (!$util.isString(message.allowedResponseExtensions[i])) - return "allowedResponseExtensions: string[] expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.aliases != null && message.hasOwnProperty("aliases")) { + if (!Array.isArray(message.aliases)) + return "aliases: array expected"; + for (var i = 0; i < message.aliases.length; ++i) + if (!$util.isString(message.aliases[i])) + return "aliases: string[] expected"; } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.allowCors != null && message.hasOwnProperty("allowCors")) + if (typeof message.allowCors !== "boolean") + return "allowCors: boolean expected"; return null; }; /** - * Creates a ContextRule message from a plain object. Also converts values to their respective internal types. + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ContextRule + * @memberof google.api.Endpoint * @static * @param {Object.} object Plain object - * @returns {google.api.ContextRule} ContextRule + * @returns {google.api.Endpoint} Endpoint */ - ContextRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ContextRule) + Endpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Endpoint) return object; - var message = new $root.google.api.ContextRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.requested) { - if (!Array.isArray(object.requested)) - throw TypeError(".google.api.ContextRule.requested: array expected"); - message.requested = []; - for (var i = 0; i < object.requested.length; ++i) - message.requested[i] = String(object.requested[i]); - } - if (object.provided) { - if (!Array.isArray(object.provided)) - throw TypeError(".google.api.ContextRule.provided: array expected"); - message.provided = []; - for (var i = 0; i < object.provided.length; ++i) - message.provided[i] = String(object.provided[i]); - } - if (object.allowedRequestExtensions) { - if (!Array.isArray(object.allowedRequestExtensions)) - throw TypeError(".google.api.ContextRule.allowedRequestExtensions: array expected"); - message.allowedRequestExtensions = []; - for (var i = 0; i < object.allowedRequestExtensions.length; ++i) - message.allowedRequestExtensions[i] = String(object.allowedRequestExtensions[i]); - } - if (object.allowedResponseExtensions) { - if (!Array.isArray(object.allowedResponseExtensions)) - throw TypeError(".google.api.ContextRule.allowedResponseExtensions: array expected"); - message.allowedResponseExtensions = []; - for (var i = 0; i < object.allowedResponseExtensions.length; ++i) - message.allowedResponseExtensions[i] = String(object.allowedResponseExtensions[i]); + var message = new $root.google.api.Endpoint(); + if (object.name != null) + message.name = String(object.name); + if (object.aliases) { + if (!Array.isArray(object.aliases)) + throw TypeError(".google.api.Endpoint.aliases: array expected"); + message.aliases = []; + for (var i = 0; i < object.aliases.length; ++i) + message.aliases[i] = String(object.aliases[i]); } + if (object.target != null) + message.target = String(object.target); + if (object.allowCors != null) + message.allowCors = Boolean(object.allowCors); return message; }; - - /** - * Creates a plain object from a ContextRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ContextRule - * @static - * @param {google.api.ContextRule} message ContextRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContextRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.requested = []; - object.provided = []; - object.allowedRequestExtensions = []; - object.allowedResponseExtensions = []; - } - if (options.defaults) - object.selector = ""; - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.requested && message.requested.length) { - object.requested = []; - for (var j = 0; j < message.requested.length; ++j) - object.requested[j] = message.requested[j]; - } - if (message.provided && message.provided.length) { - object.provided = []; - for (var j = 0; j < message.provided.length; ++j) - object.provided[j] = message.provided[j]; - } - if (message.allowedRequestExtensions && message.allowedRequestExtensions.length) { - object.allowedRequestExtensions = []; - for (var j = 0; j < message.allowedRequestExtensions.length; ++j) - object.allowedRequestExtensions[j] = message.allowedRequestExtensions[j]; + + /** + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Endpoint + * @static + * @param {google.api.Endpoint} message Endpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Endpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aliases = []; + if (options.defaults) { + object.name = ""; + object.allowCors = false; + object.target = ""; } - if (message.allowedResponseExtensions && message.allowedResponseExtensions.length) { - object.allowedResponseExtensions = []; - for (var j = 0; j < message.allowedResponseExtensions.length; ++j) - object.allowedResponseExtensions[j] = message.allowedResponseExtensions[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.aliases && message.aliases.length) { + object.aliases = []; + for (var j = 0; j < message.aliases.length; ++j) + object.aliases[j] = message.aliases[j]; } + if (message.allowCors != null && message.hasOwnProperty("allowCors")) + object.allowCors = message.allowCors; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; return object; }; /** - * Converts this ContextRule to JSON. + * Converts this Endpoint to JSON. * @function toJSON - * @memberof google.api.ContextRule + * @memberof google.api.Endpoint * @instance * @returns {Object.} JSON object */ - ContextRule.prototype.toJSON = function toJSON() { + Endpoint.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ContextRule; + /** + * Gets the default type url for Endpoint + * @function getTypeUrl + * @memberof google.api.Endpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Endpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Endpoint"; + }; + + return Endpoint; })(); - api.Control = (function() { + api.LogDescriptor = (function() { /** - * Properties of a Control. + * Properties of a LogDescriptor. * @memberof google.api - * @interface IControl - * @property {string|null} [environment] Control environment + * @interface ILogDescriptor + * @property {string|null} [name] LogDescriptor name + * @property {Array.|null} [labels] LogDescriptor labels + * @property {string|null} [description] LogDescriptor description + * @property {string|null} [displayName] LogDescriptor displayName */ /** - * Constructs a new Control. + * Constructs a new LogDescriptor. * @memberof google.api - * @classdesc Represents a Control. - * @implements IControl + * @classdesc Represents a LogDescriptor. + * @implements ILogDescriptor * @constructor - * @param {google.api.IControl=} [properties] Properties to set + * @param {google.api.ILogDescriptor=} [properties] Properties to set */ - function Control(properties) { + function LogDescriptor(properties) { + this.labels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14476,76 +15307,122 @@ } /** - * Control environment. - * @member {string} environment - * @memberof google.api.Control + * LogDescriptor name. + * @member {string} name + * @memberof google.api.LogDescriptor * @instance */ - Control.prototype.environment = ""; + LogDescriptor.prototype.name = ""; /** - * Creates a new Control instance using the specified properties. + * LogDescriptor labels. + * @member {Array.} labels + * @memberof google.api.LogDescriptor + * @instance + */ + LogDescriptor.prototype.labels = $util.emptyArray; + + /** + * LogDescriptor description. + * @member {string} description + * @memberof google.api.LogDescriptor + * @instance + */ + LogDescriptor.prototype.description = ""; + + /** + * LogDescriptor displayName. + * @member {string} displayName + * @memberof google.api.LogDescriptor + * @instance + */ + LogDescriptor.prototype.displayName = ""; + + /** + * Creates a new LogDescriptor instance using the specified properties. * @function create - * @memberof google.api.Control + * @memberof google.api.LogDescriptor * @static - * @param {google.api.IControl=} [properties] Properties to set - * @returns {google.api.Control} Control instance + * @param {google.api.ILogDescriptor=} [properties] Properties to set + * @returns {google.api.LogDescriptor} LogDescriptor instance */ - Control.create = function create(properties) { - return new Control(properties); + LogDescriptor.create = function create(properties) { + return new LogDescriptor(properties); }; /** - * Encodes the specified Control message. Does not implicitly {@link google.api.Control.verify|verify} messages. + * Encodes the specified LogDescriptor message. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Control + * @memberof google.api.LogDescriptor * @static - * @param {google.api.IControl} message Control message or plain object to encode + * @param {google.api.ILogDescriptor} message LogDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Control.encode = function encode(message, writer) { + LogDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); return writer; }; /** - * Encodes the specified Control message, length delimited. Does not implicitly {@link google.api.Control.verify|verify} messages. + * Encodes the specified LogDescriptor message, length delimited. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Control + * @memberof google.api.LogDescriptor * @static - * @param {google.api.IControl} message Control message or plain object to encode + * @param {google.api.ILogDescriptor} message LogDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Control.encodeDelimited = function encodeDelimited(message, writer) { + LogDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Control message from the specified reader or buffer. + * Decodes a LogDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Control + * @memberof google.api.LogDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Control} Control + * @returns {google.api.LogDescriptor} LogDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Control.decode = function decode(reader, length) { + LogDescriptor.decode = function 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.Control(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LogDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.environment = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14555,114 +15432,167 @@ }; /** - * Decodes a Control message from the specified reader or buffer, length delimited. + * Decodes a LogDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Control + * @memberof google.api.LogDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Control} Control + * @returns {google.api.LogDescriptor} LogDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Control.decodeDelimited = function decodeDelimited(reader) { + LogDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Control message. + * Verifies a LogDescriptor message. * @function verify - * @memberof google.api.Control + * @memberof google.api.LogDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Control.verify = function verify(message) { + LogDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a Control message from a plain object. Also converts values to their respective internal types. + * Creates a LogDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Control + * @memberof google.api.LogDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Control} Control + * @returns {google.api.LogDescriptor} LogDescriptor */ - Control.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Control) + LogDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LogDescriptor) return object; - var message = new $root.google.api.Control(); - if (object.environment != null) - message.environment = String(object.environment); + var message = new $root.google.api.LogDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.LogDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.LogDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a Control message. Also converts values to other types if specified. + * Creates a plain object from a LogDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Control + * @memberof google.api.LogDescriptor * @static - * @param {google.api.Control} message Control + * @param {google.api.LogDescriptor} message LogDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Control.toObject = function toObject(message, options) { + LogDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.environment = ""; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this Control to JSON. + * Converts this LogDescriptor to JSON. * @function toJSON - * @memberof google.api.Control + * @memberof google.api.LogDescriptor * @instance * @returns {Object.} JSON object */ - Control.prototype.toJSON = function toJSON() { + LogDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Control; + /** + * Gets the default type url for LogDescriptor + * @function getTypeUrl + * @memberof google.api.LogDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.LogDescriptor"; + }; + + return LogDescriptor; })(); - api.Documentation = (function() { + api.LabelDescriptor = (function() { /** - * Properties of a Documentation. + * Properties of a LabelDescriptor. * @memberof google.api - * @interface IDocumentation - * @property {string|null} [summary] Documentation summary - * @property {Array.|null} [pages] Documentation pages - * @property {Array.|null} [rules] Documentation rules - * @property {string|null} [documentationRootUrl] Documentation documentationRootUrl - * @property {string|null} [serviceRootUrl] Documentation serviceRootUrl - * @property {string|null} [overview] Documentation overview + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description */ /** - * Constructs a new Documentation. + * Constructs a new LabelDescriptor. * @memberof google.api - * @classdesc Represents a Documentation. - * @implements IDocumentation + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor * @constructor - * @param {google.api.IDocumentation=} [properties] Properties to set + * @param {google.api.ILabelDescriptor=} [properties] Properties to set */ - function Documentation(properties) { - this.pages = []; - this.rules = []; + function LabelDescriptor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14670,147 +15600,105 @@ } /** - * Documentation summary. - * @member {string} summary - * @memberof google.api.Documentation - * @instance - */ - Documentation.prototype.summary = ""; - - /** - * Documentation pages. - * @member {Array.} pages - * @memberof google.api.Documentation - * @instance - */ - Documentation.prototype.pages = $util.emptyArray; - - /** - * Documentation rules. - * @member {Array.} rules - * @memberof google.api.Documentation - * @instance - */ - Documentation.prototype.rules = $util.emptyArray; - - /** - * Documentation documentationRootUrl. - * @member {string} documentationRootUrl - * @memberof google.api.Documentation + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor * @instance */ - Documentation.prototype.documentationRootUrl = ""; + LabelDescriptor.prototype.key = ""; /** - * Documentation serviceRootUrl. - * @member {string} serviceRootUrl - * @memberof google.api.Documentation + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor * @instance */ - Documentation.prototype.serviceRootUrl = ""; + LabelDescriptor.prototype.valueType = 0; /** - * Documentation overview. - * @member {string} overview - * @memberof google.api.Documentation + * LabelDescriptor description. + * @member {string} description + * @memberof google.api.LabelDescriptor * @instance */ - Documentation.prototype.overview = ""; + LabelDescriptor.prototype.description = ""; /** - * Creates a new Documentation instance using the specified properties. + * Creates a new LabelDescriptor instance using the specified properties. * @function create - * @memberof google.api.Documentation + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IDocumentation=} [properties] Properties to set - * @returns {google.api.Documentation} Documentation instance + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance */ - Documentation.create = function create(properties) { - return new Documentation(properties); + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); }; /** - * Encodes the specified Documentation message. Does not implicitly {@link google.api.Documentation.verify|verify} messages. + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Documentation + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IDocumentation} message Documentation message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Documentation.encode = function encode(message, writer) { + LabelDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.summary); - if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.overview); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.DocumentationRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.documentationRootUrl != null && Object.hasOwnProperty.call(message, "documentationRootUrl")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.documentationRootUrl); - if (message.pages != null && message.pages.length) - for (var i = 0; i < message.pages.length; ++i) - $root.google.api.Page.encode(message.pages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.serviceRootUrl != null && Object.hasOwnProperty.call(message, "serviceRootUrl")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.serviceRootUrl); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); return writer; }; /** - * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.api.Documentation.verify|verify} messages. + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Documentation + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.IDocumentation} message Documentation message or plain object to encode + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Documentation.encodeDelimited = function encodeDelimited(message, writer) { + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Documentation message from the specified reader or buffer. + * Decodes a LabelDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Documentation + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Documentation} Documentation + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Documentation.decode = function decode(reader, length) { + LabelDescriptor.decode = function 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.Documentation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.summary = reader.string(); - break; - case 5: - if (!(message.pages && message.pages.length)) - message.pages = []; - message.pages.push($root.google.api.Page.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.DocumentationRule.decode(reader, reader.uint32())); - break; - case 4: - message.documentationRootUrl = reader.string(); - break; - case 6: - message.serviceRootUrl = reader.string(); - break; - case 2: - message.overview = reader.string(); - break; + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.valueType = reader.int32(); + break; + } + case 3: { + message.description = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14820,186 +15708,176 @@ }; /** - * Decodes a Documentation message from the specified reader or buffer, length delimited. + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Documentation + * @memberof google.api.LabelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Documentation} Documentation + * @returns {google.api.LabelDescriptor} LabelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Documentation.decodeDelimited = function decodeDelimited(reader) { + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Documentation message. + * Verifies a LabelDescriptor message. * @function verify - * @memberof google.api.Documentation + * @memberof google.api.LabelDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Documentation.verify = function verify(message) { + LabelDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.summary != null && message.hasOwnProperty("summary")) - if (!$util.isString(message.summary)) - return "summary: string expected"; - if (message.pages != null && message.hasOwnProperty("pages")) { - if (!Array.isArray(message.pages)) - return "pages: array expected"; - for (var i = 0; i < message.pages.length; ++i) { - var error = $root.google.api.Page.verify(message.pages[i]); - if (error) - return "pages." + error; - } - } - 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.DocumentationRule.verify(message.rules[i]); - if (error) - return "rules." + error; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.documentationRootUrl != null && message.hasOwnProperty("documentationRootUrl")) - if (!$util.isString(message.documentationRootUrl)) - return "documentationRootUrl: string expected"; - if (message.serviceRootUrl != null && message.hasOwnProperty("serviceRootUrl")) - if (!$util.isString(message.serviceRootUrl)) - return "serviceRootUrl: string expected"; - if (message.overview != null && message.hasOwnProperty("overview")) - if (!$util.isString(message.overview)) - return "overview: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a Documentation message from a plain object. Also converts values to their respective internal types. + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Documentation + * @memberof google.api.LabelDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Documentation} Documentation - */ - Documentation.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Documentation) - return object; - var message = new $root.google.api.Documentation(); - if (object.summary != null) - message.summary = String(object.summary); - if (object.pages) { - if (!Array.isArray(object.pages)) - throw TypeError(".google.api.Documentation.pages: array expected"); - message.pages = []; - for (var i = 0; i < object.pages.length; ++i) { - if (typeof object.pages[i] !== "object") - throw TypeError(".google.api.Documentation.pages: object expected"); - message.pages[i] = $root.google.api.Page.fromObject(object.pages[i]); - } - } - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Documentation.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Documentation.rules: object expected"); - message.rules[i] = $root.google.api.DocumentationRule.fromObject(object.rules[i]); - } + * @returns {google.api.LabelDescriptor} LabelDescriptor + */ + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) + return object; + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { + case "STRING": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; } - if (object.documentationRootUrl != null) - message.documentationRootUrl = String(object.documentationRootUrl); - if (object.serviceRootUrl != null) - message.serviceRootUrl = String(object.serviceRootUrl); - if (object.overview != null) - message.overview = String(object.overview); + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Documentation + * @memberof google.api.LabelDescriptor * @static - * @param {google.api.Documentation} message Documentation + * @param {google.api.LabelDescriptor} message LabelDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Documentation.toObject = function toObject(message, options) { + LabelDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.rules = []; - object.pages = []; - } if (options.defaults) { - object.summary = ""; - object.overview = ""; - object.documentationRootUrl = ""; - object.serviceRootUrl = ""; - } - if (message.summary != null && message.hasOwnProperty("summary")) - object.summary = message.summary; - if (message.overview != null && message.hasOwnProperty("overview")) - object.overview = message.overview; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.DocumentationRule.toObject(message.rules[j], options); - } - if (message.documentationRootUrl != null && message.hasOwnProperty("documentationRootUrl")) - object.documentationRootUrl = message.documentationRootUrl; - if (message.pages && message.pages.length) { - object.pages = []; - for (var j = 0; j < message.pages.length; ++j) - object.pages[j] = $root.google.api.Page.toObject(message.pages[j], options); + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; + object.description = ""; } - if (message.serviceRootUrl != null && message.hasOwnProperty("serviceRootUrl")) - object.serviceRootUrl = message.serviceRootUrl; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this Documentation to JSON. + * Converts this LabelDescriptor to JSON. * @function toJSON - * @memberof google.api.Documentation + * @memberof google.api.LabelDescriptor * @instance * @returns {Object.} JSON object */ - Documentation.prototype.toJSON = function toJSON() { + LabelDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Documentation; + /** + * Gets the default type url for LabelDescriptor + * @function getTypeUrl + * @memberof google.api.LabelDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LabelDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.LabelDescriptor"; + }; + + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; + })(); + + return LabelDescriptor; })(); - api.DocumentationRule = (function() { + api.Logging = (function() { /** - * Properties of a DocumentationRule. + * Properties of a Logging. * @memberof google.api - * @interface IDocumentationRule - * @property {string|null} [selector] DocumentationRule selector - * @property {string|null} [description] DocumentationRule description - * @property {string|null} [deprecationDescription] DocumentationRule deprecationDescription + * @interface ILogging + * @property {Array.|null} [producerDestinations] Logging producerDestinations + * @property {Array.|null} [consumerDestinations] Logging consumerDestinations */ /** - * Constructs a new DocumentationRule. + * Constructs a new Logging. * @memberof google.api - * @classdesc Represents a DocumentationRule. - * @implements IDocumentationRule + * @classdesc Represents a Logging. + * @implements ILogging * @constructor - * @param {google.api.IDocumentationRule=} [properties] Properties to set + * @param {google.api.ILogging=} [properties] Properties to set */ - function DocumentationRule(properties) { + function Logging(properties) { + this.producerDestinations = []; + this.consumerDestinations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15007,102 +15885,97 @@ } /** - * DocumentationRule selector. - * @member {string} selector - * @memberof google.api.DocumentationRule - * @instance - */ - DocumentationRule.prototype.selector = ""; - - /** - * DocumentationRule description. - * @member {string} description - * @memberof google.api.DocumentationRule + * Logging producerDestinations. + * @member {Array.} producerDestinations + * @memberof google.api.Logging * @instance */ - DocumentationRule.prototype.description = ""; + Logging.prototype.producerDestinations = $util.emptyArray; /** - * DocumentationRule deprecationDescription. - * @member {string} deprecationDescription - * @memberof google.api.DocumentationRule + * Logging consumerDestinations. + * @member {Array.} consumerDestinations + * @memberof google.api.Logging * @instance */ - DocumentationRule.prototype.deprecationDescription = ""; + Logging.prototype.consumerDestinations = $util.emptyArray; /** - * Creates a new DocumentationRule instance using the specified properties. + * Creates a new Logging instance using the specified properties. * @function create - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static - * @param {google.api.IDocumentationRule=} [properties] Properties to set - * @returns {google.api.DocumentationRule} DocumentationRule instance + * @param {google.api.ILogging=} [properties] Properties to set + * @returns {google.api.Logging} Logging instance */ - DocumentationRule.create = function create(properties) { - return new DocumentationRule(properties); + Logging.create = function create(properties) { + return new Logging(properties); }; /** - * Encodes the specified DocumentationRule message. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. + * Encodes the specified Logging message. Does not implicitly {@link google.api.Logging.verify|verify} messages. * @function encode - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static - * @param {google.api.IDocumentationRule} message DocumentationRule message or plain object to encode + * @param {google.api.ILogging} message Logging message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentationRule.encode = function encode(message, writer) { + Logging.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.deprecationDescription != null && Object.hasOwnProperty.call(message, "deprecationDescription")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationDescription); + if (message.producerDestinations != null && message.producerDestinations.length) + for (var i = 0; i < message.producerDestinations.length; ++i) + $root.google.api.Logging.LoggingDestination.encode(message.producerDestinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consumerDestinations != null && message.consumerDestinations.length) + for (var i = 0; i < message.consumerDestinations.length; ++i) + $root.google.api.Logging.LoggingDestination.encode(message.consumerDestinations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DocumentationRule message, length delimited. Does not implicitly {@link google.api.DocumentationRule.verify|verify} messages. + * Encodes the specified Logging message, length delimited. Does not implicitly {@link google.api.Logging.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static - * @param {google.api.IDocumentationRule} message DocumentationRule message or plain object to encode + * @param {google.api.ILogging} message Logging message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentationRule.encodeDelimited = function encodeDelimited(message, writer) { + Logging.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DocumentationRule message from the specified reader or buffer. + * Decodes a Logging message from the specified reader or buffer. * @function decode - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.DocumentationRule} DocumentationRule + * @returns {google.api.Logging} Logging * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentationRule.decode = function decode(reader, length) { + Logging.decode = function 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.DocumentationRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Logging(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.deprecationDescription = reader.string(); - break; + case 1: { + if (!(message.producerDestinations && message.producerDestinations.length)) + message.producerDestinations = []; + message.producerDestinations.push($root.google.api.Logging.LoggingDestination.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.consumerDestinations && message.consumerDestinations.length)) + message.consumerDestinations = []; + message.consumerDestinations.push($root.google.api.Logging.LoggingDestination.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -15112,127 +15985,420 @@ }; /** - * Decodes a DocumentationRule message from the specified reader or buffer, length delimited. + * Decodes a Logging message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DocumentationRule} DocumentationRule + * @returns {google.api.Logging} Logging * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentationRule.decodeDelimited = function decodeDelimited(reader) { + Logging.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DocumentationRule message. + * Verifies a Logging message. * @function verify - * @memberof google.api.DocumentationRule + * @memberof google.api.Logging * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DocumentationRule.verify = function verify(message) { + Logging.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.deprecationDescription != null && message.hasOwnProperty("deprecationDescription")) - if (!$util.isString(message.deprecationDescription)) - return "deprecationDescription: string expected"; + if (message.producerDestinations != null && message.hasOwnProperty("producerDestinations")) { + if (!Array.isArray(message.producerDestinations)) + return "producerDestinations: array expected"; + for (var i = 0; i < message.producerDestinations.length; ++i) { + var error = $root.google.api.Logging.LoggingDestination.verify(message.producerDestinations[i]); + if (error) + return "producerDestinations." + error; + } + } + if (message.consumerDestinations != null && message.hasOwnProperty("consumerDestinations")) { + if (!Array.isArray(message.consumerDestinations)) + return "consumerDestinations: array expected"; + for (var i = 0; i < message.consumerDestinations.length; ++i) { + var error = $root.google.api.Logging.LoggingDestination.verify(message.consumerDestinations[i]); + if (error) + return "consumerDestinations." + error; + } + } return null; }; - /** - * Creates a DocumentationRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DocumentationRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.DocumentationRule} DocumentationRule - */ - DocumentationRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DocumentationRule) + /** + * Creates a Logging message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Logging + * @static + * @param {Object.} object Plain object + * @returns {google.api.Logging} Logging + */ + Logging.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Logging) + return object; + var message = new $root.google.api.Logging(); + if (object.producerDestinations) { + if (!Array.isArray(object.producerDestinations)) + throw TypeError(".google.api.Logging.producerDestinations: array expected"); + message.producerDestinations = []; + for (var i = 0; i < object.producerDestinations.length; ++i) { + if (typeof object.producerDestinations[i] !== "object") + throw TypeError(".google.api.Logging.producerDestinations: object expected"); + message.producerDestinations[i] = $root.google.api.Logging.LoggingDestination.fromObject(object.producerDestinations[i]); + } + } + if (object.consumerDestinations) { + if (!Array.isArray(object.consumerDestinations)) + throw TypeError(".google.api.Logging.consumerDestinations: array expected"); + message.consumerDestinations = []; + for (var i = 0; i < object.consumerDestinations.length; ++i) { + if (typeof object.consumerDestinations[i] !== "object") + throw TypeError(".google.api.Logging.consumerDestinations: object expected"); + message.consumerDestinations[i] = $root.google.api.Logging.LoggingDestination.fromObject(object.consumerDestinations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Logging message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Logging + * @static + * @param {google.api.Logging} message Logging + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Logging.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.producerDestinations = []; + object.consumerDestinations = []; + } + if (message.producerDestinations && message.producerDestinations.length) { + object.producerDestinations = []; + for (var j = 0; j < message.producerDestinations.length; ++j) + object.producerDestinations[j] = $root.google.api.Logging.LoggingDestination.toObject(message.producerDestinations[j], options); + } + if (message.consumerDestinations && message.consumerDestinations.length) { + object.consumerDestinations = []; + for (var j = 0; j < message.consumerDestinations.length; ++j) + object.consumerDestinations[j] = $root.google.api.Logging.LoggingDestination.toObject(message.consumerDestinations[j], options); + } + return object; + }; + + /** + * Converts this Logging to JSON. + * @function toJSON + * @memberof google.api.Logging + * @instance + * @returns {Object.} JSON object + */ + Logging.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Logging + * @function getTypeUrl + * @memberof google.api.Logging + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Logging.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Logging"; + }; + + Logging.LoggingDestination = (function() { + + /** + * Properties of a LoggingDestination. + * @memberof google.api.Logging + * @interface ILoggingDestination + * @property {string|null} [monitoredResource] LoggingDestination monitoredResource + * @property {Array.|null} [logs] LoggingDestination logs + */ + + /** + * Constructs a new LoggingDestination. + * @memberof google.api.Logging + * @classdesc Represents a LoggingDestination. + * @implements ILoggingDestination + * @constructor + * @param {google.api.Logging.ILoggingDestination=} [properties] Properties to set + */ + function LoggingDestination(properties) { + this.logs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoggingDestination monitoredResource. + * @member {string} monitoredResource + * @memberof google.api.Logging.LoggingDestination + * @instance + */ + LoggingDestination.prototype.monitoredResource = ""; + + /** + * LoggingDestination logs. + * @member {Array.} logs + * @memberof google.api.Logging.LoggingDestination + * @instance + */ + LoggingDestination.prototype.logs = $util.emptyArray; + + /** + * Creates a new LoggingDestination instance using the specified properties. + * @function create + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.ILoggingDestination=} [properties] Properties to set + * @returns {google.api.Logging.LoggingDestination} LoggingDestination instance + */ + LoggingDestination.create = function create(properties) { + return new LoggingDestination(properties); + }; + + /** + * Encodes the specified LoggingDestination message. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * @function encode + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.ILoggingDestination} message LoggingDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logs != null && message.logs.length) + for (var i = 0; i < message.logs.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logs[i]); + if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.monitoredResource); + return writer; + }; + + /** + * Encodes the specified LoggingDestination message, length delimited. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.ILoggingDestination} message LoggingDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoggingDestination message from the specified reader or buffer. + * @function decode + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Logging.LoggingDestination} LoggingDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingDestination.decode = function 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.Logging.LoggingDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.monitoredResource = reader.string(); + break; + } + case 1: { + if (!(message.logs && message.logs.length)) + message.logs = []; + message.logs.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoggingDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Logging.LoggingDestination} LoggingDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoggingDestination message. + * @function verify + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoggingDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + if (!$util.isString(message.monitoredResource)) + return "monitoredResource: string expected"; + if (message.logs != null && message.hasOwnProperty("logs")) { + if (!Array.isArray(message.logs)) + return "logs: array expected"; + for (var i = 0; i < message.logs.length; ++i) + if (!$util.isString(message.logs[i])) + return "logs: string[] expected"; + } + return null; + }; + + /** + * Creates a LoggingDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {Object.} object Plain object + * @returns {google.api.Logging.LoggingDestination} LoggingDestination + */ + LoggingDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Logging.LoggingDestination) + return object; + var message = new $root.google.api.Logging.LoggingDestination(); + if (object.monitoredResource != null) + message.monitoredResource = String(object.monitoredResource); + if (object.logs) { + if (!Array.isArray(object.logs)) + throw TypeError(".google.api.Logging.LoggingDestination.logs: array expected"); + message.logs = []; + for (var i = 0; i < object.logs.length; ++i) + message.logs[i] = String(object.logs[i]); + } + return message; + }; + + /** + * Creates a plain object from a LoggingDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {google.api.Logging.LoggingDestination} message LoggingDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoggingDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.logs = []; + if (options.defaults) + object.monitoredResource = ""; + if (message.logs && message.logs.length) { + object.logs = []; + for (var j = 0; j < message.logs.length; ++j) + object.logs[j] = message.logs[j]; + } + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + object.monitoredResource = message.monitoredResource; return object; - var message = new $root.google.api.DocumentationRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.description != null) - message.description = String(object.description); - if (object.deprecationDescription != null) - message.deprecationDescription = String(object.deprecationDescription); - return message; - }; + }; - /** - * Creates a plain object from a DocumentationRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DocumentationRule - * @static - * @param {google.api.DocumentationRule} message DocumentationRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DocumentationRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.selector = ""; - object.description = ""; - object.deprecationDescription = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.deprecationDescription != null && message.hasOwnProperty("deprecationDescription")) - object.deprecationDescription = message.deprecationDescription; - return object; - }; + /** + * Converts this LoggingDestination to JSON. + * @function toJSON + * @memberof google.api.Logging.LoggingDestination + * @instance + * @returns {Object.} JSON object + */ + LoggingDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this DocumentationRule to JSON. - * @function toJSON - * @memberof google.api.DocumentationRule - * @instance - * @returns {Object.} JSON object - */ - DocumentationRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for LoggingDestination + * @function getTypeUrl + * @memberof google.api.Logging.LoggingDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoggingDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Logging.LoggingDestination"; + }; - return DocumentationRule; + return LoggingDestination; + })(); + + return Logging; })(); - api.Page = (function() { + api.MetricDescriptor = (function() { /** - * Properties of a Page. + * Properties of a MetricDescriptor. * @memberof google.api - * @interface IPage - * @property {string|null} [name] Page name - * @property {string|null} [content] Page content - * @property {Array.|null} [subpages] Page subpages + * @interface IMetricDescriptor + * @property {string|null} [name] MetricDescriptor name + * @property {string|null} [type] MetricDescriptor type + * @property {Array.|null} [labels] MetricDescriptor labels + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType + * @property {string|null} [unit] MetricDescriptor unit + * @property {string|null} [description] MetricDescriptor description + * @property {string|null} [displayName] MetricDescriptor displayName + * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage + * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes */ /** - * Constructs a new Page. + * Constructs a new MetricDescriptor. * @memberof google.api - * @classdesc Represents a Page. - * @implements IPage + * @classdesc Represents a MetricDescriptor. + * @implements IMetricDescriptor * @constructor - * @param {google.api.IPage=} [properties] Properties to set + * @param {google.api.IMetricDescriptor=} [properties] Properties to set */ - function Page(properties) { - this.subpages = []; + function MetricDescriptor(properties) { + this.labels = []; + this.monitoredResourceTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15240,373 +16406,223 @@ } /** - * Page name. + * MetricDescriptor name. * @member {string} name - * @memberof google.api.Page + * @memberof google.api.MetricDescriptor * @instance */ - Page.prototype.name = ""; + MetricDescriptor.prototype.name = ""; /** - * Page content. - * @member {string} content - * @memberof google.api.Page + * MetricDescriptor type. + * @member {string} type + * @memberof google.api.MetricDescriptor * @instance */ - Page.prototype.content = ""; + MetricDescriptor.prototype.type = ""; /** - * Page subpages. - * @member {Array.} subpages - * @memberof google.api.Page + * MetricDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MetricDescriptor * @instance */ - Page.prototype.subpages = $util.emptyArray; - - /** - * Creates a new Page instance using the specified properties. - * @function create - * @memberof google.api.Page - * @static - * @param {google.api.IPage=} [properties] Properties to set - * @returns {google.api.Page} Page instance - */ - Page.create = function create(properties) { - return new Page(properties); - }; - - /** - * Encodes the specified Page message. Does not implicitly {@link google.api.Page.verify|verify} messages. - * @function encode - * @memberof google.api.Page - * @static - * @param {google.api.IPage} message Page message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Page.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.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); - if (message.subpages != null && message.subpages.length) - for (var i = 0; i < message.subpages.length; ++i) - $root.google.api.Page.encode(message.subpages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Page message, length delimited. Does not implicitly {@link google.api.Page.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Page - * @static - * @param {google.api.IPage} message Page message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Page.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Page message from the specified reader or buffer. - * @function decode - * @memberof google.api.Page - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Page} Page - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Page.decode = function 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.Page(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.content = reader.string(); - break; - case 3: - if (!(message.subpages && message.subpages.length)) - message.subpages = []; - message.subpages.push($root.google.api.Page.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Page message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Page - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Page} Page - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Page.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Page message. - * @function verify - * @memberof google.api.Page - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Page.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.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.subpages != null && message.hasOwnProperty("subpages")) { - if (!Array.isArray(message.subpages)) - return "subpages: array expected"; - for (var i = 0; i < message.subpages.length; ++i) { - var error = $root.google.api.Page.verify(message.subpages[i]); - if (error) - return "subpages." + error; - } - } - return null; - }; - - /** - * Creates a Page message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Page - * @static - * @param {Object.} object Plain object - * @returns {google.api.Page} Page - */ - Page.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Page) - return object; - var message = new $root.google.api.Page(); - if (object.name != null) - message.name = String(object.name); - if (object.content != null) - message.content = String(object.content); - if (object.subpages) { - if (!Array.isArray(object.subpages)) - throw TypeError(".google.api.Page.subpages: array expected"); - message.subpages = []; - for (var i = 0; i < object.subpages.length; ++i) { - if (typeof object.subpages[i] !== "object") - throw TypeError(".google.api.Page.subpages: object expected"); - message.subpages[i] = $root.google.api.Page.fromObject(object.subpages[i]); - } - } - return message; - }; + MetricDescriptor.prototype.labels = $util.emptyArray; /** - * Creates a plain object from a Page message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Page - * @static - * @param {google.api.Page} message Page - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * MetricDescriptor metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.api.MetricDescriptor + * @instance */ - Page.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.subpages = []; - if (options.defaults) { - object.name = ""; - object.content = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.subpages && message.subpages.length) { - object.subpages = []; - for (var j = 0; j < message.subpages.length; ++j) - object.subpages[j] = $root.google.api.Page.toObject(message.subpages[j], options); - } - return object; - }; + MetricDescriptor.prototype.metricKind = 0; /** - * Converts this Page to JSON. - * @function toJSON - * @memberof google.api.Page + * MetricDescriptor valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.api.MetricDescriptor * @instance - * @returns {Object.} JSON object */ - Page.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Page; - })(); - - api.Endpoint = (function() { + MetricDescriptor.prototype.valueType = 0; /** - * Properties of an Endpoint. - * @memberof google.api - * @interface IEndpoint - * @property {string|null} [name] Endpoint name - * @property {Array.|null} [aliases] Endpoint aliases - * @property {string|null} [target] Endpoint target - * @property {boolean|null} [allowCors] Endpoint allowCors + * MetricDescriptor unit. + * @member {string} unit + * @memberof google.api.MetricDescriptor + * @instance */ + MetricDescriptor.prototype.unit = ""; /** - * Constructs a new Endpoint. - * @memberof google.api - * @classdesc Represents an Endpoint. - * @implements IEndpoint - * @constructor - * @param {google.api.IEndpoint=} [properties] Properties to set + * MetricDescriptor description. + * @member {string} description + * @memberof google.api.MetricDescriptor + * @instance */ - function Endpoint(properties) { - this.aliases = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + MetricDescriptor.prototype.description = ""; /** - * Endpoint name. - * @member {string} name - * @memberof google.api.Endpoint + * MetricDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MetricDescriptor * @instance */ - Endpoint.prototype.name = ""; + MetricDescriptor.prototype.displayName = ""; /** - * Endpoint aliases. - * @member {Array.} aliases - * @memberof google.api.Endpoint + * MetricDescriptor metadata. + * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata + * @memberof google.api.MetricDescriptor * @instance */ - Endpoint.prototype.aliases = $util.emptyArray; + MetricDescriptor.prototype.metadata = null; /** - * Endpoint target. - * @member {string} target - * @memberof google.api.Endpoint + * MetricDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor * @instance */ - Endpoint.prototype.target = ""; + MetricDescriptor.prototype.launchStage = 0; /** - * Endpoint allowCors. - * @member {boolean} allowCors - * @memberof google.api.Endpoint + * MetricDescriptor monitoredResourceTypes. + * @member {Array.} monitoredResourceTypes + * @memberof google.api.MetricDescriptor * @instance */ - Endpoint.prototype.allowCors = false; + MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; /** - * Creates a new Endpoint instance using the specified properties. + * Creates a new MetricDescriptor instance using the specified properties. * @function create - * @memberof google.api.Endpoint + * @memberof google.api.MetricDescriptor * @static - * @param {google.api.IEndpoint=} [properties] Properties to set - * @returns {google.api.Endpoint} Endpoint instance + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @returns {google.api.MetricDescriptor} MetricDescriptor instance */ - Endpoint.create = function create(properties) { - return new Endpoint(properties); + MetricDescriptor.create = function create(properties) { + return new MetricDescriptor(properties); }; /** - * Encodes the specified Endpoint message. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Endpoint + * @memberof google.api.MetricDescriptor * @static - * @param {google.api.IEndpoint} message Endpoint message or plain object to encode + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Endpoint.encode = function encode(message, writer) { + MetricDescriptor.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.aliases != null && message.aliases.length) - for (var i = 0; i < message.aliases.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.aliases[i]); - if (message.allowCors != null && Object.hasOwnProperty.call(message, "allowCors")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowCors); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.target); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); + if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); return writer; }; /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.api.Endpoint.verify|verify} messages. + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Endpoint + * @memberof google.api.MetricDescriptor * @static - * @param {google.api.IEndpoint} message Endpoint message or plain object to encode + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Endpoint.encodeDelimited = function encodeDelimited(message, writer) { + MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Endpoint message from the specified reader or buffer. + * Decodes a MetricDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Endpoint + * @memberof google.api.MetricDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Endpoint} Endpoint + * @returns {google.api.MetricDescriptor} MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Endpoint.decode = function decode(reader, length) { + MetricDescriptor.decode = function 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.Endpoint(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.aliases && message.aliases.length)) - message.aliases = []; - message.aliases.push(reader.string()); - break; - case 101: - message.target = reader.string(); - break; - case 5: - message.allowCors = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 8: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + } + case 3: { + message.metricKind = reader.int32(); + break; + } + case 4: { + message.valueType = reader.int32(); + break; + } + case 5: { + message.unit = reader.string(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + message.displayName = reader.string(); + break; + } + case 10: { + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); + break; + } + case 12: { + message.launchStage = reader.int32(); + break; + } + case 13: { + if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) + message.monitoredResourceTypes = []; + message.monitoredResourceTypes.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -15616,424 +16632,690 @@ }; /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Endpoint + * @memberof google.api.MetricDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Endpoint} Endpoint + * @returns {google.api.MetricDescriptor} MetricDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Endpoint.decodeDelimited = function decodeDelimited(reader) { + MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Endpoint message. + * Verifies a MetricDescriptor message. * @function verify - * @memberof google.api.Endpoint + * @memberof google.api.MetricDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Endpoint.verify = function verify(message) { + MetricDescriptor.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.aliases != null && message.hasOwnProperty("aliases")) { - if (!Array.isArray(message.aliases)) - return "aliases: array expected"; - for (var i = 0; i < message.aliases.length; ++i) - if (!$util.isString(message.aliases[i])) - return "aliases: string[] expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + switch (message.metricKind) { + default: + return "metricKind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + 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.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { + if (!Array.isArray(message.monitoredResourceTypes)) + return "monitoredResourceTypes: array expected"; + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + if (!$util.isString(message.monitoredResourceTypes[i])) + return "monitoredResourceTypes: string[] expected"; } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.allowCors != null && message.hasOwnProperty("allowCors")) - if (typeof message.allowCors !== "boolean") - return "allowCors: boolean expected"; return null; }; /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Endpoint + * @memberof google.api.MetricDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Endpoint} Endpoint + * @returns {google.api.MetricDescriptor} MetricDescriptor */ - Endpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Endpoint) + MetricDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor) return object; - var message = new $root.google.api.Endpoint(); + var message = new $root.google.api.MetricDescriptor(); if (object.name != null) message.name = String(object.name); - if (object.aliases) { - if (!Array.isArray(object.aliases)) - throw TypeError(".google.api.Endpoint.aliases: array expected"); - message.aliases = []; - for (var i = 0; i < object.aliases.length; ++i) - message.aliases[i] = String(object.aliases[i]); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MetricDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MetricDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + switch (object.metricKind) { + case "METRIC_KIND_UNSPECIFIED": + case 0: + message.metricKind = 0; + break; + case "GAUGE": + case 1: + message.metricKind = 1; + break; + case "DELTA": + case 2: + message.metricKind = 2; + break; + case "CUMULATIVE": + case 3: + message.metricKind = 3; + break; + } + switch (object.valueType) { + case "VALUE_TYPE_UNSPECIFIED": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + case "DOUBLE": + case 3: + message.valueType = 3; + break; + case "STRING": + case 4: + message.valueType = 4; + break; + case "DISTRIBUTION": + case 5: + message.valueType = 5; + break; + case "MONEY": + case 6: + message.valueType = 6; + break; + } + if (object.unit != null) + message.unit = String(object.unit); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); + } + switch (object.launchStage) { + 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.monitoredResourceTypes) { + if (!Array.isArray(object.monitoredResourceTypes)) + throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); + message.monitoredResourceTypes = []; + for (var i = 0; i < object.monitoredResourceTypes.length; ++i) + message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); } - if (object.target != null) - message.target = String(object.target); - if (object.allowCors != null) - message.allowCors = Boolean(object.allowCors); return message; }; /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Endpoint + * @memberof google.api.MetricDescriptor * @static - * @param {google.api.Endpoint} message Endpoint + * @param {google.api.MetricDescriptor} message MetricDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Endpoint.toObject = function toObject(message, options) { + MetricDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.aliases = []; + if (options.arrays || options.defaults) { + object.labels = []; + object.monitoredResourceTypes = []; + } if (options.defaults) { object.name = ""; - object.allowCors = false; - object.target = ""; + object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.unit = ""; + object.description = ""; + object.displayName = ""; + object.type = ""; + object.metadata = null; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.aliases && message.aliases.length) { - object.aliases = []; - for (var j = 0; j < message.aliases.length; ++j) - object.aliases[j] = message.aliases[j]; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { + object.monitoredResourceTypes = []; + for (var j = 0; j < message.monitoredResourceTypes.length; ++j) + object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; } - if (message.allowCors != null && message.hasOwnProperty("allowCors")) - object.allowCors = message.allowCors; - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; return object; }; /** - * Converts this Endpoint to JSON. + * Converts this MetricDescriptor to JSON. * @function toJSON - * @memberof google.api.Endpoint + * @memberof google.api.MetricDescriptor * @instance * @returns {Object.} JSON object */ - Endpoint.prototype.toJSON = function toJSON() { + MetricDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Endpoint; - })(); - - api.LogDescriptor = (function() { - /** - * Properties of a LogDescriptor. - * @memberof google.api - * @interface ILogDescriptor - * @property {string|null} [name] LogDescriptor name - * @property {Array.|null} [labels] LogDescriptor labels - * @property {string|null} [description] LogDescriptor description - * @property {string|null} [displayName] LogDescriptor displayName + * Gets the default type url for MetricDescriptor + * @function getTypeUrl + * @memberof google.api.MetricDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + MetricDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MetricDescriptor"; + }; - /** - * Constructs a new LogDescriptor. - * @memberof google.api - * @classdesc Represents a LogDescriptor. - * @implements ILogDescriptor - * @constructor - * @param {google.api.ILogDescriptor=} [properties] Properties to set - */ - function LogDescriptor(properties) { - this.labels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + MetricDescriptor.MetricDescriptorMetadata = (function() { - /** - * LogDescriptor name. - * @member {string} name - * @memberof google.api.LogDescriptor - * @instance - */ - LogDescriptor.prototype.name = ""; + /** + * Properties of a MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @interface IMetricDescriptorMetadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage + * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod + * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay + */ - /** - * LogDescriptor labels. - * @member {Array.} labels - * @memberof google.api.LogDescriptor - * @instance - */ - LogDescriptor.prototype.labels = $util.emptyArray; + /** + * Constructs a new MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @classdesc Represents a MetricDescriptorMetadata. + * @implements IMetricDescriptorMetadata + * @constructor + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + */ + function MetricDescriptorMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * LogDescriptor description. - * @member {string} description - * @memberof google.api.LogDescriptor - * @instance - */ - LogDescriptor.prototype.description = ""; + /** + * MetricDescriptorMetadata launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.launchStage = 0; - /** - * LogDescriptor displayName. - * @member {string} displayName - * @memberof google.api.LogDescriptor - * @instance - */ - LogDescriptor.prototype.displayName = ""; + /** + * MetricDescriptorMetadata samplePeriod. + * @member {google.protobuf.IDuration|null|undefined} samplePeriod + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.samplePeriod = null; - /** - * Creates a new LogDescriptor instance using the specified properties. - * @function create - * @memberof google.api.LogDescriptor - * @static - * @param {google.api.ILogDescriptor=} [properties] Properties to set - * @returns {google.api.LogDescriptor} LogDescriptor instance - */ - LogDescriptor.create = function create(properties) { - return new LogDescriptor(properties); - }; + /** + * MetricDescriptorMetadata ingestDelay. + * @member {google.protobuf.IDuration|null|undefined} ingestDelay + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.ingestDelay = null; - /** - * Encodes the specified LogDescriptor message. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.LogDescriptor - * @static - * @param {google.api.ILogDescriptor} message LogDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogDescriptor.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.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); - return writer; - }; + /** + * Creates a new MetricDescriptorMetadata instance using the specified properties. + * @function create + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance + */ + MetricDescriptorMetadata.create = function create(properties) { + return new MetricDescriptorMetadata(properties); + }; + + /** + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); + if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) + $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) + $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decode = function 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.MetricDescriptor.MetricDescriptorMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.launchStage = reader.int32(); + break; + } + case 2: { + message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified LogDescriptor message, length delimited. Does not implicitly {@link google.api.LogDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.LogDescriptor - * @static - * @param {google.api.ILogDescriptor} message LogDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a LogDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.LogDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.LogDescriptor} LogDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogDescriptor.decode = function 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.LogDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Verifies a MetricDescriptorMetadata message. + * @function verify + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricDescriptorMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { + var error = $root.google.protobuf.Duration.verify(message.samplePeriod); + if (error) + return "samplePeriod." + error; + } + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { + var error = $root.google.protobuf.Duration.verify(message.ingestDelay); + if (error) + return "ingestDelay." + error; + } + return null; + }; + + /** + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + */ + MetricDescriptorMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) + return object; + var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + switch (object.launchStage) { + 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.name = reader.string(); + message.launchStage = 1; break; + case "ALPHA": case 2: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + message.launchStage = 2; break; + case "BETA": case 3: - message.description = reader.string(); + message.launchStage = 3; break; + case "GA": case 4: - message.displayName = reader.string(); + message.launchStage = 4; break; - default: - reader.skipType(tag & 7); + case "DEPRECATED": + case 5: + message.launchStage = 5; break; } - } - return message; - }; - - /** - * Decodes a LogDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.LogDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LogDescriptor} LogDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LogDescriptor message. - * @function verify - * @memberof google.api.LogDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogDescriptor.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.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); - if (error) - return "labels." + error; + if (object.samplePeriod != null) { + if (typeof object.samplePeriod !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); + message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); } - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - return null; - }; + if (object.ingestDelay != null) { + if (typeof object.ingestDelay !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); + message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); + } + return message; + }; - /** - * Creates a LogDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.LogDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.LogDescriptor} LogDescriptor - */ - LogDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LogDescriptor) + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricDescriptorMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.samplePeriod = null; + object.ingestDelay = null; + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) + object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) + object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); return object; - var message = new $root.google.api.LogDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.LogDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.LogDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + }; + + /** + * Converts this MetricDescriptorMetadata to JSON. + * @function toJSON + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + * @returns {Object.} JSON object + */ + MetricDescriptorMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricDescriptorMetadata + * @function getTypeUrl + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricDescriptorMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - } - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; + return typeUrlPrefix + "/google.api.MetricDescriptor.MetricDescriptorMetadata"; + }; + + return MetricDescriptorMetadata; + })(); /** - * Creates a plain object from a LogDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.LogDescriptor - * @static - * @param {google.api.LogDescriptor} message LogDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * MetricKind enum. + * @name google.api.MetricDescriptor.MetricKind + * @enum {number} + * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value + * @property {number} GAUGE=1 GAUGE value + * @property {number} DELTA=2 DELTA value + * @property {number} CUMULATIVE=3 CUMULATIVE value */ - LogDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.labels = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; + MetricDescriptor.MetricKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "GAUGE"] = 1; + values[valuesById[2] = "DELTA"] = 2; + values[valuesById[3] = "CUMULATIVE"] = 3; + return values; + })(); /** - * Converts this LogDescriptor to JSON. - * @function toJSON - * @memberof google.api.LogDescriptor - * @instance - * @returns {Object.} JSON object + * ValueType enum. + * @name google.api.MetricDescriptor.ValueType + * @enum {number} + * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + * @property {number} DOUBLE=3 DOUBLE value + * @property {number} STRING=4 STRING value + * @property {number} DISTRIBUTION=5 DISTRIBUTION value + * @property {number} MONEY=6 MONEY value */ - LogDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + MetricDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + values[valuesById[3] = "DOUBLE"] = 3; + values[valuesById[4] = "STRING"] = 4; + values[valuesById[5] = "DISTRIBUTION"] = 5; + values[valuesById[6] = "MONEY"] = 6; + return values; + })(); - return LogDescriptor; + return MetricDescriptor; })(); - api.Logging = (function() { + api.Metric = (function() { /** - * Properties of a Logging. + * Properties of a Metric. * @memberof google.api - * @interface ILogging - * @property {Array.|null} [producerDestinations] Logging producerDestinations - * @property {Array.|null} [consumerDestinations] Logging consumerDestinations + * @interface IMetric + * @property {string|null} [type] Metric type + * @property {Object.|null} [labels] Metric labels */ /** - * Constructs a new Logging. + * Constructs a new Metric. * @memberof google.api - * @classdesc Represents a Logging. - * @implements ILogging + * @classdesc Represents a Metric. + * @implements IMetric * @constructor - * @param {google.api.ILogging=} [properties] Properties to set + * @param {google.api.IMetric=} [properties] Properties to set */ - function Logging(properties) { - this.producerDestinations = []; - this.consumerDestinations = []; + function Metric(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16041,95 +17323,111 @@ } /** - * Logging producerDestinations. - * @member {Array.} producerDestinations - * @memberof google.api.Logging + * Metric type. + * @member {string} type + * @memberof google.api.Metric * @instance */ - Logging.prototype.producerDestinations = $util.emptyArray; + Metric.prototype.type = ""; /** - * Logging consumerDestinations. - * @member {Array.} consumerDestinations - * @memberof google.api.Logging + * Metric labels. + * @member {Object.} labels + * @memberof google.api.Metric * @instance */ - Logging.prototype.consumerDestinations = $util.emptyArray; + Metric.prototype.labels = $util.emptyObject; /** - * Creates a new Logging instance using the specified properties. + * Creates a new Metric instance using the specified properties. * @function create - * @memberof google.api.Logging + * @memberof google.api.Metric * @static - * @param {google.api.ILogging=} [properties] Properties to set - * @returns {google.api.Logging} Logging instance + * @param {google.api.IMetric=} [properties] Properties to set + * @returns {google.api.Metric} Metric instance */ - Logging.create = function create(properties) { - return new Logging(properties); + Metric.create = function create(properties) { + return new Metric(properties); }; /** - * Encodes the specified Logging message. Does not implicitly {@link google.api.Logging.verify|verify} messages. + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. * @function encode - * @memberof google.api.Logging + * @memberof google.api.Metric * @static - * @param {google.api.ILogging} message Logging message or plain object to encode + * @param {google.api.IMetric} message Metric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Logging.encode = function encode(message, writer) { + Metric.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.producerDestinations != null && message.producerDestinations.length) - for (var i = 0; i < message.producerDestinations.length; ++i) - $root.google.api.Logging.LoggingDestination.encode(message.producerDestinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.consumerDestinations != null && message.consumerDestinations.length) - for (var i = 0; i < message.consumerDestinations.length; ++i) - $root.google.api.Logging.LoggingDestination.encode(message.consumerDestinations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); return writer; }; /** - * Encodes the specified Logging message, length delimited. Does not implicitly {@link google.api.Logging.verify|verify} messages. + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Logging + * @memberof google.api.Metric * @static - * @param {google.api.ILogging} message Logging message or plain object to encode + * @param {google.api.IMetric} message Metric message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Logging.encodeDelimited = function encodeDelimited(message, writer) { + Metric.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Logging message from the specified reader or buffer. + * Decodes a Metric message from the specified reader or buffer. * @function decode - * @memberof google.api.Logging + * @memberof google.api.Metric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Logging} Logging + * @returns {google.api.Metric} Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Logging.decode = function decode(reader, length) { + Metric.decode = function 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.Logging(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.producerDestinations && message.producerDestinations.length)) - message.producerDestinations = []; - message.producerDestinations.push($root.google.api.Logging.LoggingDestination.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.consumerDestinations && message.consumerDestinations.length)) - message.consumerDestinations = []; - message.consumerDestinations.push($root.google.api.Logging.LoggingDestination.decode(reader, reader.uint32())); - break; + case 3: { + message.type = reader.string(); + break; + } + case 2: { + 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; + } default: reader.skipType(tag & 7); break; @@ -16139,356 +17437,151 @@ }; /** - * Decodes a Logging message from the specified reader or buffer, length delimited. + * Decodes a Metric message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Logging + * @memberof google.api.Metric * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Logging} Logging + * @returns {google.api.Metric} Metric * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Logging.decodeDelimited = function decodeDelimited(reader) { + Metric.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Logging message. + * Verifies a Metric message. * @function verify - * @memberof google.api.Logging + * @memberof google.api.Metric * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Logging.verify = function verify(message) { + Metric.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.producerDestinations != null && message.hasOwnProperty("producerDestinations")) { - if (!Array.isArray(message.producerDestinations)) - return "producerDestinations: array expected"; - for (var i = 0; i < message.producerDestinations.length; ++i) { - var error = $root.google.api.Logging.LoggingDestination.verify(message.producerDestinations[i]); - if (error) - return "producerDestinations." + error; - } - } - if (message.consumerDestinations != null && message.hasOwnProperty("consumerDestinations")) { - if (!Array.isArray(message.consumerDestinations)) - return "consumerDestinations: array expected"; - for (var i = 0; i < message.consumerDestinations.length; ++i) { - var error = $root.google.api.Logging.LoggingDestination.verify(message.consumerDestinations[i]); - if (error) - return "consumerDestinations." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: 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"; } return null; }; /** - * Creates a Logging message from a plain object. Also converts values to their respective internal types. + * Creates a Metric message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Logging + * @memberof google.api.Metric * @static * @param {Object.} object Plain object - * @returns {google.api.Logging} Logging + * @returns {google.api.Metric} Metric */ - Logging.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Logging) + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Metric) return object; - var message = new $root.google.api.Logging(); - if (object.producerDestinations) { - if (!Array.isArray(object.producerDestinations)) - throw TypeError(".google.api.Logging.producerDestinations: array expected"); - message.producerDestinations = []; - for (var i = 0; i < object.producerDestinations.length; ++i) { - if (typeof object.producerDestinations[i] !== "object") - throw TypeError(".google.api.Logging.producerDestinations: object expected"); - message.producerDestinations[i] = $root.google.api.Logging.LoggingDestination.fromObject(object.producerDestinations[i]); - } - } - if (object.consumerDestinations) { - if (!Array.isArray(object.consumerDestinations)) - throw TypeError(".google.api.Logging.consumerDestinations: array expected"); - message.consumerDestinations = []; - for (var i = 0; i < object.consumerDestinations.length; ++i) { - if (typeof object.consumerDestinations[i] !== "object") - throw TypeError(".google.api.Logging.consumerDestinations: object expected"); - message.consumerDestinations[i] = $root.google.api.Logging.LoggingDestination.fromObject(object.consumerDestinations[i]); - } + var message = new $root.google.api.Metric(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.Metric.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]]); } return message; }; /** - * Creates a plain object from a Logging message. Also converts values to other types if specified. + * Creates a plain object from a Metric message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Logging + * @memberof google.api.Metric * @static - * @param {google.api.Logging} message Logging + * @param {google.api.Metric} message Metric * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Logging.toObject = function toObject(message, options) { + Metric.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.producerDestinations = []; - object.consumerDestinations = []; - } - if (message.producerDestinations && message.producerDestinations.length) { - object.producerDestinations = []; - for (var j = 0; j < message.producerDestinations.length; ++j) - object.producerDestinations[j] = $root.google.api.Logging.LoggingDestination.toObject(message.producerDestinations[j], options); - } - if (message.consumerDestinations && message.consumerDestinations.length) { - object.consumerDestinations = []; - for (var j = 0; j < message.consumerDestinations.length; ++j) - object.consumerDestinations[j] = $root.google.api.Logging.LoggingDestination.toObject(message.consumerDestinations[j], options); + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + 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.type != null && message.hasOwnProperty("type")) + object.type = message.type; return object; }; /** - * Converts this Logging to JSON. + * Converts this Metric to JSON. * @function toJSON - * @memberof google.api.Logging + * @memberof google.api.Metric * @instance * @returns {Object.} JSON object */ - Logging.prototype.toJSON = function toJSON() { + Metric.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Logging.LoggingDestination = (function() { - - /** - * Properties of a LoggingDestination. - * @memberof google.api.Logging - * @interface ILoggingDestination - * @property {string|null} [monitoredResource] LoggingDestination monitoredResource - * @property {Array.|null} [logs] LoggingDestination logs - */ - - /** - * Constructs a new LoggingDestination. - * @memberof google.api.Logging - * @classdesc Represents a LoggingDestination. - * @implements ILoggingDestination - * @constructor - * @param {google.api.Logging.ILoggingDestination=} [properties] Properties to set - */ - function LoggingDestination(properties) { - this.logs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof google.api.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.api.Metric"; + }; - /** - * LoggingDestination monitoredResource. - * @member {string} monitoredResource - * @memberof google.api.Logging.LoggingDestination - * @instance - */ - LoggingDestination.prototype.monitoredResource = ""; - - /** - * LoggingDestination logs. - * @member {Array.} logs - * @memberof google.api.Logging.LoggingDestination - * @instance - */ - LoggingDestination.prototype.logs = $util.emptyArray; - - /** - * Creates a new LoggingDestination instance using the specified properties. - * @function create - * @memberof google.api.Logging.LoggingDestination - * @static - * @param {google.api.Logging.ILoggingDestination=} [properties] Properties to set - * @returns {google.api.Logging.LoggingDestination} LoggingDestination instance - */ - LoggingDestination.create = function create(properties) { - return new LoggingDestination(properties); - }; - - /** - * Encodes the specified LoggingDestination message. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. - * @function encode - * @memberof google.api.Logging.LoggingDestination - * @static - * @param {google.api.Logging.ILoggingDestination} message LoggingDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logs != null && message.logs.length) - for (var i = 0; i < message.logs.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.logs[i]); - if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.monitoredResource); - return writer; - }; - - /** - * Encodes the specified LoggingDestination message, length delimited. Does not implicitly {@link google.api.Logging.LoggingDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Logging.LoggingDestination - * @static - * @param {google.api.Logging.ILoggingDestination} message LoggingDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoggingDestination message from the specified reader or buffer. - * @function decode - * @memberof google.api.Logging.LoggingDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Logging.LoggingDestination} LoggingDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoggingDestination.decode = function 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.Logging.LoggingDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.monitoredResource = reader.string(); - break; - case 1: - if (!(message.logs && message.logs.length)) - message.logs = []; - message.logs.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoggingDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Logging.LoggingDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Logging.LoggingDestination} LoggingDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoggingDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoggingDestination message. - * @function verify - * @memberof google.api.Logging.LoggingDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoggingDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) - if (!$util.isString(message.monitoredResource)) - return "monitoredResource: string expected"; - if (message.logs != null && message.hasOwnProperty("logs")) { - if (!Array.isArray(message.logs)) - return "logs: array expected"; - for (var i = 0; i < message.logs.length; ++i) - if (!$util.isString(message.logs[i])) - return "logs: string[] expected"; - } - return null; - }; - - /** - * Creates a LoggingDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Logging.LoggingDestination - * @static - * @param {Object.} object Plain object - * @returns {google.api.Logging.LoggingDestination} LoggingDestination - */ - LoggingDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Logging.LoggingDestination) - return object; - var message = new $root.google.api.Logging.LoggingDestination(); - if (object.monitoredResource != null) - message.monitoredResource = String(object.monitoredResource); - if (object.logs) { - if (!Array.isArray(object.logs)) - throw TypeError(".google.api.Logging.LoggingDestination.logs: array expected"); - message.logs = []; - for (var i = 0; i < object.logs.length; ++i) - message.logs[i] = String(object.logs[i]); - } - return message; - }; - - /** - * Creates a plain object from a LoggingDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Logging.LoggingDestination - * @static - * @param {google.api.Logging.LoggingDestination} message LoggingDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoggingDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.logs = []; - if (options.defaults) - object.monitoredResource = ""; - if (message.logs && message.logs.length) { - object.logs = []; - for (var j = 0; j < message.logs.length; ++j) - object.logs[j] = message.logs[j]; - } - if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) - object.monitoredResource = message.monitoredResource; - return object; - }; - - /** - * Converts this LoggingDestination to JSON. - * @function toJSON - * @memberof google.api.Logging.LoggingDestination - * @instance - * @returns {Object.} JSON object - */ - LoggingDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LoggingDestination; - })(); + return Metric; + })(); - return Logging; + /** + * 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; })(); api.MonitoredResourceDescriptor = (function() { @@ -16640,26 +17733,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; - case 1: - message.type = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 7: - message.launchStage = reader.int32(); - break; + case 5: { + message.name = reader.string(); + break; + } + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + } + case 7: { + message.launchStage = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -16851,6 +17950,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MonitoredResourceDescriptor + * @function getTypeUrl + * @memberof google.api.MonitoredResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoredResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MonitoredResourceDescriptor"; + }; + return MonitoredResourceDescriptor; })(); @@ -16959,31 +18073,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - 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.type = reader.string(); + break; + } + case 2: { + 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; default: reader.skipType(tag & 7); break; @@ -17096,6 +18212,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MonitoredResource + * @function getTypeUrl + * @memberof google.api.MonitoredResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoredResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MonitoredResource"; + }; + return MonitoredResource; })(); @@ -17204,31 +18335,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 2: - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - 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.systemLabels = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + 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.userLabels[key] = value; + break; } - message.userLabels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -17346,6 +18479,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MonitoredResourceMetadata + * @function getTypeUrl + * @memberof google.api.MonitoredResourceMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoredResourceMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MonitoredResourceMetadata"; + }; + return MonitoredResourceMetadata; })(); @@ -17456,16 +18604,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.producerDestinations && message.producerDestinations.length)) - message.producerDestinations = []; - message.producerDestinations.push($root.google.api.Monitoring.MonitoringDestination.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.consumerDestinations && message.consumerDestinations.length)) - message.consumerDestinations = []; - message.consumerDestinations.push($root.google.api.Monitoring.MonitoringDestination.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.producerDestinations && message.producerDestinations.length)) + message.producerDestinations = []; + message.producerDestinations.push($root.google.api.Monitoring.MonitoringDestination.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.consumerDestinations && message.consumerDestinations.length)) + message.consumerDestinations = []; + message.consumerDestinations.push($root.google.api.Monitoring.MonitoringDestination.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -17598,6 +18748,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Monitoring + * @function getTypeUrl + * @memberof google.api.Monitoring + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Monitoring.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Monitoring"; + }; + Monitoring.MonitoringDestination = (function() { /** @@ -17703,14 +18868,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.monitoredResource = reader.string(); - break; - case 2: - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push(reader.string()); - break; + case 1: { + message.monitoredResource = reader.string(); + break; + } + case 2: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -17821,6 +18988,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MonitoringDestination + * @function getTypeUrl + * @memberof google.api.Monitoring.MonitoringDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoringDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Monitoring.MonitoringDestination"; + }; + return MonitoringDestination; })(); @@ -17934,16 +19116,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - if (!(message.limits && message.limits.length)) - message.limits = []; - message.limits.push($root.google.api.QuotaLimit.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.metricRules && message.metricRules.length)) - message.metricRules = []; - message.metricRules.push($root.google.api.MetricRule.decode(reader, reader.uint32())); - break; + case 3: { + if (!(message.limits && message.limits.length)) + message.limits = []; + message.limits.push($root.google.api.QuotaLimit.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.metricRules && message.metricRules.length)) + message.metricRules = []; + message.metricRules.push($root.google.api.MetricRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -18076,6 +19260,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Quota + * @function getTypeUrl + * @memberof google.api.Quota + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Quota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Quota"; + }; + return Quota; })(); @@ -18184,31 +19383,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - if (message.metricCosts === $util.emptyObject) - message.metricCosts = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int64(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + if (message.metricCosts === $util.emptyObject) + message.metricCosts = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.metricCosts[key] = value; + break; } - message.metricCosts[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -18331,6 +19532,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MetricRule + * @function getTypeUrl + * @memberof google.api.MetricRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MetricRule"; + }; + return MetricRule; })(); @@ -18527,55 +19743,65 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.defaultLimit = reader.int64(); - break; - case 4: - message.maxLimit = reader.int64(); - break; - case 7: - message.freeTier = reader.int64(); - break; - case 5: - message.duration = reader.string(); - break; - case 8: - message.metric = reader.string(); - break; - case 9: - message.unit = reader.string(); - break; - case 10: - if (message.values === $util.emptyObject) - message.values = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int64(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 6: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.defaultLimit = reader.int64(); + break; + } + case 4: { + message.maxLimit = reader.int64(); + break; + } + case 7: { + message.freeTier = reader.int64(); + break; + } + case 5: { + message.duration = reader.string(); + break; + } + case 8: { + message.metric = reader.string(); + break; + } + case 9: { + message.unit = reader.string(); + break; + } + case 10: { + if (message.values === $util.emptyObject) + message.values = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.values[key] = value; + break; + } + case 12: { + message.displayName = reader.string(); + break; } - message.values[key] = value; - break; - case 12: - message.displayName = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -18805,642 +20031,22 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return QuotaLimit; - })(); - - 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 + * Gets the default type url for QuotaLimit + * @function getTypeUrl + * @memberof google.api.QuotaLimit * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; + QuotaLimit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - 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 typeUrlPrefix + "/google.api.QuotaLimit"; }; - return ResourceReference; + return QuotaLimit; })(); api.SourceInfo = (function() { @@ -19537,11 +20143,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.sourceFiles && message.sourceFiles.length)) - message.sourceFiles = []; - message.sourceFiles.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.sourceFiles && message.sourceFiles.length)) + message.sourceFiles = []; + message.sourceFiles.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -19648,6 +20255,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceInfo + * @function getTypeUrl + * @memberof google.api.SourceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SourceInfo"; + }; + return SourceInfo; })(); @@ -19745,11 +20367,12 @@ 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.SystemParameterRule.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.SystemParameterRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -19856,6 +20479,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SystemParameters + * @function getTypeUrl + * @memberof google.api.SystemParameters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SystemParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SystemParameters"; + }; + return SystemParameters; })(); @@ -19964,14 +20602,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.api.SystemParameter.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.api.SystemParameter.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -20087,6 +20727,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SystemParameterRule + * @function getTypeUrl + * @memberof google.api.SystemParameterRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SystemParameterRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SystemParameterRule"; + }; + return SystemParameterRule; })(); @@ -20204,15 +20859,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.httpHeader = reader.string(); - break; - case 3: - message.urlQueryParameter = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.httpHeader = reader.string(); + break; + } + case 3: { + message.urlQueryParameter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20319,6 +20977,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SystemParameter + * @function getTypeUrl + * @memberof google.api.SystemParameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SystemParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SystemParameter"; + }; + return SystemParameter; })(); @@ -20440,19 +21113,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.requirements && message.requirements.length)) - message.requirements = []; - message.requirements.push(reader.string()); - break; - case 6: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.UsageRule.decode(reader, reader.uint32())); - break; - case 7: - message.producerNotificationChannel = reader.string(); - break; + case 1: { + if (!(message.requirements && message.requirements.length)) + message.requirements = []; + message.requirements.push(reader.string()); + break; + } + case 6: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.UsageRule.decode(reader, reader.uint32())); + break; + } + case 7: { + message.producerNotificationChannel = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20589,6 +21265,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Usage + * @function getTypeUrl + * @memberof google.api.Usage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Usage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Usage"; + }; + return Usage; })(); @@ -20706,15 +21397,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.allowUnregisteredCalls = reader.bool(); - break; - case 3: - message.skipServiceControl = reader.bool(); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.allowUnregisteredCalls = reader.bool(); + break; + } + case 3: { + message.skipServiceControl = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -20821,6 +21515,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UsageRule + * @function getTypeUrl + * @memberof google.api.UsageRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UsageRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.UsageRule"; + }; + return UsageRule; })(); @@ -20930,11 +21639,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; @@ -21041,6 +21751,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; })(); @@ -21062,6 +21787,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 */ /** @@ -21182,6 +21908,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 @@ -21237,6 +21971,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; }; @@ -21271,66 +22007,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; @@ -21442,6 +22194,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; }; @@ -21534,6 +22289,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -21565,6 +22322,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -21611,6 +22369,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; }; @@ -21625,6 +22385,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; })(); @@ -21835,52 +22610,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; @@ -22181,6 +22966,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() { /** @@ -22295,15 +23095,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; @@ -22415,6 +23218,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; })(); @@ -22521,12 +23339,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; @@ -22625,6 +23445,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; })(); @@ -22725,11 +23560,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; @@ -22836,6 +23672,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; })(); @@ -23041,39 +23892,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; @@ -23360,6 +24222,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 @@ -23528,12 +24405,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; @@ -23637,6 +24516,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; })(); @@ -23782,27 +24676,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; @@ -23978,6 +24877,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() { /** @@ -24081,12 +24995,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; @@ -24185,6 +25101,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; })(); @@ -24305,15 +25236,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; @@ -24425,6 +25359,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; })(); @@ -24544,17 +25493,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; @@ -24684,6 +25636,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; })(); @@ -24834,24 +25801,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; @@ -24987,6 +25960,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; })(); @@ -25017,7 +26005,6 @@ * @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 */ /** @@ -25030,7 +26017,6 @@ */ 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) @@ -25205,14 +26191,6 @@ */ 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 @@ -25280,9 +26258,6 @@ 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; }; @@ -25317,76 +26292,92 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 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; + } default: reader.skipType(tag & 7); break; @@ -25497,15 +26488,6 @@ 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; }; @@ -25583,16 +26565,6 @@ 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; }; @@ -25609,10 +26581,8 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { + if (options.arrays || options.defaults) object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } if (options.defaults) { object.javaPackage = ""; object.javaOuterClassname = ""; @@ -25680,11 +26650,6 @@ 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; }; @@ -25699,6 +26664,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 @@ -25729,7 +26709,6 @@ * @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 */ /** @@ -25788,14 +26767,6 @@ */ 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 @@ -25831,8 +26802,6 @@ 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; }; @@ -25867,26 +26836,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 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; + } default: reader.skipType(tag & 7); break; @@ -25943,11 +26914,6 @@ 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; }; @@ -25981,11 +26947,6 @@ 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; }; @@ -26009,7 +26970,6 @@ 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; @@ -26024,8 +26984,6 @@ 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; }; @@ -26040,6 +26998,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; })(); @@ -26053,11 +27026,11 @@ * @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 * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** @@ -26109,6 +27082,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -26141,14 +27122,6 @@ */ 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 @@ -26185,6 +27158,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(); @@ -26194,8 +27169,6 @@ 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; }; @@ -26230,42 +27203,51 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -26325,6 +27307,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"; @@ -26358,11 +27343,6 @@ break; } } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } return null; }; @@ -26410,6 +27390,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) @@ -26465,11 +27447,6 @@ break; } } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } return message; }; @@ -26497,7 +27474,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; - object[".google.api.resourceReference"] = null; + object.unverifiedLazy = false; } if (message.ctype != null && message.hasOwnProperty("ctype")) object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; @@ -26511,6 +27488,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) @@ -26521,8 +27500,6 @@ 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; }; @@ -26537,6 +27514,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 @@ -26666,11 +27658,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; @@ -26777,6 +27770,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; })(); @@ -26896,17 +27904,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; @@ -27031,6 +28042,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; })(); @@ -27139,14 +28165,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; @@ -27262,6 +28290,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; })(); @@ -27392,20 +28435,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; @@ -27538,6 +28585,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; })(); @@ -27692,28 +28754,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; @@ -27903,6 +28971,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 @@ -28082,29 +29165,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; @@ -28217,7 +29307,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); @@ -28298,6 +29388,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() { /** @@ -28399,12 +29504,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; @@ -28505,6 +29612,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; })(); @@ -28605,11 +29727,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; @@ -28716,6 +29839,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() { /** @@ -28864,37 +30002,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; @@ -29055,6 +30198,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; })(); @@ -29155,11 +30313,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; @@ -29266,6 +30425,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() { /** @@ -29276,6 +30450,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 */ /** @@ -29326,6 +30501,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 @@ -29362,6 +30545,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; }; @@ -29396,25 +30581,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; @@ -29466,6 +30659,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; }; @@ -29494,6 +30696,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; }; @@ -29516,6 +30732,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -29528,6 +30745,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; }; @@ -29542,6 +30761,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; })(); @@ -29651,12 +30901,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; @@ -29769,6 +31021,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; })(); @@ -29875,12 +31142,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; @@ -29993,6 +31262,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; })(); @@ -30092,28 +31376,29 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.fields[key] = value; + break; } - message.fields[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -30222,6 +31507,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; + return Struct; })(); @@ -30386,24 +31686,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.nullValue = reader.int32(); - break; - case 2: - message.numberValue = reader.double(); - break; - case 3: - message.stringValue = reader.string(); - break; - case 4: - message.boolValue = reader.bool(); - break; - case 5: - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 6: - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); - break; + case 1: { + message.nullValue = reader.int32(); + break; + } + case 2: { + message.numberValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -30587,6 +31893,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; + return Value; })(); @@ -30696,11 +32017,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -30807,6 +32129,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; + return ListValue; })(); @@ -30913,12 +32250,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; @@ -30980,7 +32319,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; }; @@ -31026,6 +32365,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; })(); @@ -31193,33 +32547,40 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.methods && message.methods.length)) - message.methods = []; - message.methods.push($root.google.protobuf.Method.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); - break; - case 4: - message.version = reader.string(); - break; - case 5: - message.sourceContext = $root.google.protobuf.SourceContext.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.mixins && message.mixins.length)) - message.mixins = []; - message.mixins.push($root.google.protobuf.Mixin.decode(reader, reader.uint32())); - break; - case 7: - message.syntax = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push($root.google.protobuf.Method.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + } + case 4: { + message.version = reader.string(); + break; + } + case 5: { + message.sourceContext = $root.google.protobuf.SourceContext.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.mixins && message.mixins.length)) + message.mixins = []; + message.mixins.push($root.google.protobuf.Mixin.decode(reader, reader.uint32())); + break; + } + case 7: { + message.syntax = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -31429,6 +32790,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Api + * @function getTypeUrl + * @memberof google.protobuf.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.protobuf.Api"; + }; + return Api; })(); @@ -31592,29 +32968,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestTypeUrl = reader.string(); - break; - case 3: - message.requestStreaming = reader.bool(); - break; - case 4: - message.responseTypeUrl = reader.string(); - break; - case 5: - message.responseStreaming = reader.bool(); - break; - case 6: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); - break; - case 7: - message.syntax = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestTypeUrl = reader.string(); + break; + } + case 3: { + message.requestStreaming = reader.bool(); + break; + } + case 4: { + message.responseTypeUrl = reader.string(); + break; + } + case 5: { + message.responseStreaming = reader.bool(); + break; + } + case 6: { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + } + case 7: { + message.syntax = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -31784,6 +33167,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Method + * @function getTypeUrl + * @memberof google.protobuf.Method + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Method.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Method"; + }; + return Method; })(); @@ -31890,12 +33288,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.root = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.root = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31994,6 +33394,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Mixin + * @function getTypeUrl + * @memberof google.protobuf.Mixin + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Mixin.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Mixin"; + }; + return Mixin; })(); @@ -32089,9 +33504,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fileName = reader.string(); - break; + case 1: { + message.fileName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32181,6 +33597,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceContext + * @function getTypeUrl + * @memberof google.protobuf.SourceContext + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceContext"; + }; + return SourceContext; })(); @@ -32337,30 +33768,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.google.protobuf.Field.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.oneofs && message.oneofs.length)) - message.oneofs = []; - message.oneofs.push(reader.string()); - break; - case 4: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); - break; - case 5: - message.sourceContext = $root.google.protobuf.SourceContext.decode(reader, reader.uint32()); - break; - case 6: - message.syntax = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.protobuf.Field.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.oneofs && message.oneofs.length)) + message.oneofs = []; + message.oneofs.push(reader.string()); + break; + } + case 4: { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + } + case 5: { + message.sourceContext = $root.google.protobuf.SourceContext.decode(reader, reader.uint32()); + break; + } + case 6: { + message.syntax = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -32557,6 +33994,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Type + * @function getTypeUrl + * @memberof google.protobuf.Type + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Type.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Type"; + }; + return Type; })(); @@ -32753,38 +34205,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.int32(); - break; - case 2: - message.cardinality = reader.int32(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.name = reader.string(); - break; - case 6: - message.typeUrl = reader.string(); - break; - case 7: - message.oneofIndex = reader.int32(); - break; - case 8: - message.packed = reader.bool(); - break; - case 9: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); - break; - case 10: - message.jsonName = reader.string(); - break; - case 11: - message.defaultValue = reader.string(); - break; + case 1: { + message.kind = reader.int32(); + break; + } + case 2: { + message.cardinality = reader.int32(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 6: { + message.typeUrl = reader.string(); + break; + } + case 7: { + message.oneofIndex = reader.int32(); + break; + } + case 8: { + message.packed = reader.bool(); + break; + } + case 9: { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 11: { + message.defaultValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -33086,6 +34548,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Field + * @function getTypeUrl + * @memberof google.protobuf.Field + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Field"; + }; + /** * Kind enum. * @name google.protobuf.Field.Kind @@ -33295,25 +34772,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.enumvalue && message.enumvalue.length)) - message.enumvalue = []; - message.enumvalue.push($root.google.protobuf.EnumValue.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); - break; - case 4: - message.sourceContext = $root.google.protobuf.SourceContext.decode(reader, reader.uint32()); - break; - case 5: - message.syntax = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.enumvalue && message.enumvalue.length)) + message.enumvalue = []; + message.enumvalue.push($root.google.protobuf.EnumValue.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + } + case 4: { + message.sourceContext = $root.google.protobuf.SourceContext.decode(reader, reader.uint32()); + break; + } + case 5: { + message.syntax = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -33490,6 +34972,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Enum + * @function getTypeUrl + * @memberof google.protobuf.Enum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Enum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Enum"; + }; + return Enum; })(); @@ -33609,17 +35106,20 @@ 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: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.google.protobuf.Option.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -33744,6 +35244,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValue + * @function getTypeUrl + * @memberof google.protobuf.EnumValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValue"; + }; + return EnumValue; })(); @@ -33850,12 +35365,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.value = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -33959,6 +35476,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Option + * @function getTypeUrl + * @memberof google.protobuf.Option + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Option.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Option"; + }; + return Option; })(); @@ -34068,9 +35600,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.double(); - break; + case 1: { + message.value = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -34160,6 +35693,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + return DoubleValue; })(); @@ -34255,9 +35803,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.float(); - break; + case 1: { + message.value = reader.float(); + break; + } default: reader.skipType(tag & 7); break; @@ -34347,6 +35896,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; + return FloatValue; })(); @@ -34442,9 +36006,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.int64(); - break; + case 1: { + message.value = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -34548,6 +36113,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + return Int64Value; })(); @@ -34643,9 +36223,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.uint64(); - break; + case 1: { + message.value = reader.uint64(); + break; + } default: reader.skipType(tag & 7); break; @@ -34749,6 +36330,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; + return UInt64Value; })(); @@ -34844,9 +36440,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.int32(); - break; + case 1: { + message.value = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -34936,6 +36533,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + return Int32Value; })(); @@ -35031,9 +36643,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.uint32(); - break; + case 1: { + message.value = reader.uint32(); + break; + } default: reader.skipType(tag & 7); break; @@ -35123,6 +36736,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + return UInt32Value; })(); @@ -35218,9 +36846,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.bool(); - break; + case 1: { + message.value = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -35310,6 +36939,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; + return BoolValue; })(); @@ -35405,9 +37049,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.string(); - break; + case 1: { + message.value = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35497,6 +37142,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + return StringValue; })(); @@ -35592,9 +37252,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.bytes(); - break; + case 1: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -35651,7 +37312,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; }; @@ -35693,6 +37354,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + return BytesValue; })(); @@ -35853,6 +37529,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; })(); @@ -35901,7 +37592,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} @@ -35934,7 +37625,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} @@ -35967,7 +37658,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} @@ -36000,7 +37691,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} @@ -36033,7 +37724,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} @@ -36218,21 +37909,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; @@ -36383,6 +38079,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; })(); @@ -36478,9 +38189,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; @@ -36570,6 +38282,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; })(); @@ -36698,18 +38425,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; @@ -36824,6 +38555,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; })(); @@ -36932,14 +38678,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; @@ -37055,6 +38803,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; })(); @@ -37150,9 +38913,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; @@ -37242,6 +39006,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; })(); @@ -37337,9 +39116,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; @@ -37429,6 +39209,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; })(); @@ -37535,12 +39330,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; @@ -37644,6 +39441,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; })(); @@ -37750,12 +39562,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; @@ -37854,6 +39668,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; })(); @@ -37985,17 +39814,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; @@ -38120,6 +39952,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-api-servicemanagement/protos/protos.json b/packages/google-api-servicemanagement/protos/protos.json index 2fa0eec8fe8..8bf3022ea23 100644 --- a/packages/google-api-servicemanagement/protos/protos.json +++ b/packages/google-api-servicemanagement/protos/protos.json @@ -1324,146 +1324,6 @@ } } }, - "MetricDescriptor": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "type": { - "type": "string", - "id": 8 - }, - "labels": { - "rule": "repeated", - "type": "LabelDescriptor", - "id": 2 - }, - "metricKind": { - "type": "MetricKind", - "id": 3 - }, - "valueType": { - "type": "ValueType", - "id": 4 - }, - "unit": { - "type": "string", - "id": 5 - }, - "description": { - "type": "string", - "id": 6 - }, - "displayName": { - "type": "string", - "id": 7 - }, - "metadata": { - "type": "MetricDescriptorMetadata", - "id": 10 - }, - "launchStage": { - "type": "LaunchStage", - "id": 12 - }, - "monitoredResourceTypes": { - "rule": "repeated", - "type": "string", - "id": 13 - } - }, - "nested": { - "MetricDescriptorMetadata": { - "fields": { - "launchStage": { - "type": "LaunchStage", - "id": 1, - "options": { - "deprecated": true - } - }, - "samplePeriod": { - "type": "google.protobuf.Duration", - "id": 2 - }, - "ingestDelay": { - "type": "google.protobuf.Duration", - "id": 3 - } - } - }, - "MetricKind": { - "values": { - "METRIC_KIND_UNSPECIFIED": 0, - "GAUGE": 1, - "DELTA": 2, - "CUMULATIVE": 3 - } - }, - "ValueType": { - "values": { - "VALUE_TYPE_UNSPECIFIED": 0, - "BOOL": 1, - "INT64": 2, - "DOUBLE": 3, - "STRING": 4, - "DISTRIBUTION": 5, - "MONEY": 6 - } - } - } - }, - "Metric": { - "fields": { - "type": { - "type": "string", - "id": 3 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "LabelDescriptor": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "valueType": { - "type": "ValueType", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - } - }, - "nested": { - "ValueType": { - "values": { - "STRING": 0, - "BOOL": 1, - "INT64": 2 - } - } - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, "Context": { "fields": { "rules": { @@ -1617,6 +1477,31 @@ } } }, + "LabelDescriptor": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "valueType": { + "type": "ValueType", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + }, + "nested": { + "ValueType": { + "values": { + "STRING": 0, + "BOOL": 1, + "INT64": 2 + } + } + } + }, "Logging": { "fields": { "producerDestinations": { @@ -1646,6 +1531,121 @@ } } }, + "MetricDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "string", + "id": 8 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 2 + }, + "metricKind": { + "type": "MetricKind", + "id": 3 + }, + "valueType": { + "type": "ValueType", + "id": 4 + }, + "unit": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 7 + }, + "metadata": { + "type": "MetricDescriptorMetadata", + "id": 10 + }, + "launchStage": { + "type": "LaunchStage", + "id": 12 + }, + "monitoredResourceTypes": { + "rule": "repeated", + "type": "string", + "id": 13 + } + }, + "nested": { + "MetricDescriptorMetadata": { + "fields": { + "launchStage": { + "type": "LaunchStage", + "id": 1, + "options": { + "deprecated": true + } + }, + "samplePeriod": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "ingestDelay": { + "type": "google.protobuf.Duration", + "id": 3 + } + } + }, + "MetricKind": { + "values": { + "METRIC_KIND_UNSPECIFIED": 0, + "GAUGE": 1, + "DELTA": 2, + "CUMULATIVE": 3 + } + }, + "ValueType": { + "values": { + "VALUE_TYPE_UNSPECIFIED": 0, + "BOOL": 1, + "INT64": 2, + "DOUBLE": 3, + "STRING": 4, + "DISTRIBUTION": 5, + "MONEY": 6 + } + } + } + }, + "Metric": { + "fields": { + "type": { + "type": "string", + "id": 3 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, "MonitoredResourceDescriptor": { "fields": { "name": { @@ -1802,83 +1802,6 @@ } } }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, "SourceInfo": { "fields": { "sourceFiles": { @@ -2045,6 +1968,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -2573,6 +2500,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -2865,6 +2799,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 81de505ce95e0de7e9e1bb5cf6b4d2c59ab3f53e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Aug 2022 12:21:34 -0700 Subject: [PATCH 74/85] chore(main): release 1.1.1 (#163) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 1.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-api-servicemanagement/CHANGELOG.md | 9 +++++++++ packages/google-api-servicemanagement/package.json | 2 +- ...snippet_metadata.google.api.servicemanagement.v1.json | 2 +- .../google-api-servicemanagement/samples/package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index 4be7190a817..c76c420e4de 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.1.1](https://github.com/googleapis/nodejs-service-management/compare/v1.1.0...v1.1.1) (2022-08-23) + + +### Bug Fixes + +* better support for fallback mode ([#161](https://github.com/googleapis/nodejs-service-management/issues/161)) ([a84e12c](https://github.com/googleapis/nodejs-service-management/commit/a84e12c4dd4edc5b8486f7b1d47ce109b1927099)) +* change import long to require ([#162](https://github.com/googleapis/nodejs-service-management/issues/162)) ([309942f](https://github.com/googleapis/nodejs-service-management/commit/309942f977356bcaaf77a1ee439e5d4389f011ec)) +* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-service-management/issues/1546)) ([#164](https://github.com/googleapis/nodejs-service-management/issues/164)) ([41397e6](https://github.com/googleapis/nodejs-service-management/commit/41397e628dcbc33e54d1f052343df51d8ae8a771)) + ## [1.1.0](https://github.com/googleapis/nodejs-service-management/compare/v1.0.0...v1.1.0) (2022-06-30) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index d949b89df8a..6adfea56d5c 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "1.1.0", + "version": "1.1.1", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json index d8d41de82ff..1ee4e31523b 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicemanagement", - "version": "1.1.0", + "version": "1.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 2759c0ff529..b86bd9ec3dc 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^1.1.0" + "@google-cloud/service-management": "^1.1.1" }, "devDependencies": { "c8": "^7.1.0", From 25a355d6f1335ea21f36a0abcb9f72876c12fe32 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 04:58:12 +0000 Subject: [PATCH 75/85] fix: do not import the whole google-gax from proto JS (#1553) (#165) 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-api-servicemanagement/package.json | 2 +- packages/google-api-servicemanagement/protos/protos.d.ts | 2 +- packages/google-api-servicemanagement/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 6adfea56d5c..2f25694f0a3 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-api-servicemanagement/protos/protos.d.ts b/packages/google-api-servicemanagement/protos/protos.d.ts index 4cd17fcad0e..153217b3410 100644 --- a/packages/google-api-servicemanagement/protos/protos.d.ts +++ b/packages/google-api-servicemanagement/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-api-servicemanagement/protos/protos.js b/packages/google-api-servicemanagement/protos/protos.js index 870b5d6f42c..b7d3ca32e97 100644 --- a/packages/google-api-servicemanagement/protos/protos.js +++ b/packages/google-api-servicemanagement/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 3dcd7d58ac0c94b489d2d3c049aa7e8ce614bb2b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 20:52:21 +0000 Subject: [PATCH 76/85] fix: allow passing gax instance to client constructor (#166) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 --- .../src/v1/service_manager_client.ts | 100 +++++++++++------- 1 file changed, 59 insertions(+), 41 deletions(-) diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index eab60b33ad8..e7355b15a52 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -28,7 +28,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -38,7 +37,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './service_manager_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -99,8 +97,18 @@ export class ServiceManagerClient { * 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 ServiceManagerClient({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 ServiceManagerClient; const servicePath = @@ -120,8 +128,13 @@ export class ServiceManagerClient { 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); @@ -308,7 +321,7 @@ export class ServiceManagerClient { 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; } /** @@ -535,7 +548,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); this.initialize(); @@ -642,7 +655,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', config_id: request.configId || '', }); @@ -751,7 +764,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); this.initialize(); @@ -853,7 +866,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', rollout_id: request.rolloutId || '', }); @@ -1103,11 +1116,12 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.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.createService, this._gaxModule.createDefaultBackoffSettings() @@ -1223,7 +1237,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); this.initialize(); @@ -1249,11 +1263,12 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.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.deleteService, this._gaxModule.createDefaultBackoffSettings() @@ -1367,7 +1382,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); this.initialize(); @@ -1393,11 +1408,12 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.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.undeleteService, this._gaxModule.createDefaultBackoffSettings() @@ -1525,7 +1541,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); this.initialize(); @@ -1551,11 +1567,12 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.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.submitConfigSource, this._gaxModule.createDefaultBackoffSettings() @@ -1679,7 +1696,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); this.initialize(); @@ -1705,11 +1722,12 @@ export class ServiceManagerClient { protos.google.api.servicemanagement.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.createServiceRollout, this._gaxModule.createDefaultBackoffSettings() @@ -2020,7 +2038,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); this.initialize(); @@ -2061,7 +2079,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); const defaultCallSettings = this._defaults['listServiceConfigs']; @@ -2111,7 +2129,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); const defaultCallSettings = this._defaults['listServiceConfigs']; @@ -2228,7 +2246,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); this.initialize(); @@ -2278,7 +2296,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); const defaultCallSettings = this._defaults['listServiceRollouts']; @@ -2337,7 +2355,7 @@ export class ServiceManagerClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName || '', }); const defaultCallSettings = this._defaults['listServiceRollouts']; From c9f65b17053062a2a98c6b381d4bf496bbb1484f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 18:06:07 -0400 Subject: [PATCH 77/85] chore(main): release 1.1.2 (#167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 1.1.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-api-servicemanagement/CHANGELOG.md | 8 ++++++++ packages/google-api-servicemanagement/package.json | 2 +- .../snippet_metadata.google.api.servicemanagement.v1.json | 2 +- .../google-api-servicemanagement/samples/package.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index c76c420e4de..b9821f0185a 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.1.2](https://github.com/googleapis/nodejs-service-management/compare/v1.1.1...v1.1.2) (2022-09-01) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#166](https://github.com/googleapis/nodejs-service-management/issues/166)) ([deda310](https://github.com/googleapis/nodejs-service-management/commit/deda3102c60ed95a03de5f4ae123c858d9af1cf4)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-service-management/issues/1553)) ([#165](https://github.com/googleapis/nodejs-service-management/issues/165)) ([aa21cf2](https://github.com/googleapis/nodejs-service-management/commit/aa21cf2c463c6410be8f9dc8906493dc78f131c1)) + ## [1.1.1](https://github.com/googleapis/nodejs-service-management/compare/v1.1.0...v1.1.1) (2022-08-23) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 2f25694f0a3..63d76c65097 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "1.1.1", + "version": "1.1.2", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json index 1ee4e31523b..f51879aa1df 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicemanagement", - "version": "1.1.1", + "version": "1.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index b86bd9ec3dc..687302423cd 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^1.1.1" + "@google-cloud/service-management": "^1.1.2" }, "devDependencies": { "c8": "^7.1.0", From 26e71a90737738a070581945517fdb4054f3edfe Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:32:15 +0000 Subject: [PATCH 78/85] fix: preserve default values in x-goog-request-params header (#169) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../src/v1/service_manager_client.ts | 32 +- .../test/gapic_service_manager_v1.ts | 1197 ++++++++--------- 2 files changed, 609 insertions(+), 620 deletions(-) diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index e7355b15a52..b9022e2c0d8 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -549,7 +549,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); this.initialize(); return this.innerApiCalls.getService(request, options, callback); @@ -656,8 +656,8 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', - config_id: request.configId || '', + service_name: request.serviceName ?? '', + config_id: request.configId ?? '', }); this.initialize(); return this.innerApiCalls.getServiceConfig(request, options, callback); @@ -765,7 +765,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); this.initialize(); return this.innerApiCalls.createServiceConfig(request, options, callback); @@ -867,8 +867,8 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', - rollout_id: request.rolloutId || '', + service_name: request.serviceName ?? '', + rollout_id: request.rolloutId ?? '', }); this.initialize(); return this.innerApiCalls.getServiceRollout(request, options, callback); @@ -1238,7 +1238,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); this.initialize(); return this.innerApiCalls.deleteService(request, options, callback); @@ -1383,7 +1383,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); this.initialize(); return this.innerApiCalls.undeleteService(request, options, callback); @@ -1542,7 +1542,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); this.initialize(); return this.innerApiCalls.submitConfigSource(request, options, callback); @@ -1697,7 +1697,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); this.initialize(); return this.innerApiCalls.createServiceRollout(request, options, callback); @@ -2039,7 +2039,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); this.initialize(); return this.innerApiCalls.listServiceConfigs(request, options, callback); @@ -2080,7 +2080,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); const defaultCallSettings = this._defaults['listServiceConfigs']; const callSettings = defaultCallSettings.merge(options); @@ -2130,7 +2130,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); const defaultCallSettings = this._defaults['listServiceConfigs']; const callSettings = defaultCallSettings.merge(options); @@ -2247,7 +2247,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); this.initialize(); return this.innerApiCalls.listServiceRollouts(request, options, callback); @@ -2297,7 +2297,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); const defaultCallSettings = this._defaults['listServiceRollouts']; const callSettings = defaultCallSettings.merge(options); @@ -2356,7 +2356,7 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - service_name: request.serviceName || '', + service_name: request.serviceName ?? '', }); const defaultCallSettings = this._defaults['listServiceRollouts']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index de810908106..06d725ca511 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -254,26 +269,25 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.ManagedService() ); client.innerApiCalls.getService = stubSimpleCall(expectedResponse); const [response] = await client.getService(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getService without error using callback', async () => { @@ -285,15 +299,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.ManagedService() ); @@ -316,11 +326,14 @@ describe('v1.ServiceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getService with error', async () => { @@ -332,26 +345,25 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getService = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getService(request), expectedError); - assert( - (client.innerApiCalls.getService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getService with closed client', async () => { @@ -363,7 +375,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); - request.serviceName = ''; + const defaultValue1 = getTypeDefaultValue('GetServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getService(request), expectedError); @@ -380,27 +395,29 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); - request.serviceName = ''; - request.configId = ''; - const expectedHeaderRequestParams = 'service_name=&config_id='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetServiceConfigRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetServiceConfigRequest', [ + 'configId', + ]); + request.configId = defaultValue2; + const expectedHeaderRequestParams = `service_name=${defaultValue1}&config_id=${defaultValue2}`; const expectedResponse = generateSampleMessage( new protos.google.api.Service() ); client.innerApiCalls.getServiceConfig = stubSimpleCall(expectedResponse); const [response] = await client.getServiceConfig(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getServiceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getServiceConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getServiceConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getServiceConfig without error using callback', async () => { @@ -412,16 +429,15 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); - request.serviceName = ''; - request.configId = ''; - const expectedHeaderRequestParams = 'service_name=&config_id='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetServiceConfigRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetServiceConfigRequest', [ + 'configId', + ]); + request.configId = defaultValue2; + const expectedHeaderRequestParams = `service_name=${defaultValue1}&config_id=${defaultValue2}`; const expectedResponse = generateSampleMessage( new protos.google.api.Service() ); @@ -441,11 +457,14 @@ describe('v1.ServiceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getServiceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getServiceConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getServiceConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getServiceConfig with error', async () => { @@ -457,27 +476,29 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); - request.serviceName = ''; - request.configId = ''; - const expectedHeaderRequestParams = 'service_name=&config_id='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetServiceConfigRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetServiceConfigRequest', [ + 'configId', + ]); + request.configId = defaultValue2; + const expectedHeaderRequestParams = `service_name=${defaultValue1}&config_id=${defaultValue2}`; const expectedError = new Error('expected'); client.innerApiCalls.getServiceConfig = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getServiceConfig(request), expectedError); - assert( - (client.innerApiCalls.getServiceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getServiceConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getServiceConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getServiceConfig with closed client', async () => { @@ -489,8 +510,14 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); - request.serviceName = ''; - request.configId = ''; + const defaultValue1 = getTypeDefaultValue('GetServiceConfigRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetServiceConfigRequest', [ + 'configId', + ]); + request.configId = defaultValue2; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getServiceConfig(request), expectedError); @@ -507,15 +534,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateServiceConfigRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.api.Service() ); @@ -523,11 +546,14 @@ describe('v1.ServiceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.createServiceConfig(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createServiceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createServiceConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createServiceConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createServiceConfig without error using callback', async () => { @@ -539,15 +565,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateServiceConfigRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.api.Service() ); @@ -567,11 +589,14 @@ describe('v1.ServiceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createServiceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createServiceConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createServiceConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createServiceConfig with error', async () => { @@ -583,26 +608,25 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateServiceConfigRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createServiceConfig = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createServiceConfig(request), expectedError); - assert( - (client.innerApiCalls.createServiceConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createServiceConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createServiceConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createServiceConfig with closed client', async () => { @@ -614,7 +638,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); - request.serviceName = ''; + const defaultValue1 = getTypeDefaultValue('CreateServiceConfigRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createServiceConfig(request), expectedError); @@ -631,27 +658,29 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); - request.serviceName = ''; - request.rolloutId = ''; - const expectedHeaderRequestParams = 'service_name=&rollout_id='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetServiceRolloutRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetServiceRolloutRequest', [ + 'rolloutId', + ]); + request.rolloutId = defaultValue2; + const expectedHeaderRequestParams = `service_name=${defaultValue1}&rollout_id=${defaultValue2}`; const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.Rollout() ); client.innerApiCalls.getServiceRollout = stubSimpleCall(expectedResponse); const [response] = await client.getServiceRollout(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getServiceRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getServiceRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getServiceRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getServiceRollout without error using callback', async () => { @@ -663,16 +692,15 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); - request.serviceName = ''; - request.rolloutId = ''; - const expectedHeaderRequestParams = 'service_name=&rollout_id='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetServiceRolloutRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetServiceRolloutRequest', [ + 'rolloutId', + ]); + request.rolloutId = defaultValue2; + const expectedHeaderRequestParams = `service_name=${defaultValue1}&rollout_id=${defaultValue2}`; const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.Rollout() ); @@ -695,11 +723,14 @@ describe('v1.ServiceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getServiceRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getServiceRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getServiceRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getServiceRollout with error', async () => { @@ -711,27 +742,29 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); - request.serviceName = ''; - request.rolloutId = ''; - const expectedHeaderRequestParams = 'service_name=&rollout_id='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetServiceRolloutRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetServiceRolloutRequest', [ + 'rolloutId', + ]); + request.rolloutId = defaultValue2; + const expectedHeaderRequestParams = `service_name=${defaultValue1}&rollout_id=${defaultValue2}`; const expectedError = new Error('expected'); client.innerApiCalls.getServiceRollout = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getServiceRollout(request), expectedError); - assert( - (client.innerApiCalls.getServiceRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getServiceRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getServiceRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getServiceRollout with closed client', async () => { @@ -743,8 +776,14 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); - request.serviceName = ''; - request.rolloutId = ''; + const defaultValue1 = getTypeDefaultValue('GetServiceRolloutRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetServiceRolloutRequest', [ + 'rolloutId', + ]); + request.rolloutId = defaultValue2; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getServiceRollout(request), expectedError); @@ -761,7 +800,6 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportResponse() ); @@ -769,11 +807,6 @@ describe('v1.ServiceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.generateConfigReport(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.generateConfigReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes generateConfigReport without error using callback', async () => { @@ -785,7 +818,6 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportResponse() ); @@ -808,11 +840,6 @@ describe('v1.ServiceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.generateConfigReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes generateConfigReport with error', async () => { @@ -824,18 +851,12 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.generateConfigReport = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.generateConfigReport(request), expectedError); - assert( - (client.innerApiCalls.generateConfigReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes generateConfigReport with closed client', async () => { @@ -863,7 +884,6 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -872,11 +892,6 @@ describe('v1.ServiceManagerClient', () => { const [operation] = await client.createService(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes createService without error using callback', async () => { @@ -888,7 +903,6 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -918,11 +932,6 @@ describe('v1.ServiceManagerClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes createService with call error', async () => { @@ -934,18 +943,12 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.createService = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createService(request), expectedError); - assert( - (client.innerApiCalls.createService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes createService with LRO error', async () => { @@ -957,7 +960,6 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.createService = stubLongRunningCall( undefined, @@ -966,11 +968,6 @@ describe('v1.ServiceManagerClient', () => { ); const [operation] = await client.createService(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes checkCreateServiceProgress without error', async () => { @@ -1025,15 +1022,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1042,11 +1035,14 @@ describe('v1.ServiceManagerClient', () => { const [operation] = await client.deleteService(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteService without error using callback', async () => { @@ -1058,15 +1054,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1096,11 +1088,14 @@ describe('v1.ServiceManagerClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteService with call error', async () => { @@ -1112,26 +1107,25 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteService = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteService(request), expectedError); - assert( - (client.innerApiCalls.deleteService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteService with LRO error', async () => { @@ -1143,15 +1137,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteService = stubLongRunningCall( undefined, @@ -1160,11 +1150,14 @@ describe('v1.ServiceManagerClient', () => { ); const [operation] = await client.deleteService(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteServiceProgress without error', async () => { @@ -1219,15 +1212,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UndeleteServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1236,11 +1225,14 @@ describe('v1.ServiceManagerClient', () => { const [operation] = await client.undeleteService(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.undeleteService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.undeleteService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes undeleteService without error using callback', async () => { @@ -1252,15 +1244,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UndeleteServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1290,11 +1278,14 @@ describe('v1.ServiceManagerClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.undeleteService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.undeleteService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes undeleteService with call error', async () => { @@ -1306,26 +1297,25 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UndeleteServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.undeleteService = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.undeleteService(request), expectedError); - assert( - (client.innerApiCalls.undeleteService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.undeleteService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes undeleteService with LRO error', async () => { @@ -1337,15 +1327,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UndeleteServiceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.undeleteService = stubLongRunningCall( undefined, @@ -1354,11 +1340,14 @@ describe('v1.ServiceManagerClient', () => { ); const [operation] = await client.undeleteService(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.undeleteService as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.undeleteService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUndeleteServiceProgress without error', async () => { @@ -1413,15 +1402,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('SubmitConfigSourceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1430,11 +1415,14 @@ describe('v1.ServiceManagerClient', () => { const [operation] = await client.submitConfigSource(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.submitConfigSource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.submitConfigSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitConfigSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes submitConfigSource without error using callback', async () => { @@ -1446,15 +1434,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('SubmitConfigSourceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1484,11 +1468,14 @@ describe('v1.ServiceManagerClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.submitConfigSource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.submitConfigSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitConfigSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes submitConfigSource with call error', async () => { @@ -1500,26 +1487,25 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('SubmitConfigSourceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.submitConfigSource = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.submitConfigSource(request), expectedError); - assert( - (client.innerApiCalls.submitConfigSource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.submitConfigSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitConfigSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes submitConfigSource with LRO error', async () => { @@ -1531,15 +1517,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('SubmitConfigSourceRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.submitConfigSource = stubLongRunningCall( undefined, @@ -1548,11 +1530,14 @@ describe('v1.ServiceManagerClient', () => { ); const [operation] = await client.submitConfigSource(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.submitConfigSource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.submitConfigSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitConfigSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkSubmitConfigSourceProgress without error', async () => { @@ -1607,15 +1592,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateServiceRolloutRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1624,11 +1605,14 @@ describe('v1.ServiceManagerClient', () => { const [operation] = await client.createServiceRollout(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createServiceRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createServiceRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createServiceRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createServiceRollout without error using callback', async () => { @@ -1640,15 +1624,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateServiceRolloutRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1678,11 +1658,14 @@ describe('v1.ServiceManagerClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createServiceRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createServiceRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createServiceRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createServiceRollout with call error', async () => { @@ -1694,26 +1677,25 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateServiceRolloutRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createServiceRollout = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createServiceRollout(request), expectedError); - assert( - (client.innerApiCalls.createServiceRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createServiceRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createServiceRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createServiceRollout with LRO error', async () => { @@ -1725,15 +1707,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateServiceRolloutRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createServiceRollout = stubLongRunningCall( undefined, @@ -1742,11 +1720,14 @@ describe('v1.ServiceManagerClient', () => { ); const [operation] = await client.createServiceRollout(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createServiceRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createServiceRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createServiceRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateServiceRolloutProgress without error', async () => { @@ -1801,7 +1782,6 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage( new protos.google.api.servicemanagement.v1.ManagedService() @@ -1816,11 +1796,6 @@ describe('v1.ServiceManagerClient', () => { client.innerApiCalls.listServices = stubSimpleCall(expectedResponse); const [response] = await client.listServices(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listServices as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes listServices without error using callback', async () => { @@ -1832,7 +1807,6 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = [ generateSampleMessage( new protos.google.api.servicemanagement.v1.ManagedService() @@ -1865,11 +1839,6 @@ describe('v1.ServiceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listServices as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes listServices with error', async () => { @@ -1881,18 +1850,12 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.listServices = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listServices(request), expectedError); - assert( - (client.innerApiCalls.listServices as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes listServicesStream without error', async () => { @@ -2058,15 +2021,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.api.Service()), generateSampleMessage(new protos.google.api.Service()), @@ -2076,11 +2035,14 @@ describe('v1.ServiceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listServiceConfigs(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listServiceConfigs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listServiceConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listServiceConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listServiceConfigs without error using callback', async () => { @@ -2092,15 +2054,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.api.Service()), generateSampleMessage(new protos.google.api.Service()), @@ -2125,11 +2083,14 @@ describe('v1.ServiceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listServiceConfigs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listServiceConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listServiceConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listServiceConfigs with error', async () => { @@ -2141,26 +2102,25 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listServiceConfigs = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listServiceConfigs(request), expectedError); - assert( - (client.innerApiCalls.listServiceConfigs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listServiceConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listServiceConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listServiceConfigsStream without error', async () => { @@ -2172,8 +2132,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.api.Service()), generateSampleMessage(new protos.google.api.Service()), @@ -2201,11 +2164,12 @@ describe('v1.ServiceManagerClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listServiceConfigs, request) ); - assert.strictEqual( - ( - client.descriptors.page.listServiceConfigs.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listServiceConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2218,8 +2182,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listServiceConfigs.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2242,11 +2209,12 @@ describe('v1.ServiceManagerClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listServiceConfigs, request) ); - assert.strictEqual( - ( - client.descriptors.page.listServiceConfigs.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listServiceConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2259,8 +2227,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.api.Service()), generateSampleMessage(new protos.google.api.Service()), @@ -2280,11 +2251,12 @@ describe('v1.ServiceManagerClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listServiceConfigs.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listServiceConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2297,8 +2269,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listServiceConfigs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2315,11 +2290,12 @@ describe('v1.ServiceManagerClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listServiceConfigs.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listServiceConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -2334,15 +2310,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.api.servicemanagement.v1.Rollout() @@ -2358,11 +2330,14 @@ describe('v1.ServiceManagerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listServiceRollouts(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listServiceRollouts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listServiceRollouts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listServiceRollouts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listServiceRollouts without error using callback', async () => { @@ -2374,15 +2349,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.api.servicemanagement.v1.Rollout() @@ -2413,11 +2384,14 @@ describe('v1.ServiceManagerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listServiceRollouts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listServiceRollouts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listServiceRollouts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listServiceRollouts with error', async () => { @@ -2429,26 +2403,25 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listServiceRollouts = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listServiceRollouts(request), expectedError); - assert( - (client.innerApiCalls.listServiceRollouts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listServiceRollouts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listServiceRollouts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listServiceRolloutsStream without error', async () => { @@ -2460,8 +2433,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.api.servicemanagement.v1.Rollout() @@ -2498,11 +2474,12 @@ describe('v1.ServiceManagerClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listServiceRollouts, request) ); - assert.strictEqual( - ( - client.descriptors.page.listServiceRollouts.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listServiceRollouts.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2515,8 +2492,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listServiceRollouts.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2542,11 +2522,12 @@ describe('v1.ServiceManagerClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listServiceRollouts, request) ); - assert.strictEqual( - ( - client.descriptors.page.listServiceRollouts.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listServiceRollouts.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2559,8 +2540,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.api.servicemanagement.v1.Rollout() @@ -2586,11 +2570,12 @@ describe('v1.ServiceManagerClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listServiceRollouts.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listServiceRollouts.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2603,8 +2588,11 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - request.serviceName = ''; - const expectedHeaderRequestParams = 'service_name='; + const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ + 'serviceName', + ]); + request.serviceName = defaultValue1; + const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listServiceRollouts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2621,11 +2609,12 @@ describe('v1.ServiceManagerClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listServiceRollouts.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listServiceRollouts.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From fbdf963f451e43b78541508e5540d70199755b54 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:25:41 -0700 Subject: [PATCH 79/85] test: use fully qualified request type name in tests (#172) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 Co-authored-by: Owl Bot --- .../test/gapic_service_manager_v1.ts | 378 ++++++++++-------- 1 file changed, 216 insertions(+), 162 deletions(-) diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index 06d725ca511..f189fd5b553 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -269,9 +269,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -299,9 +300,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -345,9 +347,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -375,9 +378,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -395,13 +399,15 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceConfigRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceConfigRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetServiceConfigRequest', [ - 'configId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceConfigRequest', + ['configId'] + ); request.configId = defaultValue2; const expectedHeaderRequestParams = `service_name=${defaultValue1}&config_id=${defaultValue2}`; const expectedResponse = generateSampleMessage( @@ -429,13 +435,15 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceConfigRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceConfigRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetServiceConfigRequest', [ - 'configId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceConfigRequest', + ['configId'] + ); request.configId = defaultValue2; const expectedHeaderRequestParams = `service_name=${defaultValue1}&config_id=${defaultValue2}`; const expectedResponse = generateSampleMessage( @@ -476,13 +484,15 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceConfigRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceConfigRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetServiceConfigRequest', [ - 'configId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceConfigRequest', + ['configId'] + ); request.configId = defaultValue2; const expectedHeaderRequestParams = `service_name=${defaultValue1}&config_id=${defaultValue2}`; const expectedError = new Error('expected'); @@ -510,13 +520,15 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceConfigRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceConfigRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetServiceConfigRequest', [ - 'configId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceConfigRequest', + ['configId'] + ); request.configId = defaultValue2; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -534,9 +546,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateServiceConfigRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.CreateServiceConfigRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -565,9 +578,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateServiceConfigRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.CreateServiceConfigRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -608,9 +622,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateServiceConfigRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.CreateServiceConfigRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -638,9 +653,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateServiceConfigRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.CreateServiceConfigRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -658,13 +674,15 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceRolloutRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRolloutRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetServiceRolloutRequest', [ - 'rolloutId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRolloutRequest', + ['rolloutId'] + ); request.rolloutId = defaultValue2; const expectedHeaderRequestParams = `service_name=${defaultValue1}&rollout_id=${defaultValue2}`; const expectedResponse = generateSampleMessage( @@ -692,13 +710,15 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceRolloutRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRolloutRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetServiceRolloutRequest', [ - 'rolloutId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRolloutRequest', + ['rolloutId'] + ); request.rolloutId = defaultValue2; const expectedHeaderRequestParams = `service_name=${defaultValue1}&rollout_id=${defaultValue2}`; const expectedResponse = generateSampleMessage( @@ -742,13 +762,15 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceRolloutRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRolloutRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetServiceRolloutRequest', [ - 'rolloutId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRolloutRequest', + ['rolloutId'] + ); request.rolloutId = defaultValue2; const expectedHeaderRequestParams = `service_name=${defaultValue1}&rollout_id=${defaultValue2}`; const expectedError = new Error('expected'); @@ -776,13 +798,15 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('GetServiceRolloutRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRolloutRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetServiceRolloutRequest', [ - 'rolloutId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.GetServiceRolloutRequest', + ['rolloutId'] + ); request.rolloutId = defaultValue2; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1022,9 +1046,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.DeleteServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1054,9 +1079,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.DeleteServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1107,9 +1133,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.DeleteServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1137,9 +1164,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.DeleteServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1212,9 +1240,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('UndeleteServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.UndeleteServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1244,9 +1273,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('UndeleteServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.UndeleteServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1297,9 +1327,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('UndeleteServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.UndeleteServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1327,9 +1358,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); - const defaultValue1 = getTypeDefaultValue('UndeleteServiceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.UndeleteServiceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1402,9 +1434,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); - const defaultValue1 = getTypeDefaultValue('SubmitConfigSourceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.SubmitConfigSourceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1434,9 +1467,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); - const defaultValue1 = getTypeDefaultValue('SubmitConfigSourceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.SubmitConfigSourceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1487,9 +1521,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); - const defaultValue1 = getTypeDefaultValue('SubmitConfigSourceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.SubmitConfigSourceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1517,9 +1552,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); - const defaultValue1 = getTypeDefaultValue('SubmitConfigSourceRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.SubmitConfigSourceRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1592,9 +1628,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateServiceRolloutRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.CreateServiceRolloutRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1624,9 +1661,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateServiceRolloutRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.CreateServiceRolloutRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1677,9 +1715,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateServiceRolloutRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.CreateServiceRolloutRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1707,9 +1746,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateServiceRolloutRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.CreateServiceRolloutRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2021,9 +2061,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceConfigsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ @@ -2054,9 +2095,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceConfigsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ @@ -2102,9 +2144,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceConfigsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2132,9 +2175,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceConfigsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ @@ -2182,9 +2226,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceConfigsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2227,9 +2272,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceConfigsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ @@ -2269,9 +2315,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceConfigsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceConfigsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2310,9 +2357,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceRolloutsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ @@ -2349,9 +2397,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceRolloutsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ @@ -2403,9 +2452,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceRolloutsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2433,9 +2483,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceRolloutsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ @@ -2492,9 +2543,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceRolloutsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2540,9 +2592,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceRolloutsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedResponse = [ @@ -2588,9 +2641,10 @@ describe('v1.ServiceManagerClient', () => { const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListServiceRolloutsRequest', [ - 'serviceName', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.api.servicemanagement.v1.ListServiceRolloutsRequest', + ['serviceName'] + ); request.serviceName = defaultValue1; const expectedHeaderRequestParams = `service_name=${defaultValue1}`; const expectedError = new Error('expected'); From 1068664aad8493359320df8117fc2e1a78728ba1 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:20:20 +0100 Subject: [PATCH 80/85] chore(deps): update dependency @types/node to v18 (#174) 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-service-management). --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 63d76c65097..cb2f6197bc7 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/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.6.0", "gts": "^3.1.0", From 340a7cd4d3e6bbcebd2ac9867e67b805e0b7adfe Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:38:14 +0100 Subject: [PATCH 81/85] chore(deps): update dependency jsdoc to v4 (#177) 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-service-management). --- packages/google-api-servicemanagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index cb2f6197bc7..13b1e967ebb 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -47,7 +47,7 @@ "@types/sinon": "^10.0.0", "c8": "^7.6.0", "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 92db9370d8b778ec8166f8c5a62091559168aae2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 10:36:18 +0000 Subject: [PATCH 82/85] fix: regenerated protos JS and TS definitions (#178) samples: pull in latest typeless bot, clean up some comments Source-Link: https://togithub.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e --- .../protos/protos.d.ts | 2 +- .../protos/protos.js | 222 +++++++++++++++--- 2 files changed, 195 insertions(+), 29 deletions(-) diff --git a/packages/google-api-servicemanagement/protos/protos.d.ts b/packages/google-api-servicemanagement/protos/protos.d.ts index 153217b3410..4eb92441444 100644 --- a/packages/google-api-servicemanagement/protos/protos.d.ts +++ b/packages/google-api-servicemanagement/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-api-servicemanagement/protos/protos.js b/packages/google-api-servicemanagement/protos/protos.js index b7d3ca32e97..dedc7ddd352 100644 --- a/packages/google-api-servicemanagement/protos/protos.js +++ b/packages/google-api-servicemanagement/protos/protos.js @@ -786,6 +786,12 @@ if (object.description != null) message.description = String(object.description); switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; case "STATUS_UNSPECIFIED": case 0: message.status = 0; @@ -834,7 +840,7 @@ if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.api.servicemanagement.v1.OperationMetadata.Status[message.status] : message.status; + object.status = options.enums === String ? $root.google.api.servicemanagement.v1.OperationMetadata.Status[message.status] === undefined ? message.status : $root.google.api.servicemanagement.v1.OperationMetadata.Status[message.status] : message.status; return object; }; @@ -1085,6 +1091,12 @@ if (object.location != null) message.location = String(object.location); switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; case "WARNING": case 0: message.kind = 0; @@ -1120,7 +1132,7 @@ if (message.location != null && message.hasOwnProperty("location")) object.location = message.location; if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.google.api.servicemanagement.v1.Diagnostic.Kind[message.kind] : message.kind; + object.kind = options.enums === String ? $root.google.api.servicemanagement.v1.Diagnostic.Kind[message.kind] === undefined ? message.kind : $root.google.api.servicemanagement.v1.Diagnostic.Kind[message.kind] : message.kind; if (message.message != null && message.hasOwnProperty("message")) object.message = message.message; return object; @@ -1619,6 +1631,12 @@ else if (object.fileContents.length >= 0) message.fileContents = object.fileContents; switch (object.fileType) { + default: + if (typeof object.fileType === "number") { + message.fileType = object.fileType; + break; + } + break; case "FILE_TYPE_UNSPECIFIED": case 0: message.fileType = 0; @@ -1676,7 +1694,7 @@ if (message.fileContents != null && message.hasOwnProperty("fileContents")) object.fileContents = options.bytes === String ? $util.base64.encode(message.fileContents, 0, message.fileContents.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileContents) : message.fileContents; if (message.fileType != null && message.hasOwnProperty("fileType")) - object.fileType = options.enums === String ? $root.google.api.servicemanagement.v1.ConfigFile.FileType[message.fileType] : message.fileType; + object.fileType = options.enums === String ? $root.google.api.servicemanagement.v1.ConfigFile.FileType[message.fileType] === undefined ? message.fileType : $root.google.api.servicemanagement.v1.ConfigFile.FileType[message.fileType] : message.fileType; return object; }; @@ -2464,6 +2482,12 @@ if (object.createdBy != null) message.createdBy = String(object.createdBy); switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; case "ROLLOUT_STATUS_UNSPECIFIED": case 0: message.status = 0; @@ -2535,7 +2559,7 @@ if (message.createdBy != null && message.hasOwnProperty("createdBy")) object.createdBy = message.createdBy; if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.api.servicemanagement.v1.Rollout.RolloutStatus[message.status] : message.status; + object.status = options.enums === String ? $root.google.api.servicemanagement.v1.Rollout.RolloutStatus[message.status] === undefined ? message.status : $root.google.api.servicemanagement.v1.Rollout.RolloutStatus[message.status] : message.status; if (message.trafficPercentStrategy != null && message.hasOwnProperty("trafficPercentStrategy")) { object.trafficPercentStrategy = $root.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.toObject(message.trafficPercentStrategy, options); if (options.oneofs) @@ -5222,6 +5246,12 @@ if (object.configId != null) message.configId = String(object.configId); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "BASIC": case 0: message.view = 0; @@ -5257,7 +5287,7 @@ if (message.configId != null && message.hasOwnProperty("configId")) object.configId = message.configId; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView[message.view] : message.view; + object.view = options.enums === String ? $root.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView[message.view] === undefined ? message.view : $root.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView[message.view] : message.view; return object; }; @@ -8282,6 +8312,12 @@ if (object.newValue != null) message.newValue = String(object.newValue); switch (object.changeType) { + default: + if (typeof object.changeType === "number") { + message.changeType = object.changeType; + break; + } + break; case "CHANGE_TYPE_UNSPECIFIED": case 0: message.changeType = 0; @@ -8340,7 +8376,7 @@ if (message.newValue != null && message.hasOwnProperty("newValue")) object.newValue = message.newValue; if (message.changeType != null && message.hasOwnProperty("changeType")) - object.changeType = options.enums === String ? $root.google.api.ChangeType[message.changeType] : message.changeType; + object.changeType = options.enums === String ? $root.google.api.ChangeType[message.changeType] === undefined ? message.changeType : $root.google.api.ChangeType[message.changeType] : message.changeType; if (message.advices && message.advices.length) { object.advices = []; for (var j = 0; j < message.advices.length; ++j) @@ -12732,6 +12768,12 @@ if (object.operationDeadline != null) message.operationDeadline = Number(object.operationDeadline); switch (object.pathTranslation) { + default: + if (typeof object.pathTranslation === "number") { + message.pathTranslation = object.pathTranslation; + break; + } + break; case "PATH_TRANSLATION_UNSPECIFIED": case 0: message.pathTranslation = 0; @@ -12787,7 +12829,7 @@ if (message.operationDeadline != null && message.hasOwnProperty("operationDeadline")) object.operationDeadline = options.json && !isFinite(message.operationDeadline) ? String(message.operationDeadline) : message.operationDeadline; if (message.pathTranslation != null && message.hasOwnProperty("pathTranslation")) - object.pathTranslation = options.enums === String ? $root.google.api.BackendRule.PathTranslation[message.pathTranslation] : message.pathTranslation; + object.pathTranslation = options.enums === String ? $root.google.api.BackendRule.PathTranslation[message.pathTranslation] === undefined ? message.pathTranslation : $root.google.api.BackendRule.PathTranslation[message.pathTranslation] : message.pathTranslation; if (message.jwtAudience != null && message.hasOwnProperty("jwtAudience")) { object.jwtAudience = message.jwtAudience; if (options.oneofs) @@ -15767,6 +15809,12 @@ if (object.key != null) message.key = String(object.key); switch (object.valueType) { + default: + if (typeof object.valueType === "number") { + message.valueType = object.valueType; + break; + } + break; case "STRING": case 0: message.valueType = 0; @@ -15806,7 +15854,7 @@ if (message.key != null && message.hasOwnProperty("key")) object.key = message.key; if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] === undefined ? message.valueType : $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; return object; @@ -16761,6 +16809,12 @@ } } switch (object.metricKind) { + default: + if (typeof object.metricKind === "number") { + message.metricKind = object.metricKind; + break; + } + break; case "METRIC_KIND_UNSPECIFIED": case 0: message.metricKind = 0; @@ -16779,6 +16833,12 @@ break; } switch (object.valueType) { + default: + if (typeof object.valueType === "number") { + message.valueType = object.valueType; + break; + } + break; case "VALUE_TYPE_UNSPECIFIED": case 0: message.valueType = 0; @@ -16820,6 +16880,12 @@ message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); } switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; case "LAUNCH_STAGE_UNSPECIFIED": case 0: message.launchStage = 0; @@ -16899,9 +16965,9 @@ object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); } if (message.metricKind != null && message.hasOwnProperty("metricKind")) - object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] === undefined ? message.metricKind : $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; + object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] === undefined ? message.valueType : $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; if (message.unit != null && message.hasOwnProperty("unit")) object.unit = message.unit; if (message.description != null && message.hasOwnProperty("description")) @@ -16913,7 +16979,7 @@ if (message.metadata != null && message.hasOwnProperty("metadata")) object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.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.monitoredResourceTypes && message.monitoredResourceTypes.length) { object.monitoredResourceTypes = []; for (var j = 0; j < message.monitoredResourceTypes.length; ++j) @@ -17149,6 +17215,12 @@ return object; var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; case "LAUNCH_STAGE_UNSPECIFIED": case 0: message.launchStage = 0; @@ -17214,7 +17286,7 @@ object.ingestDelay = null; } if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.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.samplePeriod != null && message.hasOwnProperty("samplePeriod")) object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) @@ -17863,6 +17935,12 @@ } } switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; case "LAUNCH_STAGE_UNSPECIFIED": case 0: message.launchStage = 0; @@ -17935,7 +18013,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; @@ -24053,6 +24131,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; @@ -24067,6 +24151,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; @@ -24193,9 +24283,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")) @@ -26514,6 +26604,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; @@ -26610,7 +26706,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")) @@ -27359,6 +27455,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; @@ -27375,6 +27477,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; @@ -27413,6 +27521,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; @@ -27477,7 +27589,7 @@ object.unverifiedLazy = false; } 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")) @@ -27485,7 +27597,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")) @@ -27498,7 +27610,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]; } return object; }; @@ -28873,6 +28985,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; @@ -28942,7 +29060,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) @@ -30697,6 +30815,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; @@ -30746,7 +30870,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; }; @@ -31812,6 +31936,12 @@ return object; var message = new $root.google.protobuf.Value(); switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; case "NULL_VALUE": case 0: message.nullValue = 0; @@ -31850,7 +31980,7 @@ options = {}; var object = {}; if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; if (options.oneofs) object.kind = "nullValue"; } @@ -32717,6 +32847,12 @@ } } switch (object.syntax) { + default: + if (typeof object.syntax === "number") { + message.syntax = object.syntax; + break; + } + break; case "SYNTAX_PROTO2": case 0: message.syntax = 0; @@ -32775,7 +32911,7 @@ object.mixins[j] = $root.google.protobuf.Mixin.toObject(message.mixins[j], options); } if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] : message.syntax; + object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] === undefined ? message.syntax : $root.google.protobuf.Syntax[message.syntax] : message.syntax; return object; }; @@ -33101,6 +33237,12 @@ } } switch (object.syntax) { + default: + if (typeof object.syntax === "number") { + message.syntax = object.syntax; + break; + } + break; case "SYNTAX_PROTO2": case 0: message.syntax = 0; @@ -33152,7 +33294,7 @@ object.options[j] = $root.google.protobuf.Option.toObject(message.options[j], options); } if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] : message.syntax; + object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] === undefined ? message.syntax : $root.google.protobuf.Syntax[message.syntax] : message.syntax; return object; }; @@ -33924,6 +34066,12 @@ message.sourceContext = $root.google.protobuf.SourceContext.fromObject(object.sourceContext); } switch (object.syntax) { + default: + if (typeof object.syntax === "number") { + message.syntax = object.syntax; + break; + } + break; case "SYNTAX_PROTO2": case 0: message.syntax = 0; @@ -33979,7 +34127,7 @@ if (message.sourceContext != null && message.hasOwnProperty("sourceContext")) object.sourceContext = $root.google.protobuf.SourceContext.toObject(message.sourceContext, options); if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] : message.syntax; + object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] === undefined ? message.syntax : $root.google.protobuf.Syntax[message.syntax] : message.syntax; return object; }; @@ -34363,6 +34511,12 @@ return object; var message = new $root.google.protobuf.Field(); switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; case "TYPE_UNKNOWN": case 0: message.kind = 0; @@ -34441,6 +34595,12 @@ break; } switch (object.cardinality) { + default: + if (typeof object.cardinality === "number") { + message.cardinality = object.cardinality; + break; + } + break; case "CARDINALITY_UNKNOWN": case 0: message.cardinality = 0; @@ -34512,9 +34672,9 @@ object.defaultValue = ""; } if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.google.protobuf.Field.Kind[message.kind] : message.kind; + object.kind = options.enums === String ? $root.google.protobuf.Field.Kind[message.kind] === undefined ? message.kind : $root.google.protobuf.Field.Kind[message.kind] : message.kind; if (message.cardinality != null && message.hasOwnProperty("cardinality")) - object.cardinality = options.enums === String ? $root.google.protobuf.Field.Cardinality[message.cardinality] : message.cardinality; + object.cardinality = options.enums === String ? $root.google.protobuf.Field.Cardinality[message.cardinality] === undefined ? message.cardinality : $root.google.protobuf.Field.Cardinality[message.cardinality] : message.cardinality; if (message.number != null && message.hasOwnProperty("number")) object.number = message.number; if (message.name != null && message.hasOwnProperty("name")) @@ -34908,6 +35068,12 @@ message.sourceContext = $root.google.protobuf.SourceContext.fromObject(object.sourceContext); } switch (object.syntax) { + default: + if (typeof object.syntax === "number") { + message.syntax = object.syntax; + break; + } + break; case "SYNTAX_PROTO2": case 0: message.syntax = 0; @@ -34957,7 +35123,7 @@ if (message.sourceContext != null && message.hasOwnProperty("sourceContext")) object.sourceContext = $root.google.protobuf.SourceContext.toObject(message.sourceContext, options); if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] : message.syntax; + object.syntax = options.enums === String ? $root.google.protobuf.Syntax[message.syntax] === undefined ? message.syntax : $root.google.protobuf.Syntax[message.syntax] : message.syntax; return object; }; From ee5c8f1c9d36e771a16397ba1c7cf04654918f43 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 10:28:13 +0000 Subject: [PATCH 83/85] chore(main): release 1.1.3 (#170) :robot: I have created a release *beep* *boop* --- ## [1.1.3](https://togithub.com/googleapis/nodejs-service-management/compare/v1.1.2...v1.1.3) (2022-11-10) ### Bug Fixes * Preserve default values in x-goog-request-params header ([#169](https://togithub.com/googleapis/nodejs-service-management/issues/169)) ([ef47431](https://togithub.com/googleapis/nodejs-service-management/commit/ef4743106afc35191647a626c8f3a8a08634ebd1)) * Regenerated protos JS and TS definitions ([#178](https://togithub.com/googleapis/nodejs-service-management/issues/178)) ([9c00293](https://togithub.com/googleapis/nodejs-service-management/commit/9c00293b6213b8ba0e2d56fd2208d90b60c38d0d)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- packages/google-api-servicemanagement/CHANGELOG.md | 8 ++++++++ packages/google-api-servicemanagement/package.json | 2 +- .../snippet_metadata.google.api.servicemanagement.v1.json | 2 +- .../google-api-servicemanagement/samples/package.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index b9821f0185a..050fb3c7123 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.1.3](https://github.com/googleapis/nodejs-service-management/compare/v1.1.2...v1.1.3) (2022-11-10) + + +### Bug Fixes + +* Preserve default values in x-goog-request-params header ([#169](https://github.com/googleapis/nodejs-service-management/issues/169)) ([ef47431](https://github.com/googleapis/nodejs-service-management/commit/ef4743106afc35191647a626c8f3a8a08634ebd1)) +* Regenerated protos JS and TS definitions ([#178](https://github.com/googleapis/nodejs-service-management/issues/178)) ([9c00293](https://github.com/googleapis/nodejs-service-management/commit/9c00293b6213b8ba0e2d56fd2208d90b60c38d0d)) + ## [1.1.2](https://github.com/googleapis/nodejs-service-management/compare/v1.1.1...v1.1.2) (2022-09-01) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 13b1e967ebb..1a1dbb2e967 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "1.1.2", + "version": "1.1.3", "description": "Service management client for Node.js", "repository": "googleapis/nodejs-service-management", "license": "Apache-2.0", diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json index f51879aa1df..0a1eb792041 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicemanagement", - "version": "1.1.2", + "version": "1.1.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 687302423cd..ff42ef08a9a 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^1.1.2" + "@google-cloud/service-management": "^1.1.3" }, "devDependencies": { "c8": "^7.1.0", From d6b7a447175ae2b2223d030d05b4fa7bd0d1e49a Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 11 Nov 2022 10:34:27 -0800 Subject: [PATCH 84/85] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 +- .../google-api-servicemanagement/.mocharc.js | 2 +- .../.prettierrc.js | 2 +- .../.repo-metadata.json | 4 +- .../google-api-servicemanagement/README.md | 30 +- .../google-api-servicemanagement/package.json | 13 +- .../samples/README.md | 300 +++++++++++++++++- .../google-api-servicemanagement/src/index.ts | 2 +- release-please-config.json | 3 +- 10 files changed, 336 insertions(+), 27 deletions(-) rename packages/google-api-servicemanagement/{.github => }/.OwlBot.yaml (80%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c38b0a70276..05ab92ecc58 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,6 +1,7 @@ { "packages/gapic-node-templating": "0.0.0", "packages/google-api-apikeys": "0.1.3", + "packages/google-api-servicemanagement": "1.1.3", "packages/google-cloud-batch": "0.3.2", "packages/google-cloud-beyondcorp-appconnections": "0.2.3", "packages/google-cloud-beyondcorp-appconnectors": "0.3.3", diff --git a/packages/google-api-servicemanagement/.github/.OwlBot.yaml b/packages/google-api-servicemanagement/.OwlBot.yaml similarity index 80% rename from packages/google-api-servicemanagement/.github/.OwlBot.yaml rename to packages/google-api-servicemanagement/.OwlBot.yaml index b5a6d445b4f..df998aea381 100644 --- a/packages/google-api-servicemanagement/.github/.OwlBot.yaml +++ b/packages/google-api-servicemanagement/.OwlBot.yaml @@ -11,16 +11,14 @@ # WITHOUT 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/api/servicemanagement/(v.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/api/servicemanagement/(v.*)/.*-nodejs + dest: /owl-bot-staging/google-api-servicemanagement/$1 begin-after-commit-hash: ea0f18027eafb4801813fa253f16ffeef904b4c6 diff --git a/packages/google-api-servicemanagement/.mocharc.js b/packages/google-api-servicemanagement/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-api-servicemanagement/.mocharc.js +++ b/packages/google-api-servicemanagement/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-api-servicemanagement/.prettierrc.js b/packages/google-api-servicemanagement/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-api-servicemanagement/.prettierrc.js +++ b/packages/google-api-servicemanagement/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-api-servicemanagement/.repo-metadata.json b/packages/google-api-servicemanagement/.repo-metadata.json index 3d7bc77f36e..afac796eb50 100644 --- a/packages/google-api-servicemanagement/.repo-metadata.json +++ b/packages/google-api-servicemanagement/.repo-metadata.json @@ -1,5 +1,5 @@ { - "issue_tracker": "https://github.com/googleapis/nodejs-service-management/issues", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", "distribution_name": "@google-cloud/service-management", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/service-management/latest", "product_documentation": "https://cloud.google.com/service-infrastructure/docs/overview/", @@ -10,7 +10,7 @@ "api_id": "servicemanagement.googleapis.com", "requires_billing": true, "language": "nodejs", - "repo": "googleapis/nodejs-service-management", + "repo": "googleapis/google-cloud-node", "api_shortname": "servicemanagement", "library_type": "GAPIC_AUTO" } diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index 30f8741a145..46d4ae11435 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Service Management API: Node.js Client](https://github.com/googleapis/nodejs-service-management) +# [Service Management API: Node.js Client](https://github.com/googleapis/google-cloud-node) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/service-management.svg)](https://www.npmjs.org/package/@google-cloud/service-management) @@ -14,11 +14,11 @@ Service management client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-service-management/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-servicemanagement/CHANGELOG.md). * [Service Management API Node.js Client API Reference][client-docs] * [Service Management API Documentation][product-docs] -* [github.com/googleapis/nodejs-service-management](https://github.com/googleapis/nodejs-service-management) +* [github.com/googleapis/google-cloud-node/packages/google-api-servicemanagement](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-servicemanagement) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -81,11 +81,27 @@ listServices(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-service-management/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-service-management/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-service-management&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Service_manager.create_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service.js,samples/README.md) | +| Service_manager.create_service_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_config.js,samples/README.md) | +| Service_manager.create_service_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_rollout.js,samples/README.md) | +| Service_manager.delete_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.delete_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.delete_service.js,samples/README.md) | +| Service_manager.disable_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.disable_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.disable_service.js,samples/README.md) | +| Service_manager.enable_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.enable_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.enable_service.js,samples/README.md) | +| Service_manager.generate_config_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.generate_config_report.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.generate_config_report.js,samples/README.md) | +| Service_manager.get_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service.js,samples/README.md) | +| Service_manager.get_service_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_config.js,samples/README.md) | +| Service_manager.get_service_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_rollout.js,samples/README.md) | +| Service_manager.list_service_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_configs.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_configs.js,samples/README.md) | +| Service_manager.list_service_rollouts | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_rollouts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_rollouts.js,samples/README.md) | +| Service_manager.list_services | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_services.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_services.js,samples/README.md) | +| Service_manager.submit_config_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.submit_config_source.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.submit_config_source.js,samples/README.md) | +| Service_manager.undelete_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.undelete_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.undelete_service.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/test/quickstart.js,samples/README.md) | @@ -135,7 +151,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-service-management/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`) @@ -147,7 +163,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-service-management/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/service-management/latest [product-docs]: https://cloud.google.com/service-infrastructure/docs/overview/ diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 1a1dbb2e967..06e3a3c5358 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -2,7 +2,11 @@ "name": "@google-cloud/service-management", "version": "1.1.3", "description": "Service management client for Node.js", - "repository": "googleapis/nodejs-service-management", + "repository": { + "type": "git", + "directory": "packages/google-api-servicemanagement", + "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": { @@ -62,5 +66,6 @@ }, "engines": { "node": ">=12.0.0" - } + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-servicemanagement" } diff --git a/packages/google-api-servicemanagement/samples/README.md b/packages/google-api-servicemanagement/samples/README.md index 89b9ef15789..dfe15914d96 100644 --- a/packages/google-api-servicemanagement/samples/README.md +++ b/packages/google-api-servicemanagement/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Service Management API: Node.js Samples](https://github.com/googleapis/nodejs-service-management) +# [Service Management API: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -12,12 +12,28 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Service_manager.create_service](#service_manager.create_service) + * [Service_manager.create_service_config](#service_manager.create_service_config) + * [Service_manager.create_service_rollout](#service_manager.create_service_rollout) + * [Service_manager.delete_service](#service_manager.delete_service) + * [Service_manager.disable_service](#service_manager.disable_service) + * [Service_manager.enable_service](#service_manager.enable_service) + * [Service_manager.generate_config_report](#service_manager.generate_config_report) + * [Service_manager.get_service](#service_manager.get_service) + * [Service_manager.get_service_config](#service_manager.get_service_config) + * [Service_manager.get_service_rollout](#service_manager.get_service_rollout) + * [Service_manager.list_service_configs](#service_manager.list_service_configs) + * [Service_manager.list_service_rollouts](#service_manager.list_service_rollouts) + * [Service_manager.list_services](#service_manager.list_services) + * [Service_manager.submit_config_source](#service_manager.submit_config_source) + * [Service_manager.undelete_service](#service_manager.undelete_service) + * [Quickstart](#quickstart) * [Quickstart](#quickstart) ## Before you begin Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-service-management#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -29,16 +45,288 @@ Before running the samples, make sure you've followed the steps outlined in +### Service_manager.create_service + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.create_service.js` + + +----- + + + + +### Service_manager.create_service_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_config.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_config.js` + + +----- + + + + +### Service_manager.create_service_rollout + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_rollout.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_rollout.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_rollout.js` + + +----- + + + + +### Service_manager.delete_service + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.delete_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.delete_service.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.delete_service.js` + + +----- + + + + +### Service_manager.disable_service + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.disable_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.disable_service.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.disable_service.js` + + +----- + + + + +### Service_manager.enable_service + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.enable_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.enable_service.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.enable_service.js` + + +----- + + + + +### Service_manager.generate_config_report + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.generate_config_report.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.generate_config_report.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.generate_config_report.js` + + +----- + + + + +### Service_manager.get_service + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.get_service.js` + + +----- + + + + +### Service_manager.get_service_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_config.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_config.js` + + +----- + + + + +### Service_manager.get_service_rollout + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_rollout.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_rollout.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_rollout.js` + + +----- + + + + +### Service_manager.list_service_configs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_configs.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_configs.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_configs.js` + + +----- + + + + +### Service_manager.list_service_rollouts + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_rollouts.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_rollouts.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_rollouts.js` + + +----- + + + + +### Service_manager.list_services + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_services.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_services.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.list_services.js` + + +----- + + + + +### Service_manager.submit_config_source + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.submit_config_source.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.submit_config_source.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.submit_config_source.js` + + +----- + + + + +### Service_manager.undelete_service + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.undelete_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.undelete_service.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/service_manager.undelete_service.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/quickstart.js` + + +----- + + + + ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-service-management/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-service-management&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/test/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node /workspace/google-cloud-node/samples/test/quickstart.js` @@ -46,5 +334,5 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-service-management&page=editor&open_in_editor=samples/README.md +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md [product-docs]: https://cloud.google.com/service-infrastructure/docs/overview/ diff --git a/packages/google-api-servicemanagement/src/index.ts b/packages/google-api-servicemanagement/src/index.ts index c49c64c72c4..0387de3897f 100644 --- a/packages/google-api-servicemanagement/src/index.ts +++ b/packages/google-api-servicemanagement/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/release-please-config.json b/release-please-config.json index ca8fb90627b..7e31f7928c7 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -2,6 +2,7 @@ "initial-version": "0.1.0", "packages": { "packages/google-api-apikeys": {}, + "packages/google-api-servicemanagement": {}, "packages/google-cloud-batch": {}, "packages/google-cloud-beyondcorp-appconnections": {}, "packages/google-cloud-beyondcorp-appconnectors": {}, @@ -49,4 +50,4 @@ } ], "release-type": "node" -} \ No newline at end of file +} From 773cea660737e6b8e04465d45706eca0960b836d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 11 Nov 2022 18:55:56 +0000 Subject: [PATCH 85/85] =?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 --- .../google-api-servicemanagement/README.md | 34 +++--- .../samples/README.md | 102 +++++++++--------- release-please-config.json | 2 +- 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/packages/google-api-servicemanagement/README.md b/packages/google-api-servicemanagement/README.md index 46d4ae11435..c06de65d8bf 100644 --- a/packages/google-api-servicemanagement/README.md +++ b/packages/google-api-servicemanagement/README.md @@ -85,23 +85,23 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Service_manager.create_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service.js,samples/README.md) | -| Service_manager.create_service_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_config.js,samples/README.md) | -| Service_manager.create_service_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_rollout.js,samples/README.md) | -| Service_manager.delete_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.delete_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.delete_service.js,samples/README.md) | -| Service_manager.disable_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.disable_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.disable_service.js,samples/README.md) | -| Service_manager.enable_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.enable_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.enable_service.js,samples/README.md) | -| Service_manager.generate_config_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.generate_config_report.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.generate_config_report.js,samples/README.md) | -| Service_manager.get_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service.js,samples/README.md) | -| Service_manager.get_service_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_config.js,samples/README.md) | -| Service_manager.get_service_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_rollout.js,samples/README.md) | -| Service_manager.list_service_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_configs.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_configs.js,samples/README.md) | -| Service_manager.list_service_rollouts | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_rollouts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_rollouts.js,samples/README.md) | -| Service_manager.list_services | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_services.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_services.js,samples/README.md) | -| Service_manager.submit_config_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.submit_config_source.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.submit_config_source.js,samples/README.md) | -| Service_manager.undelete_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.undelete_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.undelete_service.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/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=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/test/quickstart.js,samples/README.md) | +| Service_manager.create_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.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-api-servicemanagement/samples/generated/v1/service_manager.create_service.js,samples/README.md) | +| Service_manager.create_service_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js,samples/README.md) | +| Service_manager.create_service_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js,samples/README.md) | +| Service_manager.delete_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.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-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js,samples/README.md) | +| Service_manager.disable_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.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-api-servicemanagement/samples/generated/v1/service_manager.disable_service.js,samples/README.md) | +| Service_manager.enable_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.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-api-servicemanagement/samples/generated/v1/service_manager.enable_service.js,samples/README.md) | +| Service_manager.generate_config_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.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-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js,samples/README.md) | +| Service_manager.get_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.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-api-servicemanagement/samples/generated/v1/service_manager.get_service.js,samples/README.md) | +| Service_manager.get_service_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js,samples/README.md) | +| Service_manager.get_service_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js,samples/README.md) | +| Service_manager.list_service_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.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-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js,samples/README.md) | +| Service_manager.list_service_rollouts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js,samples/README.md) | +| Service_manager.list_services | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.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-api-servicemanagement/samples/generated/v1/service_manager.list_services.js,samples/README.md) | +| Service_manager.submit_config_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.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-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js,samples/README.md) | +| Service_manager.undelete_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.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-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/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-api-servicemanagement/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/test/quickstart.js,samples/README.md) | diff --git a/packages/google-api-servicemanagement/samples/README.md b/packages/google-api-servicemanagement/samples/README.md index dfe15914d96..acc7813d869 100644 --- a/packages/google-api-servicemanagement/samples/README.md +++ b/packages/google-api-servicemanagement/samples/README.md @@ -47,14 +47,14 @@ Before running the samples, make sure you've followed the steps outlined in ### Service_manager.create_service -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.create_service.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service.js` ----- @@ -64,14 +64,14 @@ __Usage:__ ### Service_manager.create_service_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_config.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_config.js` ----- @@ -81,14 +81,14 @@ __Usage:__ ### Service_manager.create_service_rollout -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_rollout.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_rollout.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.create_service_rollout.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.create_service_rollout.js` ----- @@ -98,14 +98,14 @@ __Usage:__ ### Service_manager.delete_service -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.delete_service.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.delete_service.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.delete_service.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.delete_service.js` ----- @@ -115,14 +115,14 @@ __Usage:__ ### Service_manager.disable_service -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.disable_service.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.disable_service.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.disable_service.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.disable_service.js` ----- @@ -132,14 +132,14 @@ __Usage:__ ### Service_manager.enable_service -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.enable_service.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.enable_service.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.enable_service.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.enable_service.js` ----- @@ -149,14 +149,14 @@ __Usage:__ ### Service_manager.generate_config_report -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.generate_config_report.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.generate_config_report.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.generate_config_report.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.generate_config_report.js` ----- @@ -166,14 +166,14 @@ __Usage:__ ### Service_manager.get_service -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.get_service.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service.js` ----- @@ -183,14 +183,14 @@ __Usage:__ ### Service_manager.get_service_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_config.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_config.js` ----- @@ -200,14 +200,14 @@ __Usage:__ ### Service_manager.get_service_rollout -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_rollout.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_rollout.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.get_service_rollout.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.get_service_rollout.js` ----- @@ -217,14 +217,14 @@ __Usage:__ ### Service_manager.list_service_configs -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_configs.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_configs.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_configs.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_configs.js` ----- @@ -234,14 +234,14 @@ __Usage:__ ### Service_manager.list_service_rollouts -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_rollouts.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_rollouts.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.list_service_rollouts.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_service_rollouts.js` ----- @@ -251,14 +251,14 @@ __Usage:__ ### Service_manager.list_services -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.list_services.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.list_services.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.list_services.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.list_services.js` ----- @@ -268,14 +268,14 @@ __Usage:__ ### Service_manager.submit_config_source -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.submit_config_source.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.submit_config_source.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.submit_config_source.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.submit_config_source.js` ----- @@ -285,14 +285,14 @@ __Usage:__ ### Service_manager.undelete_service -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/service_manager.undelete_service.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.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=/workspace/google-cloud-node/samples/generated/v1/service_manager.undelete_service.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/service_manager.undelete_service.js` +`node packages/google-api-servicemanagement/samples/generated/v1/service_manager.undelete_service.js` ----- @@ -302,14 +302,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/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=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/quickstart.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/quickstart.js` +`node packages/google-api-servicemanagement/samples/quickstart.js` ----- @@ -319,14 +319,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicemanagement/samples/test/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/test/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicemanagement/samples/test/quickstart.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/test/quickstart.js` +`node packages/google-api-servicemanagement/samples/test/quickstart.js` diff --git a/release-please-config.json b/release-please-config.json index 7e31f7928c7..6c4b0e18eab 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -50,4 +50,4 @@ } ], "release-type": "node" -} +} \ No newline at end of file